Skip to main content
POST
/
workspaces
/
{workspaceId}
/
members
Add a member to a workspace
curl --request POST \
  --url https://api.altostrat.io/workspaces/{workspaceId}/members \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "user_id": "auth0|abcdef1234567890",
  "role": "viewer"
}'
{
  "user_id": "auth0|64f5a6b7c8d9e0f1a2b3c4d5",
  "workspace_id": "ws_a1b2c3d4e5f6g7h8",
  "role": "admin",
  "created_at": "2025-10-29T00:40:06.000000Z",
  "updated_at": "2025-10-29T00:40:06.000000Z"
}

Authorizations

Authorization
string
header
required

Enter your JWT in the format: Bearer {token}

Path Parameters

workspaceId
string
required

The ID of the workspace.

Example:

"ws_a1b2c3d4e5f6g7h8"

Body

application/json
user_id
string
required

The Auth0 User ID (sub) of the user to add.

Example:

"auth0|abcdef1234567890"

role
enum<string>
required

The role to assign to the new member.

Available options:
owner,
admin,
viewer
Example:

"viewer"

Response

The member was added successfully.

user_id
string

The unique identifier for the user (Auth0 sub).

Example:

"auth0|64f5a6b7c8d9e0f1a2b3c4d5"

workspace_id
string

The ID of the workspace this membership belongs to.

Example:

"ws_a1b2c3d4e5f6g7h8"

role
enum<string>

The role of the user within the workspace.

Available options:
owner,
admin,
viewer
Example:

"admin"

created_at
string<date-time>

The timestamp when the member was added.

Example:

"2025-10-29T00:40:06.000000Z"

updated_at
string<date-time>

The timestamp when the member's role was last updated.

Example:

"2025-10-29T00:40:06.000000Z"