Overrides
Enable or disable individual mocks on a session — without replacing the whole set.
On this page
Sometimes you want one extra mock on top of a scenario, or a surgical toggle without rewriting the full overrides array. These endpoints do exactly that.
POST /sessions/:sessionKey/overrides/:overrideId
Enable one published mock for the session. Creates the session if it doesn't exist. Idempotent.
bash
curl -X POST "$BASE/sessions/ci-42/overrides/ovr_extraMock?project=checkout&environment=staging" \
-H "Authorization: Bearer $KEY"Response:
json
{ "overrideId": "ovr_extraMock", "active": true }Errors
404 not_found— override doesn't exist422 invalid_override— scenario-local override (can't toggle individually) or bad id
DELETE /sessions/:sessionKey/overrides/:overrideId
Disable one mock for the session.
bash
curl -X DELETE "$BASE/sessions/ci-42/overrides/ovr_extraMock?project=checkout&environment=staging" \
-H "Authorization: Bearer $KEY"Response:
json
{ "overrideId": "ovr_extraMock", "active": false }Overrides vs PUT
| Approach | Best for |
|---|---|
PUT with overrides array | Declarative exact-set — "these and only these" |
POST / DELETE per override | Incremental tweaks on top of a scenario |
Product context
Mocks must be published before they can be activated. Mocks and overrides guide →