Help Doc Access Vani

SPACE MEMBERS API

Manage resources and operations related to Space members.

GET Get

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

Retrieves a list of members in the Space.

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.

Responses

200 success
200 using filter fields
401 unauthorized
success - Response
{ "data": { "space_members": [ { "role_name": "EDITOR", "added_type_name": "USER", "added_time": "Tue, 04 Feb 2025, 09:40:28", "mail_id": "naga.vg@zohotest.com", "added_by": "96384499", "display_name": "naga.vg", "zuid": "80473960" }, { "role_name": "VIEWER", "added_type_name": "ORG", "added_time": "Tue, 21 Jan 2025, 22:45:18", "added_by": "96384499", "display_name": "NR's ORG", "zuid": "97375109" }, { "role_name": "VIEWER", "added_type_name": "TEAM", "added_time": "Tue, 21 Jan 2025, 22:43:52", "added_by": "96384499", "display_name": "Test", "zuid": "1505000000002005" }, { "role_name": "CREATOR", "added_type_name": "USER", "added_time": "Tue, 21 Jan 2025, 22:43:45", "mail_id": "naga.vg+7rest@zohotest.com", "added_by": "96384499", "display_name": "naga", "zuid": "96384499" } ] }, "message": "Space members fetched successfully.", "request_uri": "/vani/api/v1/editions/97375109/spaces/1505000000005005/members", "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}/members" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \ -H "Content-Type: application/json"

POST Post

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

Add a member to a specific Space.

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.
members_info string body Based on Request An array of JSON objects containing the member’s ZUID, role, and type. Each object must include: zuid, role, type. Note: Sending one object will add a single member.
zuid string body Based on Request The unique ID of the member being added.
role string body Based on Request Role to be assigned to the member (e.g., EDITOR, COMMENTER, VIEWER, GUEST_COMMENTER, GUEST_VIEWER).
type string body Based on Request The category of member being added (e.g., USER, GROUP, TEAM, ORG).

Request Body

JSON
{ "members_info": [ { "zuid": "98722154", "role": "VIEWER", "type": "USER" } ] }

Responses

200 success
206 partial success
200 success - team
200 success - all type of users
400 member already part of space
400 user not part of team and not part of org
401 unathorized
success - Response
{ "data": { "added_members": [ { "role_name": "VIEWER", "added_type_name": "USER", "added_time": "Tue, 04 Feb 2025, 10:26:17", "mail_id": "test@zohotest.com", "added_by": "96384499", "display_name": "test", "zuid": "98722154" } ] }, "message": "Space member added successfully.", "request_uri": "/vani/api/v1/editions/97375109/spaces/1505000000039170/members", "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}/members" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "members_info": [ { "zuid": "97377569", "role": "VIEWER", "type": "USER" } ] }'

PUT Put

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

Updates the role of a specific member within a 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.
member_id string path Required The unique ID of the member to be updated.
role string body Based on Request The role to be updated .Allowed values: EDITOR, COMMENTER, VIEWER, GUEST_COMMENTER, GUEST_VIEWER

Request Body

JSON
{ "role": "COMMENTER" }

Responses

200 success - commentor
200 success - editor
409 already have a same role
403 cannot update owner role
403 cannot update own role
404 member is not part of space
401 unauthorized
success - commentor - Response
{ "data": { "current_user_id": "96384499", "new_role": "COMMENTER", "edition_id": "97375109", "space_id": "1505000000005005", "zuid": "80473960" }, "message": "Space member updated successfully.", "request_uri": "/vani/api/v1/editions/97375109/spaces/1505000000005005/members", "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}/members/{member_id}" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "role": "VIEWER" }'

DELETE Delete

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

Removes a specific member from a 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.
member_id string path Required The unique ID of the member to be removed.

Request Body

JSON
{ "example_field": "example_value", "description": "Request body structure not available in API specification" }

Responses

200 success
403 space owner cannot be removed
403 cannot remove self
404 member is not part of the space
401 unauthorized
success - Response
{ "data": { "current_user_id": "96384499", "edition_id": "97375109", "removed_zuid": "80473960", "space_id": "1505000000039107" }, "message": "Space member deleted successfully.", "request_uri": "/vani/api/v1/editions/97375109/spaces/1505000000039107/members", "status": "success" }

Code Examples

cURL Command line HTTP client
cURL
curl -X DELETE "https://api.app.vanihq.com/vani/api/v1/editions/{edition_id}/spaces/{space_id}/members/{member_id}" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "example_field": "example_value", "description": "Request body structure not available in API specification" }'