Bulk add members to a workspace
Changed onAdd multiple organization members to a workspace. New members are assigned the workspace role that matches their organization role. Users who are already members of the workspace keep their current role and are not included in the response. Management key required.
Request
- Base URLhttps://openrouter.ai/api/v1
- AuthHTTP bearer
Path parameters
The workspace ID (UUID) or slug
Request body
List of user IDs to add to the workspace. New members are assigned the workspace role that matches their organization role; users already in the workspace keep their current role.
Example request
{
"user_ids": [
"user_abc123",
"user_def456"
]
}Response
Members added successfully
Number of workspace memberships created
List of added workspace memberships
Example response
{
"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"
}
]
}Changes
- warning
added the new
restricted_viewerenum value to thedata/items/roleresponse property for the response status - warning
added the new
viewerenum value to thedata/items/roleresponse property for the response status
- warning
- info
added the optional property
openrouter_metadatato the response with the status
4 more changes in this revision
- info