HTTP 403 Workspace mismatch. An API key bound to one workspace sends another workspaceId in the path, query, or body of an execute call.
When it happens
Only codemode.request() in the MCP execute tool returns it, as data with ok: false.
Response body
{
"type": "https://pubnio.com/docs/problems/workspace-mismatch/",
"status": 403,
"title": "Workspace mismatch",
"detail": "This API key is bound to a different workspace. Omit workspaceId or use codemode.workspaceId.",
"code": "workspace_mismatch",
"param": "workspaceId",
"nextAction": "Omit workspaceId or send 1d3e5f70-2a4b-4c6d-8e0f-123456789abc.",
"requestId": "0f8e4c2a-6b1d-4e3f-8a9b-7c6d5e4f3a21"
}| Field | Type | Always present |
|---|---|---|
param |
string | No |
nextAction |
string | Yes |
Recovery for agents
- Omit
workspaceId: the sandbox fills incodemode.workspaceId. - Do what
nextActionsays. paramis the field to change.
Retryable
No: no SDK runs in the sandbox and no Retry-After header comes back. Run unchanged, the same script fails the same way.
Limits
- Match on
typeorcode, not ondetail.