Help Doc Access Vani

SPACES API

Manage resources and operations related to Spaces.

GET Get

GET https://api.app.vanihq.com/vani/api/v1/editions/{edition_id}/spaces/{space_id}

Retrieves information about a specific Space in an edition.

Parameters

Name Type In Required Description
fields string query Optional Comma-separated list of field names to include in the response. If omitted, all fields will be returned.
edition_id string path Required The unique ID of the edition.
space_id string path Required The unique ID of the Space.

Responses

200 success
401 unauthorized
200 using filter fields
success - Response
{ "data": { "space_info": { "created_time": "Wed, 02 Apr 2025, 14:46:07", "is_favorite": "false", "last_modified_time": "Mon, 14 Apr 2025, 19:01:10", "can_edit": "true", "allow_embed": "false", "team_id": "1303000000002003", "space_member_count": "1", "space_name": "New Space", "publish": "false", "owner_zuid": "60029267674", "space_id": "1303000000492291", "last_author_zuid": "60029267674", "status": "ACTIVE" } }, "message": "Space fetched successfully.", "request_uri": "/vani/api/v1/editions/60029715808/spaces/1303000000492291", "status": "success" }

Code Examples

cURL Command line HTTP client
cURL
curl -X GET "https://api.app.vanihq.com/vani/api/v1/editions/{edition_id}/spaces/{space_id}" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \ -H "Content-Type: application/json"

GET Get All Spaces

GET https://api.app.vanihq.com/vani/api/v1/editions/{edition_id}/spaces

Retrieves a list of Spaces in an edition.

Parameters

Name Type In Required Description
team_id string query Required The ID of the team within the edition.
action_type string query Required Specifies the category or context of Spaces
ALLSPACES : All Spaces within the edition.
SHARED_SPACES : Spaces shared with you.
SHARED_BY_ME : Spaces you’ve shared.
SHARED_BY_OTHERS : Spaces shared by others with you.
PUBLISHED_WITH_TEAM : Spaces published with the team.
FAVORITES : Spaces marked as favourites.
DRAFT_SPACES : Spaces that are in draft.
RECENTLY_TRASHED : Recently trashed Spaces.
sort_by string query Optional Specifies how to sort the results. Example: A_Z for alphabetical order.
Allowed values: TIME_CREATED, TIME_DELETED_ASC, TIME_DELETED_DESC, A_Z, Z_A, RECENTLY_OPENED, RECENTLY_TRASHED, RECENTLY_ACCESSED_BY_USER, RECENTLY_MODIFIED_BY_USER.
from string query Optional Indicates the starting point (page number) for paginated results. The default value is 1, meaning the query will start from the first page.
The starting point (page number) for the query used for pagination. Default is 1.
limit string query Optional The number of Spaces to be returned in the response. The Default value is 10.
need_total_count string query Optional Set this to true if you want to include the total count of items in the response. By default, this is false.
edition_id string path Required The unique ID of the edition.

Responses

200 A_T - ALL_SPACES
200 SHARED_SPACES
200 SHARED_BY_ME
200 SHARED_BY_OTHERS
200 PUBLISHED_WITH_TEAM
200 FAVOURITES
200 DRAFT_SPACES
200 RECENTLY_TRASHED
200 RECENT_ALL_SPACES_ORG
200 using filter fields
A_T - ALL_SPACES - Response
{ "data": { "space_count": 34, "spaces_info": [ { "created_time": "Fri, 24 Jan 2025, 12:25:29", "is_favorite": "true", "last_modified_time": "Fri, 24 Jan 2025, 12:25:29", "space_name": "Business case template", "publish": "false", "owner_zuid": "96384499", "can_edit": "true", "team_id": "3009000000002003", "space_member_count": "1", "space_id": "3009000000093779", "last_author_zuid": "96384499", "status": "ACTIVE" }, { "created_time": "Fri, 24 Jan 2025, 12:25:24", "is_favorite": "false", "last_modified_time": "Fri, 24 Jan 2025, 12:25:24", "space_name": "Customer journey map", "publish": "false", "owner_zuid": "96384499", "can_edit": "true", "team_id": "3009000000002003", "space_member_count": "1", "space_id": "3009000000093710", "last_author_zuid": "96384499", "status": "ACTIVE" } ] }, "message": "Space fetched successfully.", "request_uri": "/vani/api/v1/editions/96499735/spaces", "status": "success" }

Code Examples

cURL Command line HTTP client
cURL
curl -X GET "https://api.app.vanihq.com/vani/api/v1/editions/{edition_id}/spaces" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \ -H "Content-Type: application/json"

POST Space Creation

POST https://api.app.vanihq.com/vani/api/v1/editions/{edition_id}/spaces/

Creates a new Space within a specific team in an edition.

Parameters

