curl --request GET \
--url 'https://api.nixflex.com/v1/calls/call_example/bookings' \
--header "Authorization: Bearer $NIXFLEX_API_KEY"
const response = await fetch('https://api.nixflex.com/v1/calls/call_example/bookings', {
method: 'GET',
headers: { Authorization: `Bearer ${process.env.NIXFLEX_API_KEY}` },
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
const result = await response.json();
// Handle the private result without logging it.
import os, json
from urllib.request import Request, urlopen
request = Request('https://api.nixflex.com/v1/calls/call_example/bookings', method='GET',
headers={'Authorization': 'Bearer ' + os.environ['NIXFLEX_API_KEY']})
with urlopen(request, timeout=30) as response:
result = json.load(response)
# Handle the private result without logging it.
$headers = @{ Authorization = "Bearer $env:NIXFLEX_API_KEY" }
$result = Invoke-RestMethod -Method GET -Uri 'https://api.nixflex.com/v1/calls/call_example/bookings' -Headers $headers -DisableKeepAlive
# Handle $result privately.
{
"call_id": "call_example",
"state": "ready",
"result": {
"event": "call.bookings",
"call_id": "call_example",
"agent_id": "agent_example",
"from": "+12025550101",
"to": "+12025550100",
"number": "+12025550100",
"ended_at": "2030-11-04T09:05:00.000Z",
"timeline": [
{
"action": "created",
"booking_uid": "booking_example",
"start": "2030-11-04T10:00:00.000Z",
"end": "2030-11-04T10:30:00.000Z",
"attendee_name": "Sam Carter",
"attendee_email": "sam@example.test",
"service": "Consultation",
"timezone": "Europe/London",
"at": "2030-11-04T09:01:00.000Z"
},
{
"action": "rescheduled",
"booking_uid": "booking_example",
"start": "2030-11-04T11:00:00.000Z",
"end": "2030-11-04T11:30:00.000Z",
"attendee_name": "Sam Carter",
"attendee_email": "sam@example.test",
"service": "Consultation",
"timezone": "Europe/London",
"at": "2030-11-04T09:02:00.000Z"
}
],
"final": [
{
"status": "active",
"booking_uid": "booking_example",
"start": "2030-11-04T11:00:00.000Z",
"end": "2030-11-04T11:30:00.000Z",
"attendee_name": "Sam Carter",
"attendee_email": "sam@example.test",
"service": "Consultation",
"timezone": "Europe/London"
}
]
}
}
{
"call_id": "call_example",
"state": "none",
"result": null
}
{
"call_id": "call_example",
"state": "processing",
"result": null
}
{
"call_id": "call_example",
"state": "deleted",
"result": null
}
{
"call_id": "call_example",
"state": "unavailable",
"result": null
}
Calls
Read call booking results
Read confirmed booking results for a Nixflex call. Distinguish ready, none, processing, deleted and unavailable without guessing from a transcript.
GET
/
calls
/
{id}
/
bookings
curl --request GET \
--url 'https://api.nixflex.com/v1/calls/call_example/bookings' \
--header "Authorization: Bearer $NIXFLEX_API_KEY"
const response = await fetch('https://api.nixflex.com/v1/calls/call_example/bookings', {
method: 'GET',
headers: { Authorization: `Bearer ${process.env.NIXFLEX_API_KEY}` },
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
const result = await response.json();
// Handle the private result without logging it.
import os, json
from urllib.request import Request, urlopen
request = Request('https://api.nixflex.com/v1/calls/call_example/bookings', method='GET',
headers={'Authorization': 'Bearer ' + os.environ['NIXFLEX_API_KEY']})
with urlopen(request, timeout=30) as response:
result = json.load(response)
# Handle the private result without logging it.
$headers = @{ Authorization = "Bearer $env:NIXFLEX_API_KEY" }
$result = Invoke-RestMethod -Method GET -Uri 'https://api.nixflex.com/v1/calls/call_example/bookings' -Headers $headers -DisableKeepAlive
# Handle $result privately.
{
"call_id": "call_example",
"state": "ready",
"result": {
"event": "call.bookings",
"call_id": "call_example",
"agent_id": "agent_example",
"from": "+12025550101",
"to": "+12025550100",
"number": "+12025550100",
"ended_at": "2030-11-04T09:05:00.000Z",
"timeline": [
{
"action": "created",
"booking_uid": "booking_example",
"start": "2030-11-04T10:00:00.000Z",
"end": "2030-11-04T10:30:00.000Z",
"attendee_name": "Sam Carter",
"attendee_email": "sam@example.test",
"service": "Consultation",
"timezone": "Europe/London",
"at": "2030-11-04T09:01:00.000Z"
},
{
"action": "rescheduled",
"booking_uid": "booking_example",
"start": "2030-11-04T11:00:00.000Z",
"end": "2030-11-04T11:30:00.000Z",
"attendee_name": "Sam Carter",
"attendee_email": "sam@example.test",
"service": "Consultation",
"timezone": "Europe/London",
"at": "2030-11-04T09:02:00.000Z"
}
],
"final": [
{
"status": "active",
"booking_uid": "booking_example",
"start": "2030-11-04T11:00:00.000Z",
"end": "2030-11-04T11:30:00.000Z",
"attendee_name": "Sam Carter",
"attendee_email": "sam@example.test",
"service": "Consultation",
"timezone": "Europe/London"
}
]
}
}
{
"call_id": "call_example",
"state": "none",
"result": null
}
{
"call_id": "call_example",
"state": "processing",
"result": null
}
{
"call_id": "call_example",
"state": "deleted",
"result": null
}
{
"call_id": "call_example",
"state": "unavailable",
"result": null
}
FIXED · call For new Google Calendar or Cal.com voice bookings, collect spelled name and email separately. Finish the combined read-back and get a later clear yes before the write, even with require_booking_confirmation=false. To reschedule or cancel an existing Cal.com appointment that changed across lookups, read back the current target in full and get a fresh yes. Google Calendar skips this; its moves and cancels follow require_booking_confirmation. Confirm success only after the calendar write succeeds. SMS uses its own flow.
NOT OFFERED → do this instead · number The booking zone cannot change general call time. Set calcom_timezone_override on the number to an IANA zone, or null to inherit. Cal.com uses number → agent → saved connection → Europe/London. With a booking context, read effective_calcom_timezone and effective_calcom_timezone_source. Google Calendar keeps its own number-calendar setting.
YOU CAN CHANGE · number Supported Google Calendar settings include availability hours, timezone and invitation behaviour. These configure that number’s booking calendar.
Do not send a request body.
This read does not contact a calendar or place a call. Invalid, missing and foreign call IDs share one 404. A retained result describes this call, not the current calendar. It uses the same public projection as call.bookings, without a delivery signature. The response uses Cache-Control: no-store.
For ready, result has the complete call.bookings payload. Count active rows in final; timeline counts actions. This is not the current calendar inventory. Do not infer none from a transcript, an empty legacy array or an unsuccessful call.
A 503 call_bookings_unavailable is a failed read, not none. Keep the last known uncertainty and use bounded read retries. A 404 does not reveal another account’s calls.
timezone, hours, slot_minutes, calendar_id, send_invites.
SCOPE · number For an owned number assigned to an agent, send only return_url to start Google Calendar consent. Open the returned url for the calendar owner. A competing calendar is refused. Read the number’s status after consent to confirm connection.
Read the compact AI rules
Read the retained booking result for one account-owned call. Only ready returns confirmed mutations and their final results.
Method: GET ·
Success: 200 ·
Scope: Owning account
The important part
- Only ready returns a confirmed booking result; every other state has result:null.
- none needs complete evidence of zero successful mutations. unavailable is not an empty result.
Authentication
UseAuthorization: Bearer KEY_ID:KEY_SECRET for the owning account. An organisation API key has Owner authority. Personal sessions use the role rules documented in Authentication; do not treat a Member session as an API key.
Request fields
| Field | Type | Required | Default and limits |
|---|---|---|---|
id (path) | string | Yes | Owned call identifier. Invalid, missing and foreign identifiers share the same 404. At most 200 characters |
Response fields
200 OK returns call_id, state and result. The response is Cache-Control: no-store.
| State | Result | What to show |
|---|---|---|
| ready | Confirmed object | Show timeline and final from the retained result of this call. |
| none | null | No successful mutation, established by complete booking evidence. |
| processing | null | Tracked call or post-call work is unfinished; offer a bounded refresh. |
| deleted | null | Content was removed, immediately scheduled for deletion, expired or is being purged. |
| unavailable | null | Old, partial or unconfirmed evidence; no definitive booking result. |
Example request
Production HTTP examples. Replace the placeholder identifiers with resources owned by the account. SetNIXFLEX_API_KEY privately; never print it.
curl --request GET \
--url 'https://api.nixflex.com/v1/calls/call_example/bookings' \
--header "Authorization: Bearer $NIXFLEX_API_KEY"
const response = await fetch('https://api.nixflex.com/v1/calls/call_example/bookings', {
method: 'GET',
headers: { Authorization: `Bearer ${process.env.NIXFLEX_API_KEY}` },
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
const result = await response.json();
// Handle the private result without logging it.
import os, json
from urllib.request import Request, urlopen
request = Request('https://api.nixflex.com/v1/calls/call_example/bookings', method='GET',
headers={'Authorization': 'Bearer ' + os.environ['NIXFLEX_API_KEY']})
with urlopen(request, timeout=30) as response:
result = json.load(response)
# Handle the private result without logging it.
$headers = @{ Authorization = "Bearer $env:NIXFLEX_API_KEY" }
$result = Invoke-RestMethod -Method GET -Uri 'https://api.nixflex.com/v1/calls/call_example/bookings' -Headers $headers -DisableKeepAlive
# Handle $result privately.
Example response
{
"call_id": "call_example",
"state": "ready",
"result": {
"event": "call.bookings",
"call_id": "call_example",
"agent_id": "agent_example",
"from": "+12025550101",
"to": "+12025550100",
"number": "+12025550100",
"ended_at": "2030-11-04T09:05:00.000Z",
"timeline": [
{
"action": "created",
"booking_uid": "booking_example",
"start": "2030-11-04T10:00:00.000Z",
"end": "2030-11-04T10:30:00.000Z",
"attendee_name": "Sam Carter",
"attendee_email": "sam@example.test",
"service": "Consultation",
"timezone": "Europe/London",
"at": "2030-11-04T09:01:00.000Z"
},
{
"action": "rescheduled",
"booking_uid": "booking_example",
"start": "2030-11-04T11:00:00.000Z",
"end": "2030-11-04T11:30:00.000Z",
"attendee_name": "Sam Carter",
"attendee_email": "sam@example.test",
"service": "Consultation",
"timezone": "Europe/London",
"at": "2030-11-04T09:02:00.000Z"
}
],
"final": [
{
"status": "active",
"booking_uid": "booking_example",
"start": "2030-11-04T11:00:00.000Z",
"end": "2030-11-04T11:30:00.000Z",
"attendee_name": "Sam Carter",
"attendee_email": "sam@example.test",
"service": "Consultation",
"timezone": "Europe/London"
}
]
}
}
{
"call_id": "call_example",
"state": "none",
"result": null
}
{
"call_id": "call_example",
"state": "processing",
"result": null
}
{
"call_id": "call_example",
"state": "deleted",
"result": null
}
{
"call_id": "call_example",
"state": "unavailable",
"result": null
}
Errors
Branch onerror.code, not the wording of error.message. The envelope includes type, code, message, doc_url and details.
| Status / code | What it means | What to do |
|---|---|---|
401 · unauthorized | The credential is missing or invalid. | Check the full account credential and API host privately; stop the retry loop. |
403 · permission_denied | This actor cannot perform the operation. | Resolve the account or role restriction through an authorised person. |
404 · not_found | Call identifier is invalid, missing or foreign. Check the owned ID. | Check the exact owned identifier and current resource state; do not probe another account. |
429 · rate_limit_exceeded | The request limit was reached. | Wait at least Retry-After and use a bounded read retry. |
503 · call_bookings_unavailable | The read failed. Retry the read with bounded backoff; never show none. | Retry the read with bounded backoff. Keep the result unavailable; never display none. |