> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nixflex.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Receive booking results: call.bookings

> Receive confirmed Nixflex booking actions and their final results after a call. Verify signatures, count active bookings and handle duplicate deliveries.

**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. `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](https://docs.nixflex.com/ai-rules.md#bookings-calendars)

Receive confirmed calendar mutations and their final booking results after a call ends.

Guide: **API reference** · Topic: **Booking results event**

**The important part**

* timeline lists confirmed actions; final shows the result per booking UID.
* Count active final rows. Creating then cancelling leaves zero active bookings.

[Business guide](https://docs.nixflex.com/guides/booking-receptionist.md) · [Developer guide](https://docs.nixflex.com/advanced/webhooks.md) · [Glossary](https://docs.nixflex.com/guides/glossary.md)

`call.bookings` is a post-call webhook event for confirmed Google Calendar or
Cal.com booking changes. It is sent only after an ended call has at least one
successful create, reschedule or cancellation. A lookup, available slot,
already-existing booking, failed write or statement by the agent does not create
this event.

Use `timeline` to understand the actions and `final` for the resulting bookings.
For example, creating an appointment and then cancelling it produces two actions
and **zero active bookings**. Counting actions would give the wrong result.

## Where the event is sent

It uses the existing primary and secondary number webhooks, inherited call webhook
and configured post-call automation destinations. Identical destination URLs are
deduplicated. No new switch, API endpoint or API-key scope is needed.

The engine queues `call.completed` before `call.bookings`, but network delivery can
arrive in either order. Existing `call.completed.bookings[]` is unchanged. SMS keeps
the existing `sms.booking` event per reply because a message thread has no hang-up
boundary. The primary URL saved through the [number webhook API](https://docs.nixflex.com/api-reference/integration-settings/put-integrations-webhook-number-phoneNumber.md)
also receives applicable SMS booking events.

## Payload

The body is flat and all fields below are present. IDs and phone fields may be
null when unavailable. The payload has no account field: identify the account from
your trusted receiver configuration and the signing secret that verified it.

| Field | Type and meaning |
| - | - |
| `event` | Always `call.bookings` |
| `call_id`, `agent_id` | String or null |
| `from`, `to` | Phone string or null |
| `number` | Your number: inbound `to`, outbound `from`; string or null |
| `ended_at` | Engine call-end UTC ISO timestamp, not the delivery time |
| `timeline` | Ordered confirmed mutations; at least one action |
| `final` | One resulting row per booking UID affected by this call |

### Timeline fields

Each action has `action`, `booking_uid`, `start`, `end`, `attendee_name`,
`attendee_email`, `service`, `timezone` and `at`.

| Field | Meaning |
| - | - |
| `action` | `created`, `rescheduled` or `cancelled` |
| `booking_uid` | Booking identifier; use the supplied value, not the person's name |
| `start`, `end` | Actual UTC ISO interval, or null when unknown |
| `attendee_name`, `attendee_email` | String or null |
| `service` | String, number or null; older event types can be numeric |
| `timezone` | String or null |
| `at` | Engine UTC ISO receipt time of the confirmed mutation |

The booking fields use the same public projection as
`call.completed.bookings[]`, with `at` added. Preserve nulls; do not invent an end
time or attendee. These fields do not confirm that an email or SMS was delivered.

### Final fields

Each result contains `booking_uid`, `status`, `start`, `end`, `attendee_name`,
`attendee_email`, `service` and `timezone`. `status` is `active` or `cancelled`.
The last confirmed action wins; missing values retain earlier known values from
this call. A Cal.com reschedule can replace a UID: `final` resolves that replacement
to one resulting booking, while the timeline retains the original action IDs.

`final` describes changes made during this call. It is neither a full calendar
inventory nor a count of newly acquired customers. A moved existing booking can
appear as one active result. Cancellation rows remain visible for reconciliation.

| Confirmed actions | Final result | Active count |
| - | - | -: |
| Create → move | One active row at the moved time | 1 |
| Create → cancel | One cancelled row | 0 |
| Create → move → cancel | One cancelled row at the last known time | 0 |
| Move an existing booking | One active row at its new time | 1 |
| Create two independent UIDs | Two active rows | 2 |

## Example: create, then move

Fictional identifiers and contact details. The delivery signature is computed over
the actual transmitted bytes; the formatted body below has no reusable signature.

```json theme={"dark"}
{
  "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"
    }
  ]
}
```

The downloadable [OpenAPI file](https://docs.nixflex.com/api-reference/public.openapi.json) includes this
event under `webhooks`, with create/cancel, move/cancel, existing-booking, two-UID,
replacement-UID and nullable-field examples. It is not a callable API path.

## Verify before processing

Require `X-Nixflex-Signature: t=UNIX_SECONDS,v1=HEX_HMAC`. Verify HMAC-SHA256 over
`timestamp.raw_body` using the exact received bytes and the privately provisioned
account signing secret. Apply a short timestamp tolerance and constant-time digest
comparison before JSON parsing. See the [receiver guide and verifier](https://docs.nixflex.com/advanced/webhooks.md#3-verify-exact-request-bytes).

Unlike legacy event paths that may send without a signature if material is missing,
`call.bookings` requires signing material and retries instead of sending unsigned.
Your receiver should reject or quarantine any missing or invalid signature.

## Deduplicate and count active results

Within each receiver, atomically deduplicate **`(account, event, call_id)`** and
store the verified event with durable downstream work before acknowledging it.
Derive account identity from trusted configuration, not arbitrary request data.
If an identifier needed for deduplication is null, quarantine the event for
reconciliation instead of collapsing all unknown calls into one key.

The event discriminator matters: the same call can produce `call.started`,
`call.completed` and `call.bookings`. Keep a unique database constraint or atomic
insert on the complete key. A check followed by a separate insert can race.
Return a prompt 2xx for a verified duplicate that was already durably stored.

```javascript theme={"dark"}
// Run only after raw-body signature and payload validation.
function bookingResult(verifiedEvent, trustedAccount) {
  if (verifiedEvent.event !== 'call.bookings' || !verifiedEvent.call_id || !trustedAccount) {
    throw new Error('A verified account and call identifier are required');
  }
  return {
    dedupeKey: JSON.stringify([trustedAccount, verifiedEvent.event, verifiedEvent.call_id]),
    activeBookings: verifiedEvent.final.filter(row => row.status === 'active').length,
  };
}
```

```python theme={"dark"}
# Run only after raw-body signature and payload validation.
def booking_result(verified_event, trusted_account):
    if (verified_event['event'] != 'call.bookings'
            or not verified_event['call_id'] or not trusted_account):
        raise ValueError('A verified account and call identifier are required')
    return {
        'dedupe_key': (trusted_account, verified_event['event'], verified_event['call_id']),
        'active_bookings': sum(row['status'] == 'active' for row in verified_event['final']),
    }