Name Type In Required Description
edition_id string path Required The unique ID of the edition
space_name string body Based on Request The name of the new Space to be created.
team_id string body Based on Request The ID of the team where the Space is to be created.

Request Body

JSON
{ "create_space":{ "space_name":"REST API SPACE", "team_id": {{team_id}} } }

Responses

200 success
200 success with template
404 template not found
404 Team not found
401 user is not teammember
success - Response
{ "data": { "current_user_id": "96384499", "edition_id": "96499735", "space_id": "3009000000141003", "uri": "/vani/api/v1/editions/96499735/spaces/3009000000141003" }, "message": "Space created successfully.", "request_uri": "/vani/api/v1/editions/96499735/spaces/", "status": "success" }

Code Examples

cURL Command line HTTP client
cURL
curl -X POST "https://api.app.vanihq.com/vani/api/v1/editions/{edition_id}/spaces/" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "create_space": { "space_name": "space creation", "team_id": "{{team_id}}" } }'

POST Space Duplicate

POST https://api.app.vanihq.com/vani/api/v1/editions/{edition_id}/spaces/{space_id}/duplicate

Duplicates the Space in a team.

Parameters

Name Type In Required Description
edition_id string path Required The unique ID of the edition.
space_id string path Required The unique ID of the Space.
space_name string body Based on Request The name for the duplicated Space.

Request Body

JSON
{ "duplicate_space": { "space_name": "test duplicate project" } }

Responses

200 SPACE DUPLICATE - success
200 success without new space name
404 SPACE DUPLICATE - not found
403 SPACE DUPLICATE - tryoutteam
401 SPACE DUPLICATE - unauthorized user
SPACE DUPLICATE - success - Response
{ "data": { "space_info": { "created_time": "Sat, 08 Mar 2025, 17:37:07", "last_modified_time": "Sat, 08 Mar 2025, 17:37:07", "is_favorite": "false", "space_name": "test duplicate project", "publish": "false", "owner_zuid": "80215739", "can_edit": "true", "team_id": "3009000000002003", "allow_embed": "false", "space_id": "3009000000239335", "last_author_zuid": "80215739", "status": "ACTIVE" } }, "message": "Space duplicated successfully", "request_uri": "/vani/api/v1/editions/96499735/spaces/3009000000232005/duplicate", "status": "success" }

Code Examples

cURL Command line HTTP client
cURL
curl -X POST "https://api.app.vanihq.com/vani/api/v1/editions/{edition_id}/spaces/{space_id}/duplicate" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "duplicate_space": { "space_name": "test duplicate space" } }'

POST Space Move

POST https://api.app.vanihq.com/vani/api/v1/editions/{edition_id}/spaces/{space_id}/move

Moves the Space to a different team.

Parameters

Name Type In Required Description
edition_id string path Required The unique ID of the edition.
space_id string path Required The unique ID of the Space.

Request Body

JSON
{ "move_space": { "team_id": 693000000435005 } }

Responses

200 SPACE MOVE - success
403 SPACE MOVE - moving space to sameteam restricted
404 SPACE MOVE - space not found
400 SPACE MOVE - failed (without request params)
401 SPACE MOVE - unauthorized
SPACE MOVE - success - Response
{ "data": { "space_info": { "created_time": "Sun, 09 Mar 2025, 12:27:54", "last_modified_time": "Sun, 09 Mar 2025, 12:27:54", "is_favorite": "false", "space_name": "move space", "publish": "false", "owner_zuid": "96384499", "can_edit": "true", "team_id": "693000000435005", "allow_embed": "false", "space_id": "693000000558051", "last_author_zuid": "96384499", "status": "ACTIVE" } }, "message": "Space moved successfully", "request_uri": "/vani/api/v1/editions/75918186/spaces/693000000554217/move", "status": "success" }

Code Examples

cURL Command line HTTP client
cURL
curl -X POST "https://api.app.vanihq.com/vani/api/v1/editions/{edition_id}/spaces/{space_id}/move" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "move_space": { "team_id": "{{team_id}}" } }'

PUT Trash

PUT https://api.app.vanihq.com/vani/api/v1/editions/{edition_id}/spaces/{space_id}/state

Trashes the Space in an edition.

Parameters

Name Type In Required Description
edition_id string path Required The unique ID of the edition.
space_id string path Required The unique ID of the Space.
space_state string body Based on Request The value must be set to TRASH to consider the Space as trashed. Note: Only active Spaces can be trashed. Trying to trash any other type will result in an error.

Request Body

JSON
{ "space_state": "TRASH" }

Responses

200 success
400 space is not in active state
401 unauthorized
success - Response
{ "data": { "current_user_id": "96384499", "edition_id": "96499735", "space_state": "TRASH", "space_id": "3009000000093854" }, "message": "Space state updated successfully.", "request_uri": "/vani/api/v1/editions/96499735/spaces/3009000000093854/state", "status": "success" }

