Errors
Error shape, codes, rate limits, and how to handle retries safely with idempotency keys.
Errors return a non-2xx status with a JSON body. error is always present. Where a refusal has a stable, machine-readable name it is in error_code; branch on that, not on the wording of error. A few older refusals put their code in error itself (billing_required, free_tier_exhausted, rate_limited, insufficient_scope).
The free allowance belongs to test keys and is counted per organization in confirmed test bookings, not calls, shared by /v1 test bookings and /v3 test-key bookings: searches and unconfirmed attempts never use it up. Once it is used up, test keys get 402 free_tier_exhausted on every /v1 and /v3 call, practice included, and adding billing does not reset it: switch to a live key. Live keys (and existing beta keys) never use the allowance; they need billing set up, and without it get 402 billing_required.
What a key is allowed to do
A key does what its scopes allow; anything else answers 403 insufficient_scope (above). A key made on the dashboard also uses only the merchants switched on for it: any other provider, or v3 site, answers 403 merchant_not_enabled_for_key naming it in merchant, with the key's allowed_providers (or allowed_sites). A search that names no provider runs on the key's own. Practice venues are always allowed, and a key with no list is not restricted. Webhooks go to your organization's default URL; there is no per-booking or per-key webhook URL. v3 bookings send v3.booking.* events: see v3 webhooks.
AgentCard payment
Codes from AgentCard bookings (payment_collection: "agentcard_external"). HTTP codes come back on the call; the rest appear as the failed booking's error_code.
vault_unavailableagentcard_disabledpayment_declinedpayment_approval_expiredpayment_outcome_unknownpayment_setup_failedpayment_replay_failedcard_declinedOther codes
missing_last_nameslot_not_offeredwrong_key_environmentorg_suspendedmodify_unsupportedsearch_failedavailability_failedno_search_providerbilling_check_unavailable, entitlement_check_unavailablecontinue_not_queuedSession codes (live_key_required, invalid_code, reconnect_required and others) are listed on Sessions. A booking whose provider failed is not an HTTP error: it comes back with status: "failed" and its own error_code; see Booking lifecycle.
Rate limits
Limits are per organization, shared by all its API keys, over a fixed 5-minute window. Every metered response carries RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset (seconds until the window resets). Over the limit you get 429 rate_limited with a Retry-After header.
POST /v1/venues/searchPOST /v1/availability/searchPOST /v1/bookingsPOST /v1/bookings/{id}/continueGET /v1/bookings/{id}POST /v1/bookings/{id}/cancelPOST /v1/bookings/{id}/modifyPOST /v1/sessions, POST /v1/sessions/{id}/verifyGET /v1/sessions/{id}/card, GET /v1/sessions/cardGET /v1/sessions/{id}/health, GET /v1/sessions/healthRetrying safely
Send an Idempotency-Key header on POST /v1/bookings. Sending the same key again returns the booking it first created and starts nothing new; the key never expires and the body is not compared. Details are on Booking lifecycle. A 5xx or a timeout on create may still have made a booking: retry with the same key rather than a new one.