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

Delete a workspace

DELETE
https://openrouter.ai/api/v1/workspaces/:id
DELETE
/api/v1/workspaces/:id
$curl -X DELETE https://openrouter.ai/api/v1/workspaces/production \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{}'
1{
2 "deleted": true
3}

Delete an existing workspace. The default workspace cannot be deleted. Workspaces with active API keys cannot be deleted. Management key required.

Was this page helpful?
Previous

Update 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

Response

Workspace deleted successfully
deletedtrue
Confirmation that the workspace was deleted

Errors

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