Code Examples

cURL Command line HTTP client
cURL
curl -X PUT "https://api.app.vanihq.com/vani/api/v1/editions/{edition_id}/spaces/{space_id}/state" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "space_state": "TRASH" }'

PUT Restore

PUT https://api.app.vanihq.com/vani/api/v1/editions/{edition_id}/spaces/{space_id}/state

Restores the Space in an edition.

Parameters

Name Type In Required Description
edition_id string path Required The unique ID of the edition.
space_id string path Required The unique ID of the Space.
space_state string body Based on Request The value must be set to RESTORE to restore the Space.Note: Only trashed Spaces can be restored. Trying to restore any other type will result in an error.

Request Body

JSON
{ "space_state": "RESTORE" }

Responses

200 sucess
400 space is not trashed
401 unauthorized
sucess - Response
{ "data": { "current_user_id": "96384499", "edition_id": "96499735", "space_state": "RESTORE", "space_id": "3009000000093854" }, "message": "Space state updated successfully.", "request_uri": "/vani/api/v1/editions/96499735/spaces/3009000000093854/state", "status": "success" }

Code Examples

cURL Command line HTTP client
cURL
curl -X PUT "https://api.app.vanihq.com/vani/api/v1/editions/{edition_id}/spaces/{space_id}/state" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "space_state": "RESTORE" }'

PUT Space Rename

PUT https://api.app.vanihq.com/vani/api/v1/editions/{edition_id}/spaces/{space_id}/meta

Updates the name of a specific Space in an edition.

Parameters

Name Type In Required Description
edition_id string path Required The unique ID of the edition.
space_id string path Required The unique ID of the Space.
space_name string body Based on Request The new name of the Space.

Request Body

JSON
{ "space_name": "rename testing", "action_type": "SPACE_NAME" }

Responses

200 success
409 same project name
401 unauthorized
success - Response
{ "data": { "current_user_id": "96384499", "edition_id": "96499735", "space_id": "3009000000141003", "new_name": "rename testing" }, "message": "Space meta updated successfully.", "request_uri": "/vani/api/v1/editions/96499735/spaces/3009000000141003/meta", "status": "success" }

Code Examples

cURL Command line HTTP client
cURL
curl -X PUT "https://api.app.vanihq.com/vani/api/v1/editions/{edition_id}/spaces/{space_id}/meta" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "space_name": "rename testing", "action_type": "SPACE_NAME" }'

PUT Space Favorite

PUT https://api.app.vanihq.com/vani/api/v1/editions/{edition_id}/spaces/{space_id}/meta

Adds a Space to your favorites or removes it from the favorites list within the given edition.

Parameters

Name Type In Required Description
edition_id string path Required The unique ID of the edition.
space_id string path Required The unique ID of the Space.

Request Body

JSON
{ "value": true, "action_type": "FAVORITE" }

Responses

200 favorite - success
200 remove favorite - success
409 already favorite
409 already not favorite
401 unauthorized
favorite - success - Response
{ "data": { "current_user_id": "96384499", "edition_id": "96499735", "is_favourite": true, "space_id": "3009000000141003" }, "message": "Space meta updated successfully.", "request_uri": "/vani/api/v1/editions/96499735/spaces/3009000000141003/meta", "status": "success" }

Code Examples

cURL Command line HTTP client
cURL
curl -X PUT "https://api.app.vanihq.com/vani/api/v1/editions/{edition_id}/spaces/{space_id}/meta" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "value": true, "action_type": "FAVORITE" }'

PUT Space Embed

PUT https://api.app.vanihq.com/vani/api/v1/editions/{edition_id}/spaces/{space_id}/meta

Enables or disables embedding a Space on external platforms or locations.

Parameters

Name Type In Required Description
edition_id string path Required The unique ID of the edition.
space_id string path Required The unique ID of the Space.
value string body Based on Request Set to true to enable embedding, or false to disable it.
action_type string body Based on Request Must be set to EMBED to enable or disable embedding for the Space.

Request Body

JSON
{ "value": true, "action_type": "EMBED" }

Responses

200 success
409 already in embedded state
200 REMOVE SPACE EMBED - success
409 REMOVE SPACE EMBED - not in embed state
401 SPACE EMBED - unauthorized
success - Response
{ "data": { "current_user_id": "96384499", "edition_id": "96499735", "space_id": "3009000000093003", "embed_status": true }, "message": "Space meta updated successfully.", "request_uri": "/vani/api/v1/editions/96499735/spaces/3009000000093003/meta", "status": "success" }

Code Examples

cURL Command line HTTP client
cURL
curl -X PUT "https://api.app.vanihq.com/vani/api/v1/editions/{edition_id}/spaces/{space_id}/meta" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "value": true, "action_type": "EMBED" }'