Contract
- shape
- entity
- authority
- act
- evidence
- none
- subscription
- false
- permission
- any one of: self.read (the signed-in caller, about themself only; it names no other user); a deactivated caller is refused first
- idempotency
- natural
- emits
- session.mode_changed
- MCP tool
- set_session_mode
- decision_set
- approve, reject
- REST
- POST https://api.containertradehq.com/v1/cap/set_session_mode
Through MCP this call returns an approval request first; see Approvals.
Idempotency: keyed by the contract's own inputs: the same inputs replay the first call's result
Inputs
| name | type | required | validation |
|---|---|---|---|
| mode | one_of | required | one of live, test live or test. |
Response
mode· string · The session's mode now.org_id· stringnull · The org the session now acts in: the live org, or its twin in test. Null for a session that has selected no org.live_org_id· stringnull · The live org, whose people these are.
Full JSON Schema
{
"type": "object",
"properties": {
"mode": {
"type": "string",
"enum": [
"live",
"test"
],
"description": "The session's mode now.",
"x-data-class": "operational"
},
"org_id": {
"type": [
"string",
"null"
],
"minLength": 1,
"maxLength": 20,
"pattern": "^[A-Za-z0-9_-]{1,20}$",
"format": "tradehq-org-id",
"description": "The org the session now acts in: the live org, or its twin in test. Null for a session that has selected no org.",
"x-data-class": "operational"
},
"live_org_id": {
"type": [
"string",
"null"
],
"minLength": 1,
"maxLength": 20,
"pattern": "^[A-Za-z0-9_-]{1,20}$",
"format": "tradehq-org-id",
"description": "The live org, whose people these are.",
"x-data-class": "operational"
}
},
"required": [
"mode",
"org_id",
"live_org_id"
],
"additionalProperties": false
} Refusals
not yet declared
The platform refusals apply to every call: version, authentication, authority, validation and rate limits, each in the same envelope.
Surfaces
- MCP: approval required
- Voice: degraded: confirmation
- OneBox: no document originates a mode switch
- Outbound: crosses to no counterparty
Events
session.mode_changedplanned_webhook
Related
None.