Help Doc Access Vani

TEAM MEMBERS API

Manage resources and operations related to team members.

GET Fetch Team Members

GET https://api.app.vanihq.com/vani/api/v1/editions/{edition_id}/teams/{team_id}/members
Required Scopes:
vani.teams.read

Retrieves the members present in a team.

Parameters

Name Type In Required Description
fields string query Optional Specifies the fields (comma-separated) to retrieve.
Allowed values: zuid,role_name,added_time,added_by,modified_time, display_name,mail_id,team_id.
from string query Optional The starting index from where the results should be fetched. Default value is 0.
limit string query Optional The maximum number of results to return in the response. Default value is 20.
edition_id string path Required The unique ID of the edition.
team_id string path Required The unique ID of the team associated with the edition.

Responses

200 Success
200 Pagination
404 Team Not Found
401 User Is Not Part of the Team
200 Using Filter Fields
Success - Response
{ "data": { "team_members": [ { "role_name": "MEMBER", "added_time": "Tue, 21 Jan 2025, 13:29:58", "modified_time": "Tue, 21 Jan 2025, 13:29:58", "mail_id": "emma.carter@boxicle.com", "added_by": "85572741", "display_name": "Emma Carter", "zuid": "96384499" }, { "role_name": "TEAM_ADMIN", "added_time": "Sat, 30 Nov 2024, 22:32:11", "modified_time": "Sat, 30 Nov 2024, 22:32:11", "mail_id": "ryan.mitchell@boxicle.com", "added_by": "85572741", "display_name": "Ryan Mitchell", "zuid": "85572741" } ] }, "message": "Team members fetched successfully.", "request_uri": "/vani/api/v1/editions/75918186/teams/693000000450001/members", "status": "success" }

Code Examples

cURL
curl -X GET "https://api.app.vanihq.com/vani/api/v1/editions/{edition_id}/teams/{team_id}/members" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \ -H "x-vani-apikey: YOUR_API_KEY" \ -H "Content-Type: application/json"

GET Fetch Team Admins

GET https://api.app.vanihq.com/vani/api/v1/editions/{edition_id}/teams/{team_id}/members
Required Scopes:
vani.teams.read

Retrieves members with the Team Admin role from a team.

Parameters

Name Type In Required Description
member_type string query Required Role of the member to be fetched. The value TEAM_ADMIN retrieves only the team admins.
fields string query Optional Specifies the fields (comma-separated) to retrieve.
Allowed values: zuid,role_name,added_time,added_by,modified_time, display_name,mail_id,team_id.
from string query Optional The starting index from where the results should be fetched. Default value is 0.
limit string query Optional The maximum number of results to return in the response. Default value is 20.
edition_id string path Required The unique ID of the edition.
team_id string path Required The unique ID of the team associated with the edition.

Responses

200 Success
404 Team Not Found
401 User Is Not Part of the Team
200 Using Filter Fields
Success - Response
{ "data": { "team_admins": [ { "role_name": "TEAM_ADMIN", "added_time": "Tue, 21 Jan 2025, 17:05:47", "modified_time": "Tue, 21 Jan 2025, 17:05:47", "mail_id": "ryan.mitchell@boxicle.com", "added_by": "96384499", "display_name": "Ryan Mitchell", "zuid": "96384499" } ] }, "message": "Team members fetched successfully.", "request_uri": "/vani/api/v1/editions/97375109/teams/1505000000002005/members", "status": "success" }

Code Examples

cURL
curl -X GET "https://api.app.vanihq.com/vani/api/v1/editions/{edition_id}/teams/{team_id}/members" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \ -H "x-vani-apikey: YOUR_API_KEY" \ -H "Content-Type: application/json"

POST Add Team Member

POST https://api.app.vanihq.com/vani/api/v1/editions/{edition_id}/teams/{team_id}/members
Required Scopes:
vani.teams.create

Add member(s) to a specific team.

Parameters

Name Type In Required Description
edition_id string path Required The unique ID of the edition.
team_id string path Required The unique ID of the team associated with the edition.
members_info string body Required An array of JSON objects containing the member’s email and role. Each object must include: mail_id, role. Note: Sending just one object will add a single member.
mail_id string body Required Email of the member
role string body Required Role to be assigned (MEMBER or TEAM_ADMIN).

