cURL
curl -X POST https://api.neuraldraft.io/v1/bookings \
-H "Authorization: Bearer ndsk_live_yourkey" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"service_id":12,"customer_name":"Joe","customer_email":"joe@example.com","starts_at":"2026-04-19T15:00:00Z"}'const booking = await nd.bookings.create({ serviceId: 12, customerName: "Joe", customerEmail: "joe@example.com", startsAt: "2026-04-19T15:00:00Z" });
r = requests.post("https://api.neuraldraft.io/v1/bookings",
headers={"Authorization": f"Bearer {key}", "Idempotency-Key": str(uuid.uuid4())},
json={"service_id":12,"customer_name":"Joe","customer_email":"joe@example.com","starts_at":"2026-04-19T15:00:00Z"})
<?php
$client->post('bookings', [
'headers' => ['Authorization' => 'Bearer '.$key, 'Idempotency-Key' => Str::uuid()->toString()],
'json' => ['service_id'=>12,'customer_name'=>'Joe','customer_email'=>'joe@example.com','starts_at'=>'2026-04-19T15:00:00Z'],
]);
{
"id": 503,
"booking_reference": "BK-20260419-AB12",
"customer_name": "<string>",
"customer_email": "jsmith@example.com",
"starts_at": "2023-11-07T05:31:56Z",
"status": "pending",
"service": {
"id": 12,
"name": "60-minute private yoga",
"slug": "60-minute-private-yoga"
},
"customer_phone": "<string>",
"ends_at": "2023-11-07T05:31:56Z",
"payment_status": "not_required",
"price_charged": 123,
"currency": "<string>",
"customer_notes": "<string>",
"admin_notes": "<string>",
"cancellation_reason": "<string>",
"cancelled_at": "2023-11-07T05:31:56Z",
"confirmed_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"type": "https://api.neuraldraft.io/errors/bad_request",
"title": "Bad request",
"status": 400,
"detail": "Request body could not be parsed.",
"code": "bad_request",
"instance": "req_2Nh4PqRsTuVw"
}{
"type": "https://api.neuraldraft.io/errors/unauthorized",
"title": "Unauthorized",
"status": 401,
"detail": "API key missing or invalid.",
"code": "unauthorized",
"instance": "req_2Nh4PqRsTuVw"
}{
"type": "https://api.neuraldraft.io/errors/slot_unavailable",
"title": "Slot unavailable",
"status": 409,
"detail": "Another booking already covers this time slot.",
"code": "slot_unavailable"
}{
"type": "https://api.neuraldraft.io/errors/validation_failed",
"title": "Validation failed",
"status": 422,
"detail": "One or more fields failed validation.",
"code": "validation_failed",
"instance": "req_2Nh4PqRsTuVw",
"errors": {
"customer_email": [
"The customer email field must be a valid email address."
],
"starts_at": [
"The starts at field must be a date after now."
]
}
}Booking
Create a booking (admin)
Admin-created booking (e.g. walk-in or phone booking). Bypasses
availability checks if force: true is provided. Customers should
use POST /public/bookings instead.
POST
/
bookings
cURL
curl -X POST https://api.neuraldraft.io/v1/bookings \
-H "Authorization: Bearer ndsk_live_yourkey" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"service_id":12,"customer_name":"Joe","customer_email":"joe@example.com","starts_at":"2026-04-19T15:00:00Z"}'const booking = await nd.bookings.create({ serviceId: 12, customerName: "Joe", customerEmail: "joe@example.com", startsAt: "2026-04-19T15:00:00Z" });
r = requests.post("https://api.neuraldraft.io/v1/bookings",
headers={"Authorization": f"Bearer {key}", "Idempotency-Key": str(uuid.uuid4())},
json={"service_id":12,"customer_name":"Joe","customer_email":"joe@example.com","starts_at":"2026-04-19T15:00:00Z"})
<?php
$client->post('bookings', [
'headers' => ['Authorization' => 'Bearer '.$key, 'Idempotency-Key' => Str::uuid()->toString()],
'json' => ['service_id'=>12,'customer_name'=>'Joe','customer_email'=>'joe@example.com','starts_at'=>'2026-04-19T15:00:00Z'],
]);
{
"id": 503,
"booking_reference": "BK-20260419-AB12",
"customer_name": "<string>",
"customer_email": "jsmith@example.com",
"starts_at": "2023-11-07T05:31:56Z",
"status": "pending",
"service": {
"id": 12,
"name": "60-minute private yoga",
"slug": "60-minute-private-yoga"
},
"customer_phone": "<string>",
"ends_at": "2023-11-07T05:31:56Z",
"payment_status": "not_required",
"price_charged": 123,
"currency": "<string>",
"customer_notes": "<string>",
"admin_notes": "<string>",
"cancellation_reason": "<string>",
"cancelled_at": "2023-11-07T05:31:56Z",
"confirmed_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"type": "https://api.neuraldraft.io/errors/bad_request",
"title": "Bad request",
"status": 400,
"detail": "Request body could not be parsed.",
"code": "bad_request",
"instance": "req_2Nh4PqRsTuVw"
}{
"type": "https://api.neuraldraft.io/errors/unauthorized",
"title": "Unauthorized",
"status": 401,
"detail": "API key missing or invalid.",
"code": "unauthorized",
"instance": "req_2Nh4PqRsTuVw"
}{
"type": "https://api.neuraldraft.io/errors/slot_unavailable",
"title": "Slot unavailable",
"status": 409,
"detail": "Another booking already covers this time slot.",
"code": "slot_unavailable"
}{
"type": "https://api.neuraldraft.io/errors/validation_failed",
"title": "Validation failed",
"status": 422,
"detail": "One or more fields failed validation.",
"code": "validation_failed",
"instance": "req_2Nh4PqRsTuVw",
"errors": {
"customer_email": [
"The customer email field must be a valid email address."
],
"starts_at": [
"The starts at field must be a date after now."
]
}
}Authorizations
Project API key. Pass as Authorization: Bearer ndsk_live_.... Manage
keys via /projects/me/api-keys. Test-mode keys use
the ndsk_test_ prefix.
Headers
Unique key (any string up to 255 chars; UUID recommended). Retries with the same key within 24 hours return the original response without re-executing side effects.
Maximum string length:
255Body
application/json
Required for booking_type: date_range services.
Bypass availability checks (admin only).
Response
Booking created.
Example:
503
Example:
"BK-20260419-AB12"
Available options:
pending, confirmed, cancelled, completed, no_show Show child attributes
Show child attributes
Available options:
not_required, unpaid, paid, refunded Hidden in public lookups.