DocsAPI ReferenceInvite a user
POST/api/v1/workspaces/{workspace_id}/members

Sends an invitation to the specified email. The invitee gets a 7-day link to accept. If a pending invitation already exists for that email, the expiry is refreshed and role updated (upsert). Requires `admin` or `owner` role.

Path Parameters

workspace_idstringrequirede.g. "aaaaaaaa-0000-0000-0000-000000000001"

Workspace UUID.

Headers

X-API-Keystringrequired

Your workspace API key (admin or owner).

Content-Typestringrequired

Must be `application/json`.

Request Body

application/json

emailstringrequired

Email address to invite.

Example: "newuser@acme.com"

rolestring

Role on acceptance. Default: `member`.

Example: "member"

adminmember

Responses

201Invitation created.
{
  "id": "bbbbbbbb-0000-0000-0000-000000000002",
  "workspace_id": "aaaaaaaa-0000-0000-0000-000000000001",
  "email": "newuser@acme.com",
  "role": "member",
  "status": "pending",
  "created_at": "2026-05-12T10:00:00Z",
  "expires_at": "2026-05-19T10:00:00Z"
}
400Invalid `role` value.
403Caller is `member` role.
404Workspace not found.