---
title: "Associate a booking with a sequence (or detach)"
method: PATCH
path: "/appointments/bookings/{booking_uid}/sequence"
tags: ["Appointments"]
---

# Associate a booking with a sequence (or detach)

`PATCH /appointments/bookings/{booking_uid}/sequence`

## Request

- Base URL: `https://be.graph8.com/api/v1`
- URL: `https://be.graph8.com/api/v1/appointments/bookings/{booking_uid}/sequence`
- Auth: HTTP bearer

Link a booking to a sequencer sequence or remove the link.

``sequence_id`` is the sequence UUID (``seqsequences.id``); pass
``null`` / omit to detach.  Writes to
``booking.metadata_['campaignId']`` - the same field the public booking
flow populates from ``?campaignId=`` at create time.  No EDA event is
emitted (CRM-only action).  Backed by
``BookingsHandler.handle_update_sequence``.  Raises 404 when the
booking uid is not visible to the caller.

## Path parameters

- `booking_uid` string, required: Booking UID (uuid string).

## Headers

- `Authorization` string, nullable
- `X-Target-Org-Id` string, nullable

## Request body

- AppointmentsDomainEntitiesUpdateSequenceRequest: Associate a booking with a sequencer sequence (or detach when null). `sequence_id` is the `seqsequences.id` UUID. Persisted under `booking.metadata_['campaignId']` — same key the public booking flow populates from the `?campaignId=` URL param at create time.
  - `sequence_id` string, nullable

## Response `200`

Successful Response

- object

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/graph8/apis/graph8-developer-api.md) · [All operations](https://skmtc.dev/graph8/apis/graph8-developer-api/llms.txt) · [OpenAPI document](https://skmtc.dev/graph8/apis/graph8-developer-api/revisions/89fc11143b70?raw)