```

These helpers calculate values only; your transaction must enforce uniqueness and
durable processing. They do not verify a signature or perform database writes.
Protect subsequent business actions with their own duplicate prevention.

## Delivery timing and retries

The normal initial queue delay is 60 seconds. There are up to five queue attempts,
with retry waits of 5, 5, 5 and 60 minutes. Network errors, 408, 429 and 5xx are
retryable; other 4xx end delivery. A queue attempt can also retry a transport error
internally, so five queue attempts is not a maximum of five HTTP requests.

The current queue treats 3xx as delivered. Return 2xx directly after durable
acceptance; do not use redirects. A queued event can arrive more than once, arrive
late or fail to arrive. Retention, ownership and deletion safeguards can stop
delivery; neither delivery nor the schedule is guaranteed.

An already-dispatched calendar action can finish just after hang-up. Only the
post-call snapshot waits for that result, bounded at 30 seconds. It does not start
another calendar write or add webhook HTTP work to live speech. Unknown results
are not reported as confirmed bookings.

## Related pages

* [Webhook events overview](https://docs.nixflex.com/api-reference/webhooks.md)
* [Build a signed event receiver](https://docs.nixflex.com/advanced/webhooks.md)
* [Booking approval and notification wording](https://docs.nixflex.com/actions/booking-confirmation.md)
* [Read a call](https://docs.nixflex.com/api-reference/calls/get.md)

## Read a retained booking result

Use [GET call booking results](https://docs.nixflex.com/api-reference/calls/get-bookings.md) when reconciling a missed event. The read distinguishes ready, none, processing, deleted and unavailable. Only ready includes this public event projection as result; it is data without a delivery signature. An absent event or a completed call alone does not confirm there were no bookings.

## Next steps

* [API overview](https://docs.nixflex.com/api-reference/introduction.md)
* [Errors and recovery](https://docs.nixflex.com/api-reference/errors.md)
* [Retry rules](https://docs.nixflex.com/api-reference/retries.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.