Skip to content

API Reference ​

Every endpoint once, generated from Cubrel's OpenAPI file: first for any module through {module}, then for Contacts as a worked example with its real fields.

Your workspace has its own modules and fields. For the exact list, download the OpenAPI file for your token under Workspace > Integrations > API Tokens, with Download OpenAPI next to the token, and import it into Postman, Insomnia or Bruno. The generic file of this page is at /openapi.json.

Any module

GET/{module}

List records

Parameters

NameInTypeDescription
module *pathstringThe module's slug, as in its URL in the app, such as `contacts`.
per_pagequeryinteger
pagequeryinteger
searchquerystringMatches the module's searchable fields.
sortquerystringA sortable field.
directionquerystring
filterquerystringThe slug or id of a saved list filter.

Responses

  • 0 The token is missing, invalid or revoked.
  • 1 The token lacks the ability for this module and action.
  • 2 Rate limit reached. Retry after the time in the Retry-After header.
  • 200 One page of records.

POST/{module}

Create a record

Parameters

NameInTypeDescription
module *pathstringThe module's slug, as in its URL in the app, such as `contacts`.

Request body: RecordInput

The module's writable fields, custom fields included, as one flat object. Download your workspace's OpenAPI file from API Tokens for the exact fields. `line_items` on quotes and orders, `attendees` on meetings.

NameTypeRequiredValuesDescription
line_itemsLineItemInput[]
attendeesAttendeeInput[]

Responses

  • 0 The token is missing, invalid or revoked.
  • 1 The token lacks the ability for this module and action.
  • 2 Rate limit reached. Retry after the time in the Retry-After header.
  • 3 No such record, or a module the API can't reach.
  • 4 A value was refused. `errors` names each field, such as `line_items.0.sku`.
  • 201 The record.

PUT/{module}

Create or update by a matching field

Updates the one record whose `match` field has the value sent in the body, or creates a record when none has it. More than one match is a 422.

Parameters

NameInTypeDescription
module *pathstringThe module's slug, as in its URL in the app, such as `contacts`.
match *querystringA writable text or email field, such as `sku` or `email`.

Request body: RecordInput

The module's writable fields, custom fields included, as one flat object. Download your workspace's OpenAPI file from API Tokens for the exact fields. `line_items` on quotes and orders, `attendees` on meetings.

NameTypeRequiredValuesDescription
line_itemsLineItemInput[]
attendeesAttendeeInput[]

Responses

  • 0 The token is missing, invalid or revoked.
  • 1 The token lacks the ability for this module and action.
  • 2 Rate limit reached. Retry after the time in the Retry-After header.
  • 3 No such record, or a module the API can't reach.
  • 4 A value was refused. `errors` names each field, such as `line_items.0.sku`.
  • 200 The record.
  • 201 The record.

GET/{module}/{id}

Get a record

Includes `related` records, and `line_items` on quotes and orders, `attendees` on meetings.

Parameters

NameInTypeDescription
module *pathstringThe module's slug, as in its URL in the app, such as `contacts`.
id *pathstring (uuid)

Responses

  • 0 The token is missing, invalid or revoked.
  • 1 The token lacks the ability for this module and action.
  • 2 Rate limit reached. Retry after the time in the Retry-After header.
  • 200 The record.
  • 404 No such record, or a module the API can't reach.

PATCH/{module}/{id}

Update a record

Only the fields you send change. `line_items` or `attendees`, when sent, is the complete new list. PUT does the same.

Parameters

NameInTypeDescription
module *pathstringThe module's slug, as in its URL in the app, such as `contacts`.
id *pathstring (uuid)

Request body: RecordInput

The module's writable fields, custom fields included, as one flat object. Download your workspace's OpenAPI file from API Tokens for the exact fields. `line_items` on quotes and orders, `attendees` on meetings.

NameTypeRequiredValuesDescription
line_itemsLineItemInput[]
attendeesAttendeeInput[]

Responses

  • 0 The token is missing, invalid or revoked.
  • 1 The token lacks the ability for this module and action.
  • 2 Rate limit reached. Retry after the time in the Retry-After header.
  • 3 No such record, or a module the API can't reach.
  • 4 A value was refused. `errors` names each field, such as `line_items.0.sku`.
  • 200 The record.

DELETE/{module}/{id}

Delete a record

Moves the record to the Bin.

Parameters

NameInTypeDescription
module *pathstringThe module's slug, as in its URL in the app, such as `contacts`.
id *pathstring (uuid)

