HTTP 400 Invalid API path. codemode.request() got a path that is not a relative /api/v1/ path on the PubNio origin.
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/invalid-path/",
"status": 400,
"title": "Invalid API path",
"detail": "Only /api/v1/* API paths are callable.",
"code": "invalid_path",
"param": "path",
"nextAction": "Call search to look up an allowed /api/v1/* path in the OpenAPI spec.",
"requestId": "0f8e4c2a-6b1d-4e3f-8a9b-7c6d5e4f3a21"
}| Field | Type | Always present |
|---|---|---|
param |
string | No |
nextAction |
string | Yes |
Recovery for agents
- 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.