For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
ModelsChatRankingsDocs
DocsAPI ReferenceClient SDKsAgent SDKCookbookChangelog
DocsAPI ReferenceClient SDKsAgent SDKCookbookChangelog
  • API Guides
    • Overview
    • Streaming
    • Embeddings
    • Limits
    • Authentication
    • Parameters
    • Errors and Debugging
  • API Reference
      • GETList workspaces
      • POSTCreate a workspace
      • GETGet a workspace
      • DELDelete a workspace
      • PATCHUpdate a workspace
      • POSTBulk add members to a workspace
      • POSTBulk remove members from a workspace
LogoLogo
ModelsChatRankingsDocs
API ReferenceWorkspaces

Bulk add members to a workspace

POST
https://openrouter.ai/api/v1/workspaces/:id/members/add
POST
/api/v1/workspaces/:id/members/add
$curl -X POST https://openrouter.ai/api/v1/workspaces/production/members/add \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "user_ids": [
> "user_abc123",
> "user_def456"
> ]
>}'
1{
2 "added_count": 1,
3 "data": [
4 {
5 "created_at": "2025-08-24T10:30:00Z",
6 "id": "660e8400-e29b-41d4-a716-446655440000",
7 "role": "member",
8 "user_id": "user_abc123",
9 "workspace_id": "550e8400-e29b-41d4-a716-446655440000"
10 }
11 ]
12}

Add multiple organization members to a workspace. Members are assigned the same role they hold in the organization. Management key required.

Was this page helpful?
Previous

Bulk remove members from a workspace

Next
Built with

Authentication

AuthorizationBearer
API key as bearer token in Authorization header

Path parameters

idstringRequired>=1 character

The workspace ID (UUID) or slug

Request

This endpoint expects an object.
user_idslist of stringsRequired
List of user IDs to add to the workspace. Members are assigned the same role they hold in the organization.

Response

Members added successfully
added_countinteger
Number of workspace memberships created or updated
datalist of objects
List of added workspace memberships

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
500
Internal Server Error