Responses

  • 0 The token is missing, invalid or revoked.
  • 1 The token lacks the ability for this module and action.
  • 2 Rate limit reached. Retry after the time in the Retry-After header.
  • 204 Deleted.
  • 404 No such record, or a module the API can't reach.

GET/{module}/relationships

List the module's relationships

Parameters

NameInTypeDescription
module *pathstringThe module's slug, as in its URL in the app, such as `contacts`.

Responses

  • 0 The token is missing, invalid or revoked.
  • 1 The token lacks the ability for this module and action.
  • 2 Rate limit reached. Retry after the time in the Retry-After header.
  • 200 The relationships records of this module can be linked through.

POST/{module}/{id}/relationships/{relationship}

Link records

A link that exists, or that the relationship's type doesn't allow, is a 422.

Parameters

NameInTypeDescription
module *pathstringThe module's slug, as in its URL in the app, such as `contacts`.
id *pathstring (uuid)
relationship *pathstring

Request body: object

NameTypeRequiredValuesDescription
related_idsstring (uuid)[]yes

Responses

  • 0 The token is missing, invalid or revoked.
  • 1 The token lacks the ability for this module and action.
  • 2 Rate limit reached. Retry after the time in the Retry-After header.
  • 3 No such record, or a module the API can't reach.
  • 4 A value was refused. `errors` names each field, such as `line_items.0.sku`.
  • 201 The linked records.

DELETE/{module}/{id}/relationships/{relationship}/{relatedId}

Unlink a record

Parameters

NameInTypeDescription
module *pathstringThe module's slug, as in its URL in the app, such as `contacts`.
id *pathstring (uuid)
relationship *pathstring
relatedId *pathstring (uuid)

Responses

  • 0 The token is missing, invalid or revoked.
  • 1 The token lacks the ability for this module and action.
  • 2 Rate limit reached. Retry after the time in the Retry-After header.
  • 204 Unlinked.
  • 404 No such record, or a module the API can't reach.

Example: Contacts

GET/contacts

List records

Parameters

NameInTypeDescription
per_pagequeryinteger
pagequeryinteger
searchquerystringMatches the module's searchable fields.
sortquerystringA sortable field.
directionquerystring
filterquerystringThe slug or id of a saved list filter.

Responses

  • 0 The token is missing, invalid or revoked.
  • 1 The token lacks the ability for this module and action.
  • 2 Rate limit reached. Retry after the time in the Retry-After header.
  • 200 One page of records.

POST/contacts

Create a record

Request body: ContactsInput

NameTypeRequiredValuesDescription
namestringyesName
descriptionstringDescription
first_namestringFirst Name
last_namestringLast Name
emailstring (email)Email
phonestringPhone
positionstringPosition
notesstringNotes
avatarstringProfile Picture
addressobjectAddress
mobilestringMobile
salutationstringmr, ms, mx, dr, profSalutation
departmentstringDepartment
marketing_consentbooleanMarketing Consent
consent_datestring (date)Consent Date

Responses

  • 0 The token is missing, invalid or revoked.
  • 1 The token lacks the ability for this module and action.
  • 2 Rate limit reached. Retry after the time in the Retry-After header.
  • 3 No such record, or a module the API can't reach.
  • 4 A value was refused. `errors` names each field, such as `line_items.0.sku`.
  • 201 The record.

PUT/contacts

Create or update by a matching field

Updates the one record whose `match` field has the value sent in the body, or creates a record when none has it. More than one match is a 422.

Parameters

NameInTypeDescription
match *querystringA writable text or email field, such as `sku` or `email`.

Request body: ContactsInput

NameTypeRequiredValuesDescription
namestringyesName
descriptionstringDescription
first_namestringFirst Name
last_namestringLast Name
emailstring (email)Email
phonestringPhone
positionstringPosition
notesstringNotes
avatarstringProfile Picture
addressobjectAddress
mobilestringMobile
salutationstringmr, ms, mx, dr, profSalutation
departmentstringDepartment
marketing_consentbooleanMarketing Consent
consent_datestring (date)Consent Date

Responses

  • 0 The token is missing, invalid or revoked.
  • 1 The token lacks the ability for this module and action.
  • 2 Rate limit reached. Retry after the time in the Retry-After header.
  • 3 No such record, or a module the API can't reach.
  • 4 A value was refused. `errors` names each field, such as `line_items.0.sku`.
  • 200 The record.
  • 201 The record.

GET/contacts/{id}

Get a record

Includes `related` records, and `line_items` on quotes and orders, `attendees` on meetings.

Parameters

NameInTypeDescription
id *pathstring (uuid)

