Keys and scopes
Every v3 call carries a test or live key. This page lists which keys work, what each scope opens, and every answer you get when a key is refused.
The header
Send your key as a bearer token on every call to https://api.opheliaos.com/v3/…. v3 takes the same test (oph_test_) and live (oph_live_) keys as v1. Get one on the API Keys page: Issue API key makes a test key, and a live key comes from a project's Go live step.
opheliapractice.com is pretend. On any other site a booking made with a test key is real: it charges the card and cannot be cancelled through Ophelia. This is the same as v1, where test keys reach real venues.Beta keys are no longer issued. A key starting oph_beta_ made earlier keeps working on /v3 only, with v3:search and v3:book (and v3:sites:read if the API issued it).
Scopes
v3:searchPOST /v3/search, POST /v3/availability, GET /v3/verticals.v3:bookPOST /v3/bookings, GET /v3/bookings/{booking_id}, continue, abandon, and every /v3/sessions route. Also search, availability and GET /v3/verticals.v3:sites:readGET /v3/verticals.v3:actauthorize.max_commitment: "commit". Such a read is refused either way: 403 insufficient_scope without it, 409 commitment_refused with it. It opens nothing you can use. v3:book alone lets a booking commit.These are the scopes of keys made on the dashboard. A test key holds the v1 scopes plus v3:search and v3:book. A live key made in a project holds v3:search, and v3:book only when the project has a site switched on; without it, booking calls answer 403 insufficient_scope. A test or live key made outside a project holds the v1 scopes plus v3:search and v3:book. No key the dashboard makes holds v3:act.
A key made on the dashboard drives only the sites switched on for it. Any other site answers 403 merchant_not_enabled_for_key before anything is driven. A site covers its subdomains, and a path narrows it (amazon.com/fresh). opheliapractice.com is always allowed. A key with no list, made before keys carried one, is not restricted.
Scope by route
POST /v3/searchv3:search or v3:bookPOST /v3/availabilityv3:search or v3:bookPOST /v3/bookingsv3:bookGET /v3/bookings/{booking_id}v3:bookPOST /v3/bookings/{attempt_id}/continuev3:bookPOST /v3/bookings/{attempt_id}/abandonv3:bookPOST /v3/bookings/{booking_id}/cancel, /modifyPOST /v3/sessions and every /v3/sessions/… routev3:bookGET /v3/verticalsv3:sites:read, v3:search or v3:bookGET /v3/GET /v3/correctionsRate limits by route: Endpoints.
Refusals
These come before anything runs. None of them did anything on a site. wrong_key_environment, no_organization and v3_disabled carry the code in error_code. unauthorized and org_suspended carry it in both error and error_code. insufficient_scope, billing_required, free_tier_exhausted and billing_check_unavailable carry it in error, with no error_code.
unauthorizedwrong_key_environment/v3, or a beta key on /v1. Use a test or live key.insufficient_scopeaccepted_scopes lists the scopes that would do. Ask for one, or use a key that has it. A search or availability read at commit on a key without v3:act answers this too.merchant_not_enabled_for_keymerchant and allowed_sites. Turn the site on for the key in the dashboard, or use a key that has it.no_organizationorg_suspendedmessage (and reason, when set) says why.free_tier_exhaustedbilling_requiredbilling_check_unavailableentitlement_check_unavailablev3_disabledGET /v3/ still answers 200 with "enabled": false.The bodies, exactly:
Billing is the same on /v1 and /v3. A test key works while your organization's free allowance lasts: 3 confirmed bookings, shared by v1 test bookings and v3 test-key bookings. A v3 test-key booking counts once, when it succeeds. Bookings on the practice site never count. A live key, or an earlier beta key, needs a payment method on file.
Body and field checks that come next: Request rules. Too many calls: Rate limits.