WorkspacesAdd or create member

Add or create member

Add a user to the workspace by email.

  • If a user with this email already exists, they are added to the workspace (any password in the body is ignored — existing accounts are never modified).
  • If no user exists and a password is supplied, a new login-capable account is created (pre-verified) with that password and added to the workspace.
  • If no user exists and no password is supplied, returns 404 (unchanged legacy behaviour).

Requires a platform API key (sk_user_...). Workspace keys are rejected with 403. Requires invite permission: owner/admin can always invite, members can invite only if settings.allowMemberInvites is enabled.

curl -X POST "https://api.sendkit.ai/v1/workspaces/example_string/members" \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -d '{
  "email": "newmember@example.com",
  "role": "member",
  "password": "s3curePass1"
}'
{
  "success": true,
  "data": {
    "message": "Member added",
    "userId": "665d3e4f5a6b7c8d9e0f1a2b",
    "created": false
  }
}
POST
/v1/workspaces/{workspaceId}/members
POST
Base URLstring

Target server for requests. Edit to use your own host.

API Key (header: X-Api-Key)
X-Api-Keystring
Required

Platform API key (sk_user_...) or Workspace API key (sk_...)

Platform API key (sk_user_...) or Workspace API key (sk_...)
Content-Typestring
Required

The media type of the request body

Options: application/json
emailstring
Required

Email address of the user to add. Need not be a registered user if password is provided.

Format: email
rolestring

Role to assign. Defaults to workspace's settings.defaultRole if omitted.

Options: admin, member
passwordstring

Only used when no account exists for email. Creates a new user with this password (min 8 chars, at least one letter and one number). Ignored if the user already exists.

Min length: 8
namestring

Optional display name for a newly created user. Defaults to the email local-part.

Request Preview
Response

Response will appear here after sending the request

Authentication

header
X-Api-Keystring
Required

API Key for authentication. Platform API key (sk_user_...) or Workspace API key (sk_...)

Path Parameters

Body

application/json
emailstring
Required

Email address of the user to add. Need not be a registered user if password is provided.

rolestring

Role to assign. Defaults to workspace's settings.defaultRole if omitted.

Allowed values:adminmember
passwordstring

Only used when no account exists for email. Creates a new user with this password (min 8 chars, at least one letter and one number). Ignored if the user already exists.

namestring

Optional display name for a newly created user. Defaults to the email local-part.

Responses