API referenceagents
Approve proposal
POST
/v1/agent-proposals/{proposalId}/approveIdempotency-Key requiredAccepts bearer
A human approves an OPEN proposal; it executes once
HUMAN SESSION ONLY, with agents:act: an agent's proposal can never be approved by another agent — an API key or a service token is 403 PERMISSION_DENIED details.reason SESSION_REQUIRED.Show more
HUMAN SESSION ONLY, with agents:act: an agent's proposal can never be approved by another agent — an API key or a service token is 403 PERMISSION_DENIED details.reason SESSION_REQUIRED. An MCP grant-derived token is likewise 403 PERMISSION_DENIED details.reason SESSION_REQUIRED, details.credential mcp-grant: an agent acting for a human is never that human's session. Preconditions are re-validated at approval time. What the human approves is the proposal's server-derived executionSummary; if the stored execution no longer matches the approved resource or amount, nothing executes and the answer is 409 CONFLICT details.reason EXECUTION_MISMATCH. A proposal that is not OPEN (EXECUTING, APPROVED, REJECTED, EXPIRED, EXECUTION_UNKNOWN) is 409 CONFLICT details.reason WRONG_STATE with details.state; a paused agent 409 CONFLICT AGENT_PAUSED. The same Idempotency-Key replays the stored answer, so the action executes at most once. Emits agent.proposal.approved. Approve claims the proposal (OPEN to EXECUTING) and runs its verb once. Any failure that may have dispatched makes it EXECUTION_UNKNOWN: terminal for the API, the grant stays spent, the verb is never retried, and the desk resolves it. A stale EXECUTING (a crash mid-run) is likewise resolved by the desk to EXECUTION_UNKNOWN. Expiry applies only to OPEN: an EXECUTING or EXECUTION_UNKNOWN proposal never expires. Any failure after the claim that is not proven undispatched answers 500 INTERNAL details.reason EXECUTION_UNKNOWN, never a retryable INTERNAL. The ambiguous answer carries details.proposalId and emits agent.proposal.execution_unknown so the desk reconciles it; do not re-approve, read GET /v1/agent-proposals/{proposalId}.Path parameters
- proposalIdstringRequiredAn agent proposal id
Headers
- Idempotency-KeystringRequired
Mandatory on mutations: **48h TTL**; replay with same body-hash returns the original response with Idempotency-Replayed true; same key + different body is 409 IDEMPOTENCY_CONFLICT; in-flight duplicate…Show more
Mandatory on mutations: **48h TTL**; replay with same body-hash returns the original response with Idempotency-Replayed true; same key + different body is 409 IDEMPOTENCY_CONFLICT; in-flight duplicate is 409 IDEMPOTENCY_IN_PROGRESS.
Request body
- approvalTokenstringOptionalRequired when requiresApprovalToken is true (400 VALIDATION otherwise)
- reasonstringOptional
Responses
- 200APPROVED and executed; approvalTokenId names the grant it consumedConsoleAgentProposal
- 400VALIDATION or UNKNOWN_DOMAINApiErrorResponse
- 401ApiErrorResponse
UNAUTHENTICATED — missing or expired token.Show more
UNAUTHENTICATED — missing or expired token. Declared on every operation because `security` is declared globally at the document root: every route is authenticated, so every route can answer 401. - 403ApiErrorResponse
- 404NOT_FOUND — unknown or expired ref (unguessable refs, 15)ApiErrorResponse
- 405ApiErrorResponse
VALIDATION — the public edge serves GET, POST, PUT, PATCH and DELETE only; any other method is refused before the platform sees it (details.reason METHOD_NOT_ALLOWED, details.source edge).Show more
VALIDATION — the public edge serves GET, POST, PUT, PATCH and DELETE only; any other method is refused before the platform sees it (details.reason METHOD_NOT_ALLOWED, details.source edge). Not retryable as sent. - 409ApiErrorResponse
CONFLICT details.reason WRONG_STATE (the proposal is not OPEN, including EXECUTING — details.state) or AGENT_PAUSED | EXECUTION_MISMATCH (the stored execution no longer matches the approved resource…Show more
CONFLICT details.reason WRONG_STATE (the proposal is not OPEN, including EXECUTING — details.state) or AGENT_PAUSED | EXECUTION_MISMATCH (the stored execution no longer matches the approved resource or amount; nothing executed) | PRICE_CHANGED | IDEMPOTENCY_CONFLICT | IDEMPOTENCY_IN_PROGRESS - 413ApiErrorResponse
VALIDATION — the request body is larger than the surface's limit.Show more
VALIDATION — the request body is larger than the surface's limit. Not retryable as sent: shrink the body. Declared on every operation that takes a request body. details carries exactly one key, maxBodyBytes (integer): the limit that applies to this surface, in bytes. - 414ApiErrorResponse
VALIDATION — the request URI (path and query string) is longer than 8 KiB; the public edge refuses it before the platform sees it (details.reason URI_TOO_LONG, details.source edge).Show more
VALIDATION — the request URI (path and query string) is longer than 8 KiB; the public edge refuses it before the platform sees it (details.reason URI_TOO_LONG, details.source edge). Not retryable as sent: send long input in the body of a POST. - 415ApiErrorResponse
VALIDATION — a request body that is not JSON (application/json or application/*+json; a form body only on the OAuth token routes).Show more
VALIDATION — a request body that is not JSON (application/json or application/*+json; a form body only on the OAuth token routes). The public edge refuses it before the platform sees it (details.reason UNSUPPORTED_MEDIA_TYPE, details.source edge). Not retryable as sent: send Content-Type application/json. Declared on every operation that takes a JSON request body. - 429ApiErrorResponse
RATE_LIMITED — the API key or its tenant is over a rate limit; wait for Retry-After, then retry.Show more
RATE_LIMITED — the API key or its tenant is over a rate limit; wait for Retry-After, then retry. Every routed request is counted against two token buckets, the key's and the tenant's (all its keys together): 50 requests a second with a burst of 100 on the standard plan. Every travel verb except polling a search also spends from a supplier budget, per key and per tenant: 10 requests a second with a burst of 20, and a plan may add a daily quota of supplier calls. Answers carry the IETF RateLimit header fields for the tightest bucket consulted (RateLimit-Limit, RateLimit-Remaining, RateLimit-Reset, RateLimit-Policy); a refusal adds Retry-After and details.scope (KEY or TENANT), details.budget (PLATFORM or SUPPLIER), details.reason (RATE or DAILY_QUOTA), details.tier and details.retryAfterMs. A sandbox may run with the limiter off, in which case none of these headers is sent. A search that is still warming is a different answer with a different meaning (keep polling). with the key-velocity check on, also details.reason VELOCITY_LIMIT, a soft breach of the API key's own scope (components/responses/VelocityLimited), nextAction slow_down. - 500ApiErrorResponse
INTERNAL with details.reason EXECUTION_UNKNOWN: approve claimed the proposal (EXECUTING) and the executed verb's outcome is not proven undispatched.Show more
INTERNAL with details.reason EXECUTION_UNKNOWN: approve claimed the proposal (EXECUTING) and the executed verb's outcome is not proven undispatched. Not retryable: read the proposal and let the desk resolve it. A failure proven NOT dispatched is not this answer; it is the verb's own error and the proposal returns to OPEN. - 502Also the order read routes (getOrder, listOrderDocuments, listOrderEvents, searchOrders) when the order store times out: details.store names the store, retryable true.ApiErrorResponse
- 503ApiErrorResponse
Errors you should handle
Branch on code and honour retryable — never on the HTTP status alone.
| 400 | VALIDATION message.intent.checkOut must be after message.intent.checkIn | not retryable |
| 400 | UNKNOWN_DOMAIN Unknown domain 'HOTELS'. Did you mean HTL? | not retryable |
| 401 | UNAUTHENTICATED The bearer token is expired. Re-authenticate and retry. | not retryable |
| 403 | PERMISSION_DENIED Proposals are approved by a signed-in person only. | not retryable |
| 404 | NOT_FOUND searchRef SR-F-7b31d0a9 is unknown or has expired; re-search | not retryable |
| 405 | VALIDATION This method is not served. | not retryable |
| 409 | CONFLICT Proposal prop_01J9ZK2 is EXPIRED and can no longer be decided. | not retryable |
| 409 | PRICE_CHANGED The price moved since this proposal was made. It was not executed. | not retryable |
| 409 | IDEMPOTENCY_CONFLICT Idempotency-Key 7f0c33d1-9a1e-4d2c-9f77-1c0f2b3a4d55 was used with a different body; never executed | not retryable |
| 409 | IDEMPOTENCY_IN_PROGRESS A request with this Idempotency-Key is still executing | retryable |
| 413 | VALIDATION The request body is larger than this API accepts (262144 bytes). | not retryable |
| 414 | VALIDATION The request URI is longer than 8 KiB. | not retryable |
| 415 | VALIDATION Send application/json. | not retryable |
| 429 | RATE_LIMITED Too many requests for this key on the supplier budget. Wait for the Retry-After interval before trying again. | retryable |
| 500 | INTERNAL The outcome of proposal prop_01J9ZK2 is unknown; it was not retried. The desk will resolve it. | not retryable |
| 502 | UPSTREAM_UNAVAILABLE Every supplier for HTL is circuit-open; no fan-out was attempted | retryable |
| 503 | PROVIDER_DOWN EXAMPLEHOTELS is unavailable; the order was not attempted and nothing was captured | retryable |