API-Referenz
Jeder Endpunkt einmal, erzeugt aus der OpenAPI-Datei von Cubrel: zuerst für jedes Modul über {module}, dann für Kontakte als Beispiel mit ihren echten Feldern. Die Beschreibungen der Endpunkte sind auf Englisch.
Dein Workspace hat seine eigenen Module und Felder. Die genaue Liste steht in der OpenAPI-Datei deines Tokens unter Einstellungen > Integrationen > API-Token, mit OpenAPI herunterladen neben dem Token; Postman, Insomnia und Bruno importieren sie. Die allgemeine Datei dieser Seite liegt unter /openapi.json.
Any module
GET/{module}
List records
Parameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
module * | path | string | The module's slug, as in its URL in the app, such as `contacts`. |
per_page | query | integer | |
page | query | integer | |
search | query | string | Matches the module's searchable fields. |
sort | query | string | A sortable field. |
direction | query | string | |
filter | query | string | The slug or id of a saved list filter. |
Antworten
0The token is missing, invalid or revoked.1The token lacks the ability for this module and action.2Rate limit reached. Retry after the time in the Retry-After header.200One page of records.
POST/{module}
Create a record
Parameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
module * | path | string | The module's slug, as in its URL in the app, such as `contacts`. |
Anfragerumpf: 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.
| Name | Typ | Pflicht | Werte | Beschreibung |
|---|---|---|---|---|
line_items | LineItemInput[] | |||
attendees | AttendeeInput[] |
Antworten
0The token is missing, invalid or revoked.1The token lacks the ability for this module and action.2Rate limit reached. Retry after the time in the Retry-After header.3No such record, or a module the API can't reach.4A value was refused. `errors` names each field, such as `line_items.0.sku`.201The 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.
Parameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
module * | path | string | The module's slug, as in its URL in the app, such as `contacts`. |
match * | query | string | A writable text or email field, such as `sku` or `email`. |
Anfragerumpf: 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.
| Name | Typ | Pflicht | Werte | Beschreibung |
|---|---|---|---|---|
line_items | LineItemInput[] | |||
attendees | AttendeeInput[] |
Antworten
0The token is missing, invalid or revoked.1The token lacks the ability for this module and action.2Rate limit reached. Retry after the time in the Retry-After header.3No such record, or a module the API can't reach.4A value was refused. `errors` names each field, such as `line_items.0.sku`.200The record.201The record.
GET/{module}/{id}
Get a record
Includes `related` records, and `line_items` on quotes and orders, `attendees` on meetings.
Parameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
module * | path | string | The module's slug, as in its URL in the app, such as `contacts`. |
id * | path | string (uuid) |
Antworten
0The token is missing, invalid or revoked.1The token lacks the ability for this module and action.2Rate limit reached. Retry after the time in the Retry-After header.200The record.404No 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.
Parameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
module * | path | string | The module's slug, as in its URL in the app, such as `contacts`. |
id * | path | string (uuid) |
Anfragerumpf: 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.
| Name | Typ | Pflicht | Werte | Beschreibung |
|---|---|---|---|---|
line_items | LineItemInput[] | |||
attendees | AttendeeInput[] |
Antworten
0The token is missing, invalid or revoked.1The token lacks the ability for this module and action.2Rate limit reached. Retry after the time in the Retry-After header.3No such record, or a module the API can't reach.4A value was refused. `errors` names each field, such as `line_items.0.sku`.200The record.
DELETE/{module}/{id}
Delete a record
Moves the record to the Bin.
Parameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
module * | path | string | The module's slug, as in its URL in the app, such as `contacts`. |
id * | path | string (uuid) |
Antworten
0The token is missing, invalid or revoked.1The token lacks the ability for this module and action.2Rate limit reached. Retry after the time in the Retry-After header.204Deleted.404No such record, or a module the API can't reach.
GET/{module}/relationships
List the module's relationships
Parameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
module * | path | string | The module's slug, as in its URL in the app, such as `contacts`. |
Antworten
0The token is missing, invalid or revoked.1The token lacks the ability for this module and action.2Rate limit reached. Retry after the time in the Retry-After header.200The 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.
Parameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
module * | path | string | The module's slug, as in its URL in the app, such as `contacts`. |
id * | path | string (uuid) | |
relationship * | path | string |
Anfragerumpf: object
| Name | Typ | Pflicht | Werte | Beschreibung |
|---|---|---|---|---|
related_ids | string (uuid)[] | ja |
Antworten
0The token is missing, invalid or revoked.1The token lacks the ability for this module and action.2Rate limit reached. Retry after the time in the Retry-After header.3No such record, or a module the API can't reach.4A value was refused. `errors` names each field, such as `line_items.0.sku`.201The linked records.
DELETE/{module}/{id}/relationships/{relationship}/{relatedId}
Unlink a record
Parameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
module * | path | string | The module's slug, as in its URL in the app, such as `contacts`. |
id * | path | string (uuid) | |
relationship * | path | string | |
relatedId * | path | string (uuid) |
Antworten
0The token is missing, invalid or revoked.1The token lacks the ability for this module and action.2Rate limit reached. Retry after the time in the Retry-After header.204Unlinked.404No such record, or a module the API can't reach.
Example: Contacts
GET/contacts
List records
Parameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
per_page | query | integer | |
page | query | integer | |
search | query | string | Matches the module's searchable fields. |
sort | query | string | A sortable field. |
direction | query | string | |
filter | query | string | The slug or id of a saved list filter. |
Antworten
0The token is missing, invalid or revoked.1The token lacks the ability for this module and action.2Rate limit reached. Retry after the time in the Retry-After header.200One page of records.
POST/contacts
Create a record
Anfragerumpf: ContactsInput
| Name | Typ | Pflicht | Werte | Beschreibung |
|---|---|---|---|---|
name | string | ja | Name | |
description | string | Description | ||
first_name | string | First Name | ||
last_name | string | Last Name | ||
email | string (email) | |||
phone | string | Phone | ||
position | string | Position | ||
notes | string | Notes | ||
avatar | string | Profile Picture | ||
address | object | Address | ||
mobile | string | Mobile | ||
salutation | string | mr, ms, mx, dr, prof | Salutation | |
department | string | Department | ||
marketing_consent | boolean | Marketing Consent | ||
consent_date | string (date) | Consent Date |
Antworten
0The token is missing, invalid or revoked.1The token lacks the ability for this module and action.2Rate limit reached. Retry after the time in the Retry-After header.3No such record, or a module the API can't reach.4A value was refused. `errors` names each field, such as `line_items.0.sku`.201The 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.
Parameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
match * | query | string | A writable text or email field, such as `sku` or `email`. |
Anfragerumpf: ContactsInput
| Name | Typ | Pflicht | Werte | Beschreibung |
|---|---|---|---|---|
name | string | ja | Name | |
description | string | Description | ||
first_name | string | First Name | ||
last_name | string | Last Name | ||
email | string (email) | |||
phone | string | Phone | ||
position | string | Position | ||
notes | string | Notes | ||
avatar | string | Profile Picture | ||
address | object | Address | ||
mobile | string | Mobile | ||
salutation | string | mr, ms, mx, dr, prof | Salutation | |
department | string | Department | ||
marketing_consent | boolean | Marketing Consent | ||
consent_date | string (date) | Consent Date |
Antworten
0The token is missing, invalid or revoked.1The token lacks the ability for this module and action.2Rate limit reached. Retry after the time in the Retry-After header.3No such record, or a module the API can't reach.4A value was refused. `errors` names each field, such as `line_items.0.sku`.200The record.201The record.
GET/contacts/{id}
Get a record
Includes `related` records, and `line_items` on quotes and orders, `attendees` on meetings.
Parameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
id * | path | string (uuid) |
Antworten
0The token is missing, invalid or revoked.1The token lacks the ability for this module and action.2Rate limit reached. Retry after the time in the Retry-After header.200The record.404No 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.
Parameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
id * | path | string (uuid) |
Anfragerumpf: ContactsInput
| Name | Typ | Pflicht | Werte | Beschreibung |
|---|---|---|---|---|
name | string | ja | Name | |
description | string | Description | ||
first_name | string | First Name | ||
last_name | string | Last Name | ||
email | string (email) | |||
phone | string | Phone | ||
position | string | Position | ||
notes | string | Notes | ||
avatar | string | Profile Picture | ||
address | object | Address | ||
mobile | string | Mobile | ||
salutation | string | mr, ms, mx, dr, prof | Salutation | |
department | string | Department | ||
marketing_consent | boolean | Marketing Consent | ||
consent_date | string (date) | Consent Date |
Antworten
0The token is missing, invalid or revoked.1The token lacks the ability for this module and action.2Rate limit reached. Retry after the time in the Retry-After header.3No such record, or a module the API can't reach.4A value was refused. `errors` names each field, such as `line_items.0.sku`.200The record.
DELETE/contacts/{id}
Delete a record
Moves the record to the Bin.
Parameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
id * | path | string (uuid) |
Antworten
0The token is missing, invalid or revoked.1The token lacks the ability for this module and action.2Rate limit reached. Retry after the time in the Retry-After header.204Deleted.404No such record, or a module the API can't reach.
GET/contacts/relationships
List the module's relationships
Antworten
0The token is missing, invalid or revoked.1The token lacks the ability for this module and action.2Rate limit reached. Retry after the time in the Retry-After header.200The 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.
Parameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
id * | path | string (uuid) | |
relationship * | path | string |
Anfragerumpf: object
| Name | Typ | Pflicht | Werte | Beschreibung |
|---|---|---|---|---|
related_ids | string (uuid)[] | ja |
Antworten
0The token is missing, invalid or revoked.1The token lacks the ability for this module and action.2Rate limit reached. Retry after the time in the Retry-After header.3No such record, or a module the API can't reach.4A value was refused. `errors` names each field, such as `line_items.0.sku`.201The linked records.
DELETE/contacts/{id}/relationships/{relationship}/{relatedId}
Unlink a record
Parameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
id * | path | string (uuid) | |
relationship * | path | string | |
relatedId * | path | string (uuid) |
Antworten
0The token is missing, invalid or revoked.1The token lacks the ability for this module and action.2Rate limit reached. Retry after the time in the Retry-After header.204Unlinked.404No 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.
Parameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
module * | path | string | A ticket module's slug, such as `cases`. |
Anfragerumpf: object
| Name | Typ | Pflicht | Werte | Beschreibung |
|---|---|---|---|---|
requester_email | string (email) | ja | ||
requester_name | string | |||
subject | string | ja | ||
body | string | ja |
Antworten
201The record.422A 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.
Parameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
module * | path | string | A ticket module's slug, such as `cases`. |
id * | path | string (uuid) |
Antworten
200The ticket's messages, oldest first.
POST/tickets/{module}/{id}/messages
Add a message to a ticket
Parameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
module * | path | string | A ticket module's slug, such as `cases`. |
id * | path | string (uuid) |
Anfragerumpf: object
| Name | Typ | Pflicht | Werte | Beschreibung |
|---|---|---|---|---|
body | string | ja | ||
author | string | customer, agent | ||
name | string | |||
email | string (email) |
Antworten
201The new message.422A value was refused. `errors` names each field, such as `line_items.0.sku`.
Webhooks
{module}.created{module}.updated{module}.deleted{module}.message_created
| Name | Typ | Beschreibung |
|---|---|---|
id | string (uuid) | Unique per delivery; skip an id you have seen. |
event | string | |
occurred_at | string (date-time) | |
data | object | The record's fields as GET returns them, with line_items on quotes and orders; only the id on deleted. |
changes | object | On updated: each changed field with from and to. |