DocsAPI ReferenceInvite a user
POST
/api/v1/workspaces/{workspace_id}/membersSends 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-KeystringrequiredYour workspace API key (admin or owner).
Content-TypestringrequiredMust be `application/json`.
Request Body
application/json
emailstringrequiredEmail address to invite.
Example: "newuser@acme.com"
rolestringRole on acceptance. Default: `member`.
Example: "member"
adminmemberResponses
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.
Try it live
API Configurationglobal · all endpoints
POST
https://api.serveka.com/api/v1/workspaces/aaaaaaaa-0000-0000-0000-000000000001/membersPath Parameters
Request Body
curl -X POST 'https://api.serveka.com/api/v1/workspaces/aaaaaaaa-0000-0000-0000-000000000001/members' \
-H "Content-Type: application/json"\
-d '{
"email": "newuser@acme.com",
"role": "member"
}'