Responses

  • 0 The token is missing, invalid or revoked.
  • 1 The token lacks the ability for this module and action.
  • 2 Rate limit reached. Retry after the time in the Retry-After header.
  • 200 The record.
  • 404 No such record, or a module the API can't reach.

PATCH/contacts/{id}

Update a record

Only the fields you send change. `line_items` or `attendees`, when sent, is the complete new list. PUT does the same.

Parameters

NameInTypeDescription
id *pathstring (uuid)

Request body: ContactsInput

NameTypeRequiredValuesDescription
namestringyesName
descriptionstringDescription
first_namestringFirst Name
last_namestringLast Name
emailstring (email)Email
phonestringPhone
positionstringPosition
notesstringNotes
avatarstringProfile Picture
addressobjectAddress
mobilestringMobile
salutationstringmr, ms, mx, dr, profSalutation
departmentstringDepartment
marketing_consentbooleanMarketing Consent
consent_datestring (date)Consent Date

Responses

  • 0 The token is missing, invalid or revoked.
  • 1 The token lacks the ability for this module and action.
  • 2 Rate limit reached. Retry after the time in the Retry-After header.
  • 3 No such record, or a module the API can't reach.
  • 4 A value was refused. `errors` names each field, such as `line_items.0.sku`.
  • 200 The record.

DELETE/contacts/{id}

Delete a record

Moves the record to the Bin.

Parameters

NameInTypeDescription
id *pathstring (uuid)

Responses

  • 0 The token is missing, invalid or revoked.
  • 1 The token lacks the ability for this module and action.
  • 2 Rate limit reached. Retry after the time in the Retry-After header.
  • 204 Deleted.
  • 404 No such record, or a module the API can't reach.

GET/contacts/relationships

List the module's relationships

Responses

  • 0 The token is missing, invalid or revoked.
  • 1 The token lacks the ability for this module and action.
  • 2 Rate limit reached. Retry after the time in the Retry-After header.
  • 200 The relationships records of this module can be linked through.

POST/contacts/{id}/relationships/{relationship}

Link records

A link that exists, or that the relationship's type doesn't allow, is a 422.

Parameters

NameInTypeDescription
id *pathstring (uuid)
relationship *pathstring

Request body: object

NameTypeRequiredValuesDescription
related_idsstring (uuid)[]yes

Responses

  • 0 The token is missing, invalid or revoked.
  • 1 The token lacks the ability for this module and action.
  • 2 Rate limit reached. Retry after the time in the Retry-After header.
  • 3 No such record, or a module the API can't reach.
  • 4 A value was refused. `errors` names each field, such as `line_items.0.sku`.
  • 201 The linked records.

DELETE/contacts/{id}/relationships/{relationship}/{relatedId}

Unlink a record

Parameters

NameInTypeDescription
id *pathstring (uuid)
relationship *pathstring
relatedId *pathstring (uuid)

Responses

  • 0 The token is missing, invalid or revoked.
  • 1 The token lacks the ability for this module and action.
  • 2 Rate limit reached. Retry after the time in the Retry-After header.
  • 204 Unlinked.
  • 404 No such record, or a module the API can't reach.

Tickets

POST/tickets/{module}

Open a ticket

Opens a ticket with its first message, sent by the requester.

Parameters

NameInTypeDescription
module *pathstringA ticket module's slug, such as `cases`.

Request body: object

NameTypeRequiredValuesDescription
requester_emailstring (email)yes
requester_namestring
subjectstringyes
bodystringyes

Responses

  • 201 The record.
  • 422 A value was refused. `errors` names each field, such as `line_items.0.sku`.

GET/tickets/{module}/{id}/messages

List a ticket's messages

The conversation without internal notes.

Parameters

NameInTypeDescription
module *pathstringA ticket module's slug, such as `cases`.
id *pathstring (uuid)

Responses

  • 200 The ticket's messages, oldest first.

POST/tickets/{module}/{id}/messages

Add a message to a ticket

Parameters

NameInTypeDescription
module *pathstringA ticket module's slug, such as `cases`.
id *pathstring (uuid)

Request body: object

NameTypeRequiredValuesDescription
bodystringyes
authorstringcustomer, agent
namestring
emailstring (email)

Responses

  • 201 The new message.
  • 422 A value was refused. `errors` names each field, such as `line_items.0.sku`.

Webhooks

  • {module}.created
  • {module}.updated
  • {module}.deleted
  • {module}.message_created
NameTypeDescription
idstring (uuid)Unique per delivery; skip an id you have seen.
eventstring
occurred_atstring (date-time)
dataobjectThe record's fields as GET returns them, with line_items on quotes and orders; only the id on deleted.
changesobjectOn updated: each changed field with from and to.