Claude Admin API Workspace not_found_error — Wrong ID, Wrong Org, or No Access
Claude Admin API returned 404 not_found_error when you tried to access a workspace. The workspace_id might be wrong, might belong to a different org, or your admin key might not have workspace-scope access. This page covers workspace ID formats, org boundaries, and multi-workspace routing.
Workspace IDs are prefixed wrkspc_ — not to be confused with org IDs (org_). Confirm your admin key belongs to the org that owns the workspace. Use list_workspaces to enumerate valid IDs. Never hardcode workspace IDs across environments — store in config keyed by env name and validate at boot.
The Error Messages You're Seeing
# Wrong ID:
HTTP/1.1 404 Not Found
{"type":"error","error":{"type":"not_found_error",
"message":"Workspace wrkspc_01ABC not found in organization org_01XYZ."}}
# Cross-org 404 — workspace exists but different org:
{"type":"error","error":{"type":"not_found_error",
"message":"Workspace wrkspc_01ABC not accessible with the provided admin key.
Verify the key belongs to the correct organization."}}
# Malformed ID (swapped org_ for wrkspc_):
{"type":"error","error":{"type":"invalid_request_error",
"message":"Invalid workspace_id format. Expected 'wrkspc_' prefix followed
by 24 alphanumeric characters."}}
# Deleted workspace:
{"type":"error","error":{"type":"not_found_error",
"message":"Workspace wrkspc_01ABC has been deleted.
Deleted workspaces cannot be restored via API."}}
ID Prefixes Reference (Nov 2026)
| Prefix | Entity | Example | Scope |
|---|---|---|---|
org_ | Organization | org_01ABC… | Top-level container |
wrkspc_ | Workspace | wrkspc_01DEF… | Under one org |
usr_ | User (member) | usr_01GHI… | Global; can span orgs |
apikey_ | API key metadata | apikey_01JKL… | Per workspace or org |
invite_ | Pending invite | invite_01MNO… | Per org |
Never confuse org_ and wrkspc_ — swapping them is a top cause of 404s.
What Actually Causes This Error
Fixes That Work (Tested Nov 2026)
1Enumerate Workspaces Before Referencing
2Config-Driven Multi-Workspace Routing
3Handle Deleted Workspaces Gracefully
Preventing This Error Going Forward
- Never hardcode workspace_ids. Store in secret manager or config keyed by env name.
- Validate workspace_id prefix at every ingest point. Regex
^wrkspc_[a-zA-Z0-9]{24}$. - Cache workspace lookups but with TTL. Deleted workspaces don't fix themselves; expire cache.
- Track workspace_id → customer_id mapping in DB. Multi-tenant SaaS: never derive from user input.
- Log every 404 with request context. Reveals leaks and misrouting.
- Test the 'deleted workspace' scenario. Mock the 404 explicitly in integration tests.
- Distinguish 'not found' from 'access denied' in retries. Different recovery paths.
Researcher · AI Error Hub
Frequently Asked Questions
An organization is the top-level entity that owns billing, members, and admin keys. A workspace is a sub-scope within an org — you can have many workspaces per org, each with its own API keys and quotas. Confusing them is a common cause of 404s because they look similar.
No. Once deleted, a workspace_id is permanently retired. New workspaces get fresh IDs. This is intentional to prevent zombie references from resurrecting old data.
There's no direct move API. You must: (a) upload files/keys/members to the new workspace, (b) verify functionality, (c) delete from old. For customer migrations, script this and run during a maintenance window.
No. workspace_ids are globally unique but only accessible with an admin key from the owning org. Two orgs can't accidentally see each other's workspace metadata even if they somehow learn the ID.
Check client.beta.organizations.list() with any admin key — it returns all orgs your admin key can access. On the Console, org_id is visible under Settings → Organization Info.
Related Errors
Manage Multi-Workspace Claude Setups
Weekly: workspace patterns, key rotation, multi-tenant architectures for Claude. 12,000+ operators subscribe.
Subscribe Free →