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 remove members from a workspace

POST
https://openrouter.ai/api/v1/workspaces/:id/members/remove
POST
/api/v1/workspaces/:id/members/remove
$curl -X POST https://openrouter.ai/api/v1/workspaces/production/members/remove \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "user_ids": [
> "user_abc123",
> "user_def456"
> ]
>}'
1{
2 "removed_count": 2
3}

Remove multiple members from a workspace. Members with active API keys in the workspace cannot be removed. Management key required.

Was this page helpful?
Previous
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 remove from the workspace

Response

Members removed successfully
removed_countinteger
Number of members removed

Errors

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