Skip to Content

Add a member to the workspace

You're viewing API version 2026-09, which is deprecated and stops working on October 1, 2027. To move your integration, see Upgrading to 2026-10.
POST
/api/v1/members

Add an existing organization member to this workspace, or invite a new user to the org and grant them workspace access.

If the email matches an existing org member, they are added directly. Otherwise an invitation email is sent (when sendInvite is true) and invited: true is returned.

roleId must reference a workspace role on the current workspace — discover available roles via GET /api/v1/workspace-roles.

Permission required: MANAGE_MEMBERS on the workspace.

Authorization

headerAuthorizationBearer <token>

Personal API key, e.g. Authorization: Bearer sajn_sk_.... Not scope-limited — acts as the issuing user.

Header Parameters

authorization*string

Bearer token for API authentication

Idempotency-Key?string

Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header Idempotent-Replayed: true); the same key with a different request returns 400.

Lengthlength <= 255

Request Body

Body

application/json
  1. body

Add a member to the workspace

email*string

User email

Match^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
Formatemail
roleId*string

Workspace role ID. Look up available role IDs via GET /api/v1/workspace-roles.

sendInvite*boolean

If the user does not already exist, send an invitation email

Defaulttrue

Response Body

Workspace member

application/json
  1. response

Workspace member

userId*|

Null when an invite was sent for a non-existent user

email*string
name*string|null
roleId*string

The immutable role identifier

roleName*string

Human-readable role name (may be renamed by org admins)

workspaceId*string
organizationId*string
invited*boolean

True if an invitation was sent rather than an immediate add

addedAt*unknown
Example Request
curl -X POST 'https://app.sajn.se/api/v1/members' \  -H 'authorization: string' \  -H 'Content-Type: application/json' \  -d '{  "email": "user@example.com",  "roleId": "string",  "sendInvite": true}'
Example Response
{  "userId": "string",  "email": "string",  "name": "string",  "roleId": "string",  "roleName": "string",  "workspaceId": "string",  "organizationId": "string",  "invited": true,  "addedAt": null}

Was this page helpful?