Skip to main content
POST
Create an appointment

Yetkilendirmeler

Authorization
string
header
gerekli

The access token received from the authorization server in the OAuth 2.0 flow.

Başlıklar

X-Tenant
number
gerekli

Tenant identifier. Send the Tenant ID in the X-Tenant header to scope API requests to a specific tenant.

Gövde

application/json
user_id
integer
gerekli

The user ID.

scheduled_at
string<date-time>
gerekli

The scheduled at.

status
enum<string>
gerekli

The status. An appointment cannot be created as cancelled: create it, then cancel it with POST /appointments/{id}/cancel.

Mevcut seçenekler:
pending,
approved,
cancelled,
rejected,
completed,
no_show
customer_id
integer

The customer ID.

lead_id
integer

The visible lead ID used as an alternative to customer_id.

treatments
integer[]

The treatments. Required unless filling a parent session via parent_session_id, where the treatment is inherited from the planned session.

Minimum array length: 1

A treatments value.

is_control_appointment
boolean | null

Whether this appointment overrides its treatments' normal session plan with a single control-type session per treatment. Enforced server-side regardless of any submitted treatment_session_plans.

assistant_id
integer | null

The assistant ID (deprecated, use assistant_ids).

assistant_ids
integer[] | null

The assistant IDs.

An assistant IDs value.

parent_appointment_id
integer | null

The parent appointment ID.

parent_session_id
integer | null

The planned treatment session ID on the parent appointment that this session appointment fulfills.

products
object[] | null

The products of the session being filled, replacing the ones planned on it; an empty list clears them. Only used with parent_session_id; when omitted the planned products stay.

tags
integer[] | null

Tag identifiers to attach to the appointment.

A tag ID.

description
string | null

The description.

Maximum string length: 65000
duration_minutes
integer | null

The appointment duration in minutes. A session appointment (parent_session_id) without one takes the parent appointment's duration.

Gerekli aralık: 5 <= x <= 1440
send_message
boolean | null

Whether to send the appointment-created notification to the customer. Defaults to the tenant setting when omitted.

channel_id
integer | null

The channel the appointment-created notification is sent on. Must be connected (notification_channels[].status = open on GET /customers/{id}, or on GET /leads/{id} when booking with lead_id); a closed or connecting channel is rejected. When omitted, resolved automatically: the channel the customer last wrote on, then their default channel, then the tenant's default notification channel — skipping any channel that is not connected.

channel_identifier
string | null

The customer's address on the chosen channel: phone number for WhatsApp, numeric chat ID for Telegram (usernames cannot be messaged), IGSID for Instagram. Required when the customer cannot be reached on channel_id yet; it is saved as a customer identity so the notification can be delivered. See notification_channels[].is_reachable on GET /customers/{id}, or on GET /leads/{id} when booking with lead_id.

Maximum string length: 255
cancellation_reason
string | null

The cancellation reason.

Maximum string length: 1000
room_id
integer | null

The room ID.

treatment_session_plans
object[] | null

The treatment session plans.

Yanıt

success
string
gerekli
data
AppointmentResource · object
gerekli