Request Body

JSON
{ "members_info": [ { "mail_id": "sophia.bennett@boxicle.com", "role": "MEMBER" } ] }

Responses

200 Success
206 Partial Success
400 Member Already Part of the Team
400 License Limit Reached
401 Unauthorized
Success - Response
{ "data": { "added_members": [ { "role_name": "MEMBER", "invited_time": "Mon, 03 Feb 2025, 23:17:12", "edition_id": "97375109", "mail_id": "sophia.bennett@boxicle.com", "added_by": "96384499", "team_id": "1505000000051031" } ] }, "message": "Team member added successfully.", "request_uri": "/vani/api/v1/editions/97375109/teams/1505000000051031/members", "status": "success" }

Code Examples

cURL
curl -X POST "https://api.app.vanihq.com/vani/api/v1/editions/{edition_id}/teams/{team_id}/members" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \ -H "x-vani-apikey: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "note": "Request body format could not be parsed", "raw_content": "{\n \"members_info\":[ //* An array of JSON objects containing the member’s email and role. Each object must include: <code>mail_id</code>, <code>role</code>. Note: Sending just one object will add a ..." }'

PUT Update Team Member Role

PUT https://api.app.vanihq.com/vani/api/v1/editions/{edition_id}/teams/{team_id}/members/{member_id}
Required Scopes:
vani.teams.update

Updates the role of a specific team member in an edition.

Parameters

Name Type In Required Description
edition_id string path Required The unique ID of the edition.
team_id string path Required The unique ID of the team associated with the edition.
member_id string path Required The user ID (zuid) of the member to be updated.
role string body Required New role to be assigned to the member (MEMBER or TEAM_ADMIN).

Request Body

JSON
{ "role": "TEAM_ADMIN" }

Responses

200 Success – Admin Role Assigned
200 Success – Member Role Assigned
409 Member Already Has the Specified Role
403 Cannot Update Own Role
403 Super Admin Role Cannot Be Updated
404 Member Not Part of the Team
401 Non-Team Member Attempted Role Update
401 Unauthorized
Success – Admin Role Assigned - Response
{ "data": { "current_user_id": "96384499", "new_role": "TEAM_ADMIN", "edition_id": "75918186", "team_id": "693000000436009", "zuid": "81479212" }, "message": "Team member updated successfully.", "request_uri": "/vani/api/v1/editions/75918186/teams/693000000436009/members", "status": "success" }

Code Examples

cURL
curl -X PUT "https://api.app.vanihq.com/vani/api/v1/editions/{edition_id}/teams/{team_id}/members/{member_id}" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \ -H "x-vani-apikey: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "role": "TEAM_ADMIN" }'

DELETE Remove Team Member

DELETE https://api.app.vanihq.com/vani/api/v1/editions/{edition_id}/teams/{team_id}/members/{member_id}
Required Scopes:
vani.teams.delete

Removes a specific member from a team in an edition.

Parameters

Name Type In Required Description
edition_id string path Required The unique ID of the edition.
team_id string path Required The unique ID of the team associated with the edition.
member_id string path Required The user ID (zuid) of the member to be deleted.
assign_to_zuid string body Required The user ID (zuid) to whom the removed member’s records should be reassigned.

Request Body

JSON
{ "assign_to_zuid": 97377569 }

Responses

200 Success
403 Cannot Remove Self from the Team
403 Super Admin Cannot Be Removed from the Team
404 Member Not Part of the Team
403 Unauthorized
Success - Response
{ "data": { "current_user_id": "96384499", "edition_id": "97375109", "team_id": "1505000000051031", "removed_zuid": "97377569" }, "message": "Team member deleted successfully.", "request_uri": "/vani/api/v1/editions/97375109/teams/1505000000051031/members", "status": "success" }

Code Examples

cURL
curl -X DELETE "https://api.app.vanihq.com/vani/api/v1/editions/{edition_id}/teams/{team_id}/members/{member_id}" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \ -H "x-vani-apikey: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "assign_to_zuid": "{{assign_to_zuid}}" }'