Workspace team
Workspace team endpoints of the Zanfia Workspace API, with schemas and code samples.
Team members and invitations for your workspace. Invites send an email; the invited role can never be owner (ownership moves only via transfer in the dashboard). The caller needs team permissions in the workspace — a valid API key alone is not enough. All routes require a Authorization: Bearer header — see Authentication.
List team members
/team/membersAuthorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Response Body
application/json
application/json
curl -X GET "https://example.com/team/members"{ "count": 0, "members": [ { "userId": "string", "email": "string", "firstName": "string", "role": "string", "status": "string", "joinedAt": "string", "invitedBy": "string" } ]}{ "error": "string"}List pending invitations
/team/invitationsAuthorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Response Body
application/json
application/json
curl -X GET "https://example.com/team/invitations"{ "count": 0, "invitations": [ { "id": "string", "email": "string", "name": "string", "role": "owner", "status": "pending", "invitedBy": "string", "expiresAt": "string", "resendCount": 0, "lastSentAt": "string", "createdAt": "string" } ]}{ "error": "string"}Invite a team member
/team/invitationsAuthorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://example.com/team/invitations" \ -H "Content-Type: application/json" \ -d '{ "email": "string", "role": "admin" }'{ "status": "invited", "invitation": { "id": "string", "email": "string", "name": "string", "role": "owner", "status": "pending", "invitedBy": "string", "expiresAt": "string", "resendCount": 0, "lastSentAt": "string", "createdAt": "string" }}{ "error": "string"}Resend an invitation
/team/invitations/{invitationId}/resendAuthorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Path Parameters
Response Body
application/json
application/json
curl -X POST "https://example.com/team/invitations/string/resend"{ "invitation": { "id": "string", "email": "string", "name": "string", "role": "owner", "status": "pending", "invitedBy": "string", "expiresAt": "string", "resendCount": 0, "lastSentAt": "string", "createdAt": "string" }}{ "error": "string"}Revoke an invitation
/team/invitations/{invitationId}Authorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Path Parameters
Response Body
application/json
application/json
curl -X DELETE "https://example.com/team/invitations/string"{ "invitationId": "string", "revoked": true}{ "error": "string"}Change a member's role
/team/members/{userId}/roleAuthorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X PATCH "https://example.com/team/members/string/role" \ -H "Content-Type: application/json" \ -d '{ "role": "admin" }'{ "userId": "string", "previousRole": "string", "newRole": "string"}{ "error": "string"}Remove a team member
/team/members/{userId}Authorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Path Parameters
Response Body
application/json
application/json
curl -X DELETE "https://example.com/team/members/string"{ "userId": "string", "removed": true}{ "error": "string"}Was this article helpful?

