Skip to main content
POST
/
workspaces
/
{id}
/
members
/
add
Bulk add members to a workspace
curl --request POST \
  --url https://openrouter.ai/api/v1/workspaces/{id}/members/add \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "user_ids": [
    "user_abc123",
    "user_def456"
  ]
}
'
{
  "added_count": 1,
  "data": [
    {
      "created_at": "2025-08-24T10:30:00Z",
      "id": "660e8400-e29b-41d4-a716-446655440000",
      "role": "member",
      "user_id": "user_abc123",
      "workspace_id": "550e8400-e29b-41d4-a716-446655440000"
    }
  ]
}

Authorizations

Authorization
string
header
required

API key as bearer token in Authorization header

Path Parameters

id
string
required

The workspace ID (UUID) or slug

Minimum string length: 1
Example:

"production"

Body

application/json
user_ids
string[]
required

List of user IDs to add to the workspace. Members are assigned the same role they hold in the organization.

Required array length: 1 - 100 elements
Example:
["user_abc123", "user_def456"]

Response

Members added successfully

added_count
integer
required

Number of workspace memberships created or updated

Example:

2

data
object[]
required

List of added workspace memberships