post
https://connect.agendapro.com/v3/bookings
This endpoint creates a new booking.
Important Notes
- Requires
bookings:writescope. - The booking notification and the reminders by email and WhatsApp are controlled by
send_mail,send_whatsapp,send_email_reminderandsend_whatsapp_reminder. All four
default tofalsewhen omitted, so a booking created without them sends none of those four. - These fields can only disable a channel the company has enabled — never enable one the
company has disabled. The company's notification settings still decide. - SMS reminders are not controlled by this API. They follow the company's own reminder
settings regardless of what is sent here. - The
creative_sourceis automatically set toconnect. company_commentis the company's internal note on the booking (free text, no length limit
enforced by the API; the client never sees it). When the booking has service options, the
platform appends, opciones: …to it.external_referenceis your own reference for the booking (an order or ticket id), with the
online-booking site's rules: it is trimmed and accepted only when it has 1 to 128 characters
ofA-Z a-z 0-9 . _ ~ : -. A valid value is stored incompany_comment(it replaces the
company_commentof the same request); an invalid one is ignored without an error. Read it
back fromcompany_comment.- To create several bookings in one request use
POST /v3/bookings/bulk(up to 50
independent bookings). - The request acts as the business, as a booking made in the calendar:
price,end_time,
status_idand thesend_*flags are taken as sent. clientinstead ofclient_idcreates the booking for the client thatclientidentifies
(identification_number,emailorphone), found by those identifiers or created. Send one
of the two, never both. The client is created only when the booking can be made; if the
booking fails afterwards, retrying the same request finds that client instead of creating
another one.- The answer carries
links(see theBookingschema): the client's self-service URLs to confirm,
cancel or edit the booking, pay it online, and open the company's booking site.confirm,
cancelandeditcarry the bookinguuid: treat them as secrets. - Classes and group services (a service with a capacity, as the online booking site shows
them): book them like any other service, one booking per attendee, on a time returned by
GET /v3/available_slots(class slots carrycapacityandbookings_count). Every booking of
the same service, provider and time shares the capacity; when it is full the next one fails
with422 provider_not_available. The same answer comes when the provider already has a booking
of another service at that time. - Services with sessions (
has_sessions: true, a pack of sessions sold as one service) cannot
be booked through this API yet: the request fails with422 treatment_booking_unsupportedand
nothing is created. Book them from the web app or the online booking site.
Errors Dictionary
| Status | Error | Detail | Description |
|---|---|---|---|
| 400 | invalid_body | expected_object | Request body is not a JSON object. |
| 401 | unauthorized | invalid_api_key | Missing or invalid Bearer token. |
| 401 | unauthorized | api_config_inactive | API access is inactive for this company. |
| 400 | invalid_client | — | client is not an object, or it was sent together with client_id. |
| 400 | missing_client_id | — | Neither client_id nor client was sent. |
| 400 | missing_identifier | — | client has none of identification_number, email, phone. |
| 403 | forbidden | scope_denied | API key lacks bookings:write scope. |
| 422 | provider_not_available | — | The provider is busy at that time, or the class or group service is full. |
| 422 | treatment_booking_unsupported | — | The service has sessions (has_sessions); it cannot be booked through this API. |
| 422 | client_exclusive_not_found | — | client: exclusive clients and nothing matched. |
| 422 | client_identification_mismatch | — | client: the identification number belongs to a client with another name. |
| 422 | client_email_conflict · client_phone_conflict | — | client: validated email or phone that belongs to another person. |
| 429 | rate_limited | burst_limit_exceeded | Per-minute request limit exceeded. |
| 429 | rate_limited | daily_quota_exceeded | Daily request quota exceeded. |
| 502 | upstream_unavailable | connection_failed | The upstream service is unavailable. |
| 502 | client_resolution_unavailable | — | client: the clients service did not answer; nothing was created. |
Business errors of the bookings service arrive with their key in error and no detail (see Errors).
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
