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
    • Get a resource by id
      GET
    • Lists company resources
      GET
  • Offices
    • Lists company offices
      GET
    • Check User into Office
      POST
  • Scheduling
    • Lists company scheduling
      GET
    • Delete scheduling statuses by IDs
      DELETE
    • Add new scheduling statuses for a user
      POST
  • Scheduling Options
    • Lists company scheduling options
      GET
  • Rooms
    • Lists company rooms
      GET
    • Gets single room
      GET
    • Lists room bookings
      GET
    • Create a room booking
      POST
    • Gets single room booking
      GET
    • Update a room booking
      PATCH
    • Check in to a room booking
      PATCH
    • Cancel a room booking
      PATCH
  1. Bookings

Creates booking

POST
/bookings
Creates booking

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Header Params

Body Params application/jsonRequired

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 Code 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: Bearer <token>' \
--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

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": "ca99dd78-2efb-49eb-a254-be0e3d56ca15",
    "user": {
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "email": "john.doe@example.com",
        "firstName": "John",
        "lastName": "Doe"
    },
    "cancelledBy": "auto",
    "cancelledByUserId": "123e4567-e89b-12d3-a456-426614174000",
    "history": [
        {
            "action": "created",
            "source": "deskbird-api",
            "userUuid": "123e4567-e89b-12d3-a456-426614174000",
            "completedAt": "2021-01-01T00:00:00.000Z"
        }
    ],
    "createdAt": "2021-01-01T00:00:00.000Z",
    "updatedAt": "2021-01-01T00:00:00.000Z"
}
🟠401Unauthorized
🟠403Forbidden
Previous
Lists company bookings
Next
Lists single company booking
Built with