Skip to main content
POST
/
api
/
v1
/
members
Add a member to the workspace
curl --request POST \
  --url https://app.sajn.se/api/v1/members \
  --header 'Content-Type: application/json' \
  --header 'authorization: <authorization>' \
  --data '
{
  "email": "jsmith@example.com",
  "roleId": "<string>",
  "sendInvite": true
}
'
{
  "userId": "<string>",
  "email": "<string>",
  "name": "<string>",
  "roleId": "<string>",
  "roleName": "<string>",
  "workspaceId": "<string>",
  "organizationId": "<string>",
  "invited": true,
  "addedAt": "<unknown>"
}

Documentation Index

Fetch the complete documentation index at: https://docs.sajn.se/llms.txt

Use this file to discover all available pages before exploring further.

Headers

authorization
string
required

Bearer token for API authentication

Body

application/json

Body

Add a member to the workspace

email
string<email>
required

User email

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

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

sendInvite
boolean
default:true
required

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

Response

Workspace member

Workspace member

userId
string | null
required

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

email
string
required
name
string | null
required
roleId
string
required

The immutable role identifier

roleName
string
required

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

workspaceId
string
required
organizationId
string
required
invited
boolean
required

True if an invitation was sent rather than an immediate add

addedAt
any
required