Workspace API

Workspace team

Workspace team endpoints of the Zanfia Workspace API, with schemas and code samples.

4 min readLast updated Jul 26, 2026

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

GET/team/members

Authorization

bearerAuth
AuthorizationBearer <token>

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

GET/team/invitations

Authorization

bearerAuth
AuthorizationBearer <token>

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

POST/team/invitations

Authorization

bearerAuth
AuthorizationBearer <token>

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

POST/team/invitations/{invitationId}/resend

Authorization

bearerAuth
AuthorizationBearer <token>

API key from Dashboard → Integrations → API, MCP and CLI.

In: header

Path Parameters

invitationId*string

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

DELETE/team/invitations/{invitationId}

Authorization

bearerAuth
AuthorizationBearer <token>

API key from Dashboard → Integrations → API, MCP and CLI.

In: header

Path Parameters

invitationId*string

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

PATCH/team/members/{userId}/role

Authorization

bearerAuth
AuthorizationBearer <token>

API key from Dashboard → Integrations → API, MCP and CLI.

In: header

Path Parameters

userId*string

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

DELETE/team/members/{userId}

Authorization

bearerAuth
AuthorizationBearer <token>

API key from Dashboard → Integrations → API, MCP and CLI.

In: header

Path Parameters

userId*string

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?

Related articles

Spotted something off? Tell us at support@zanfia.com.