Get a test key, then make five calls on the practice site: search, read what is open, book at begin, book at commit with a code, and read the booking back.
Get a test key
Click Issue API key on the API keys page. A test key starts oph_test_ and holds v3:search and v3:book, which open every call below. It works while your organization's free allowance lasts: 3 confirmed bookings, shared with v1. Bookings on the practice site never count, but once the allowance is used up every test-key call, the practice site included, answers 402 free_tier_exhausted. A live key comes from a project's Go live step and needs billing set up (a payment method on the billing page). Keys and scopes has the details.
A test key drives the real site. Only 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. Every call below uses the practice site.
The header
Send the key on every call, and send bodies as JSON. Every v3 route starts https://api.opheliaos.com/v3/.
header
Authorization: Bearer YOUR_TEST_KEY
Content-Type: application/json
The calls below use opheliapractice.com, the practice site. It answers like a real site and books nothing. By default each practice step takes as long as it would on a real site; Test on the practice site shows how to make it faster.
1. Search
Ask the practice restaurant site for a table for two.
curl
curl -X POST https://api.opheliaos.com/v3/search \
-H "Authorization: Bearer YOUR_TEST_KEY" \
-H "Content-Type: application/json" \
-d '{
"site":"opheliapractice.com/restaurant",
"vertical":"dining",
"location":"Ophelia Test City",
"datetime":"2026-11-14T19:00:00-05:00",
"party_size": 2
}'
You get 200 and three entities. Two are cut here. Keep the entity_id.
Read the offers of one entity for the same evening.
curl
curl -X POST https://api.opheliaos.com/v3/availability \
-H "Authorization: Bearer YOUR_TEST_KEY" \
-H "Content-Type: application/json" \
-d '{
"entity_id":"ent_bc78e91578f61f35555280df",
"datetime":"2026-11-14T19:00:00-05:00",
"party_size": 2
}'
You get 200 and seven offers, one per time. Three are shown. Keep the offer_id of the time you want.
json
{
"status":"succeeded",
"offers":[
{
"offer_id":"off_a97ba7d77afa03e54939af9e",
"entity_id":"ent_bc78e91578f61f35555280df",
"label":"6:00 PM",
"kind":"replay",
"expires_at":"2026-11-04T01:20:13Z"
},
{
"offer_id":"off_ea27bf414d62895bf8c9bec4",
"entity_id":"ent_bc78e91578f61f35555280df",
"label":"7:00 PM",
"kind":"replay",
"expires_at":"2026-11-04T01:20:13Z"
},
{
"offer_id":"off_b51de0f5d7da0e7031deb448",
"entity_id":"ent_bc78e91578f61f35555280df",
"label":"7:30 PM",
"kind":"replay",
"expires_at":"2026-11-04T01:20:13Z"
}
],
"drive_id":"drv_88cf1630c33a4d67cdcab42c"
}
3. Book at begin
Go as far as the checkout form and stop (max_commitment: "begin"). Send the offer's own time as datetime, written as the place's own local time with its offset, and fill_identity: true so the drive may type the email and phone.
curl
curl -X POST https://api.opheliaos.com/v3/bookings \
-H "Authorization: Bearer YOUR_TEST_KEY" \
-H "Content-Type: application/json" \
-d '{
"entity_id":"ent_bc78e91578f61f35555280df",
"offer_id":"off_ea27bf414d62895bf8c9bec4",
"idempotency_key":"docs-begin-001",
"datetime":"2026-11-14T19:00:00-05:00",
"party_size": 2,
"customer":{
"name":"Jane Smith",
"email":"jane.smith.diner@gmail.com",
"phone":"+12124567890"
},
"authorize":{
"max_commitment":"begin",
"fill_identity": true
}
}'
You get 200 succeeded with a booking_id and no confirmation_number. The booking report says the form was reached and what it asks for. Nothing final was pressed. At begin, succeeded means the form was reached: to know whether something was booked, look at confirmation_number, not status.