Public API
  1. Bookings
Public API
  • Welcome to the deskbird Public API
  • Users
    • Lists company users
      GET
    • Lists single company user
      GET
  • Bookings
    • Lists company bookings
      GET
    • Creates booking
      POST
    • Lists single company booking
      GET
    • Updates booking
      PATCH
    • Cancels booking
      PATCH
    • Check in to the booking
      PATCH
    • Early release the booking
      PATCH
  • Groups
    • Lists company user groups
      GET
    • Lists single company user group
      GET
  • Resources
    • Lists company resources
      GET
  • Offices
    • Lists company offices
      GET
    • Check User into Office
      POST
  1. Bookings

Creates booking

POST
/bookings
Bookings
Creates booking

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Header Params
Authorization
string 
required
Public API key for the company
Body Params application/json
userId
string 
required
The UUID of the booking user
Example:
123e4567-e89b-12d3-a456-426614174000
guest
object 
optional
Guest information if the booking is for a guest
firstName
string 
required
The first name of the guest
Example:
John
lastName
string 
required
The last name of the guest
Example:
Doe
email
string 
required
The email of the guest
Example:
john.doe@example.com
startTime
string <date-time>
required
The start time of the booking
Example:
2024-01-01T10:00:00.000Z
endTime
string <date-time>
required
The end time of the booking
Example:
2024-01-01T18:00:00.000Z
isAnonymousBooking
boolean 
required
Whether this is an anonymous booking
Example:
false
resourceId
string 
required
The UUID of the resource to book
Example:
123e4567-e89b-12d3-a456-426614174000
Example
{
    "userId": "123e4567-e89b-12d3-a456-426614174000",
    "guest": {
        "firstName": "John",
        "lastName": "Doe",
        "email": "john.doe@example.com"
    },
    "startTime": "2024-01-01T10:00:00.000Z",
    "endTime": "2024-01-01T18:00:00.000Z",
    "isAnonymousBooking": false,
    "resourceId": "123e4567-e89b-12d3-a456-426614174000"
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://connect.deskbird.com/bookings' \
--header 'Authorization;' \
--header 'Content-Type: application/json' \
--data-raw '{
    "userId": "123e4567-e89b-12d3-a456-426614174000",
    "guest": {
        "firstName": "John",
        "lastName": "Doe",
        "email": "john.doe@example.com"
    },
    "startTime": "2024-01-01T10:00:00.000Z",
    "endTime": "2024-01-01T18:00:00.000Z",
    "isAnonymousBooking": false,
    "resourceId": "123e4567-e89b-12d3-a456-426614174000"
}'

Responses

🟢200OK
application/json
Returns the created booking
Body
id
string 
required
The ID of the booking
Example:
123e4567-e89b-12d3-a456-426614174000
userId
string  | null 
required
The ID of the user who owns the booking. Due to the anonymization, this field can be null.
Example:
123e4567-e89b-12d3-a456-426614174000
anonymized
boolean 
required
If the booking was anonymized, this field will be true.
Example:
false
autoCancellationTime
string <date-time> | null 
required
The time when the booking will be automatically cancelled if by then it is was not checked in.
Example:
2021-01-01T00:00:00.000Z
checkInStatus
enum<string> 
required
Status of the booking check-in.
Allowed values:
checkedIncheckInNotAvailablenotCheckedInreadyForCheckInreadyForNonQRCheckIn
Example:
checkedIn
earlyReleaseEndTime
string <date-time> | null 
required
Time when the booking was early released.
Example:
2021-01-01T00:00:00.000Z
endTime
string <date-time>
required
Time until when the booking was made.
Example:
2021-01-01T00:00:00.000Z
guest
required
Guest info if the booking is for guest. null if the guest info was removed from the system. not defined if the booking is not for a guest.
One of
One of
Guest info if the booking is for guest. null if the guest info was removed from the system. not defined if the booking is not for a guest.
Example:
{"firstName":"John","lastName":"Doe","email":"john.doe@example.com"}
isAnonymousBooking
boolean 
required
True if the booking is anonymous.
Example:
false
startTime
string <date-time>
required
Time when the booking starts.
Example:
2021-01-01T00:00:00.000Z
status
enum<string> 
required
Status of the booking.
Allowed values:
acceptedcancelledrunningcompletededitedByUser
Example:
accepted
zoneId
string  | null 
required
The ID of the zone/area where the booked resource is located.
Example:
1234
floorId
string  | null 
required
The ID of the floor where the booked resource is located.
Example:
1122
resourceId
string 
required
The ID of the resource that was booked.
Example:
123e4567-e89b-12d3-a456-426614174000
resource
object 
required
Basic information about the booked resource.
Example:
{"id":"123e4567-e89b-12d3-a456-426614174000","name":"Flex Desk 1","type":"flexDesk"}
id
string 
required
The ID of the resource
Example:
123e4567-e89b-12d3-a456-426614174000
name
string 
required
The name of the resource
Example:
Desk 1
type
enum<string> 
required
The type of the resource
Allowed values:
flexDeskmeetingRoomparkingother
Example:
flexDesk
officeId
string 
required
The ID of the office where the booked resource is located.
Example:
3241
user
required
Basic information about the booking user. Due to the anonymization, this field can be null.
One of
One of
Basic information about the booking user. Due to the anonymization, this field can be null.
Example:
{"id":"123e4567-e89b-12d3-a456-426614174000","email":"john.doe@example.com","firstName":"John","lastName":"Doe"}
createdAt
string <date-time>
required
The time when the booking was created.
Example:
2021-01-01T00:00:00.000Z
updatedAt
string <date-time>
required
The time when the booking was last updated.
Example:
2021-01-01T00:00:00.000Z
Example
{
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "userId": "123e4567-e89b-12d3-a456-426614174000",
    "anonymized": false,
    "autoCancellationTime": "2021-01-01T00:00:00.000Z",
    "checkInStatus": "checkedIn",
    "earlyReleaseEndTime": "2021-01-01T00:00:00.000Z",
    "endTime": "2021-01-01T00:00:00.000Z",
    "guest": {
        "firstName": "John",
        "lastName": "Doe",
        "email": "john.doe@example.com"
    },
    "isAnonymousBooking": false,
    "startTime": "2021-01-01T00:00:00.000Z",
    "status": "accepted",
    "zoneId": "1234",
    "floorId": "1122",
    "resourceId": "123e4567-e89b-12d3-a456-426614174000",
    "resource": {
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "name": "Desk 1",
        "type": "flexDesk"
    },
    "officeId": "3241",
    "user": {
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "email": "john.doe@example.com",
        "firstName": "John",
        "lastName": "Doe"
    },
    "createdAt": "2021-01-01T00:00:00.000Z",
    "updatedAt": "2021-01-01T00:00:00.000Z"
}
🟢201Created
🟠401Unauthorized
🟠403Forbidden
Previous
Lists company bookings
Next
Lists single company booking
Built with