PricingBlogEnterpriseAPI
Log inStart free
Log inStart free

06 / Endpoints

Members

Invite a member to the organisation

API key required
POST/api/enterprise/v1/organizations/{orgId}/members/invite

Invites a creator to the organisation and sends the invitation email.

The response status is INVITED, which means they are not an organisation member yet. The creator has to accept through the link in the email to become ACTIVE, and until then they cannot be assigned to a workspace (an assignment returns 404).

userId comes back as null, because no account is linked yet. To cancel this invitation, pass the response's id to DELETE .../members/{userId}.

Path parameters

FieldTypeRequiredDescription
orgIdstringRequiredOrganization IDExample: org_cuid123abc

Request body

FieldTypeRequiredDescription
emailstringRequiredEmail address of the person to invitemaxLength 320 · email | Example: creator@example.com
roleenumRequiredRole inside the organisationAllowed: ADMIN · MEMBER | Example: MEMBER
Request example
{
  "email": "creator@example.com",
  "role": "MEMBER"
}

Responses

StatusMeaning
201Invitation created (not yet accepted)
400Bad request (validation failed)PartnerErrorResponse
401Authentication failed (API key missing or invalid)PartnerErrorResponse
403Forbidden (no access to that organisation)PartnerErrorResponse
404Resource not foundPartnerErrorResponse
429Rate limit exceededPartnerErrorResponse
503Rate limit service temporarily unavailablePartnerErrorResponse

Responses 201

FieldTypeRequiredDescription
requestIdstringRequired
idstringRequiredMembership ID. Use this value to cancel the invitation.
userIdstring | nullRequired
emailstringRequired
rolestringRequired
statusstringRequiredExample: INVITED
Response example
{
  "requestId": "string",
  "id": "string",
  "userId": "string",
  "email": "string",
  "role": "string",
  "status": "INVITED"
}

Organisation member list

API key required
GET/api/enterprise/v1/organizations/{orgId}/members

Returns only ACTIVE members who have accepted. Someone who was invited but has not accepted yet is not included. email is a case-insensitive partial-match filter.

This list is exactly who can be assigned to a workspace.

Path parameters

FieldTypeRequiredDescription
orgIdstringRequiredOrganization IDExample: org_cuid123abc

Query parameters

FieldTypeRequiredDescription
emailstringOptionalEmail partial-match filter (case-insensitive)Example: creator@
pagestringOptionalPage number (default 1)Example: 1
limitstringOptionalItems per page (default 15, max 100)Example: 15

Request body

This endpoint takes no request body.

Responses

StatusMeaning
200Member list
400Bad request (validation failed)PartnerErrorResponse
401Authentication failed (API key missing or invalid)PartnerErrorResponse
403Forbidden (no access to that organisation)PartnerErrorResponse
404Resource not foundPartnerErrorResponse
429Rate limit exceededPartnerErrorResponse
503Rate limit service temporarily unavailablePartnerErrorResponse

Responses 200

FieldTypeRequiredDescription
requestIdstringRequired
organizationIdstringRequired
members[]object[]Required
userIdstringRequired
emailstringRequired
namestringRequired
rolestringRequired
joinedAtstringRequired
paginationobjectRequired
pagenumberRequired
limitnumberRequired
totalnumberRequired
hasMorebooleanRequired
Response example
{
  "requestId": "string",
  "organizationId": "string",
  "members": [
    {
      "userId": "string",
      "email": "string",
      "name": "string",
      "role": "string",
      "joinedAt": "string"
    }
  ],
  "pagination": {
    "page": 0,
    "limit": 0,
    "total": 0,
    "hasMore": false
  }
}

Change an organisation member's role

API key required
PATCH/api/enterprise/v1/organizations/{orgId}/members

The target is given as userId in the body. Demoting the last ADMIN to MEMBER is refused.

Path parameters

FieldTypeRequiredDescription
orgIdstringRequiredOrganization IDExample: org_cuid123abc

Request body

