Add a member to the workspace
2026-09, which is deprecated and stops working on October 1, 2027. To move your integration, see Upgrading to 2026-10.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.
AuthorizationBearer <token>Personal API key, e.g. Authorization: Bearer sajn_sk_.... Not scope-limited — acts as the issuing user.
Idempotency-Key?stringMakes 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.
length <= 255Body
application/json- body
Add a member to the workspace
email*stringUser email
^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$emailroleId*stringWorkspace role ID. Look up available role IDs via GET /api/v1/workspace-roles.
sendInvite*booleanIf the user does not already exist, send an invitation email
trueWorkspace member
application/json- response
Workspace member
userId*|Null when an invite was sent for a non-existent user
email*stringname*string|nullroleId*stringThe immutable role identifier
roleName*stringHuman-readable role name (may be renamed by org admins)
workspaceId*stringorganizationId*stringinvited*booleanTrue if an invitation was sent rather than an immediate add
addedAt*unknowncurl -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}'{ "userId": "string", "email": "string", "name": "string", "roleId": "string", "roleName": "string", "workspaceId": "string", "organizationId": "string", "invited": true, "addedAt": null}Was this page helpful?