Skip to content

mode_mismatch (403)

← Error reference

mode_mismatch

HTTP status: 403

Retryable: No — retrying without changes will fail the same way.

A live key was used to access a test resource (or vice versa).

When it fires

API keys are partitioned into `live` and `test` modes. Resources are likewise partitioned and a key cannot read or modify resources from the other mode.

How to handle it

Confirm which mode created the resource and use a key from that mode. In `test` mode, recreate the resource if you no longer have access to a `test` key.

Example response

{
  "error": {
    "type": "https://docs-dev.autohost-dev.uk/api/errors/mode_mismatch",
    "code": "mode_mismatch",
    "message": "Resource belongs to a different mode",
    "request_id": "req_01HEXAMPLE0000000000000000",
    "doc_url": "https://docs-dev.autohost-dev.uk/api/errors/mode_mismatch"
  }
}