FieldTypeRequiredDescription
userIdstringRequiredMember whose role to changeExample: usr_cuid789ghi
roleenumRequiredAllowed: ADMIN · MEMBER
Request example
{
  "userId": "usr_cuid789ghi",
  "role": "ADMIN"
}

Responses

StatusMeaning
200Changed
400Bad request (validation failed)PartnerErrorResponse
401Authentication failed (API key missing or invalid)PartnerErrorResponse
403Forbidden (no access to that organisation)PartnerErrorResponse
404Resource not foundPartnerErrorResponse
429Rate limit exceededPartnerErrorResponse
503Rate limit service temporarily unavailablePartnerErrorResponse

Responses 200

No body.

Remove a member from the organisation / cancel an invitation

API key required
DELETE/api/enterprise/v1/organizations/{orgId}/members/{userId}

Removes an organisation member, or cancels an invitation that has not been accepted. Their workspace memberships are cleaned up as well.

To cancel an invitation before acceptance, pass the invitation response's id (membershipId). At that point there is no userId, so nothing else identifies them.

Path parameters

FieldTypeRequiredDescription
orgIdstringRequiredOrganization IDExample: org_cuid123abc
userIdstringRequiredUser ID. To cancel an invitation that has not been accepted, pass the invitation response's id (membershipId).Example: usr_cuid789ghi

Request body

This endpoint takes no request body.

Responses

StatusMeaning
200Removed
400Bad request (validation failed)PartnerErrorResponse
401Authentication failed (API key missing or invalid)PartnerErrorResponse
403Forbidden (no access to that organisation)PartnerErrorResponse
404Resource not foundPartnerErrorResponse
429Rate limit exceededPartnerErrorResponse
503Rate limit service temporarily unavailablePartnerErrorResponse

Responses 200

No body.

Assign a member to a workspace

API key required
PUT/api/enterprise/v1/organizations/{orgId}/workspaces/{workspaceId}/members/{userId}

Assigns a member to a workspace. If they are already in it, only the role changes (idempotent).

There is no acceptance step — it takes effect as soon as you call it. The target's organisation membership must be ACTIVE, though: if they have not accepted their invitation yet it is refused with 404 Active organization member not found.

Path parameters

FieldTypeRequiredDescription
orgIdstringRequiredOrganization IDExample: org_cuid123abc
workspaceIdstringRequiredWorkspace IDExample: ws_cuid456def
userIdstringRequiredUser ID (their organisation membership must be ACTIVE)Example: usr_cuid789ghi

Request body

FieldTypeRequiredDescription
roleenumRequiredAllowed: ADMIN · EDITOR · VIEWER | Example: EDITOR
Request example
{
  "role": "EDITOR"
}

Responses

StatusMeaning
200Assigned
400Bad request (validation failed)PartnerErrorResponse
401Authentication failed (API key missing or invalid)PartnerErrorResponse
403Forbidden (no access to that organisation)PartnerErrorResponse
404Resource not foundPartnerErrorResponse
429Rate limit exceededPartnerErrorResponse
503Rate limit service temporarily unavailablePartnerErrorResponse

Responses 200

No body.

Remove a member from a workspace

API key required
DELETE/api/enterprise/v1/organizations/{orgId}/workspaces/{workspaceId}/members/{userId}

Removes them from the workspace only. The organisation membership stays.

Path parameters

FieldTypeRequiredDescription
orgIdstringRequiredOrganization IDExample: org_cuid123abc
workspaceIdstringRequiredWorkspace IDExample: ws_cuid456def
userIdstringRequiredUser ID (their organisation membership must be ACTIVE)Example: usr_cuid789ghi

Request body

This endpoint takes no request body.

Responses

StatusMeaning
200Removed
400Bad request (validation failed)PartnerErrorResponse
401Authentication failed (API key missing or invalid)PartnerErrorResponse
403Forbidden (no access to that organisation)PartnerErrorResponse
404Resource not foundPartnerErrorResponse
429Rate limit exceededPartnerErrorResponse
503Rate limit service temporarily unavailablePartnerErrorResponse

Responses 200

No body.