Skip to content

Create a booking

POST
/api/public/{slug}/book
curl --request POST \
--url https://example.com/api/public/example/book \
--header 'Content-Type: application/json' \
--data '{ "serviceId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "staffId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "startTime": "example", "customerName": "example", "customerEmail": "hello@example.com", "customerPhone": "example", "notes": "example", "locationType": "in_person" }'
slug
required
string
Media typeapplication/json
object
serviceId
required
string format: uuid
/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/
staffId
required
string format: uuid
/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/
startTime
required
string
>= 1 characters
customerName
required
string
>= 1 characters <= 255 characters
customerEmail
required
string format: email
/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/
customerPhone
string
<= 50 characters
notes
string
locationType
string
Allowed values: in_person phone zoom

Default Response

Media typeapplication/json
object
data
required
object
bookingId
required
string format: uuid
/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/
status
required
string
Allowed values: pending confirmed completed cancelled no_show
startTime
required
string
endTime
required
string
Example
{
"data": {
"status": "pending"
}
}