Skip to main content

Contacts

Every call needs Authorization: Bearer <key>. 16 calls:

List contacts​

GET /v1/contacts

Agents see the contacts they own, contacts in conversations they can see, and unowned contacts with no conversation yet.

Query parameters

NameTypeRequiredDescription
limitintegerNoFrom 1 to 100. Default 50.
cursorstringNoOpaque cursor from next_cursor. Up to 512 characters.
qstringNoSearch name, phone, email or company. Up to 100 characters.
phonestringNoPhone number in E.164 format.
labelstringNoUp to 64 characters.
segment_idstring (uuid)No
consent_statusenumNoOne of: unknown, opted_in, opted_out.
owner_user_idstring (uuid)No
line_idstringNoContacts whose sticky sender is this line.

Headers

NameTypeRequiredDescription
x-workspace-idstringNoWorkspace for session (JWT) callers. API keys carry their own workspace.

Response 200

FieldTypeDescription
dataobject[]
data[].assigned_line_idstring or nullLine id (ln_...).
data[].capability_checked_atstring (date-time) or nullISO 8601 timestamp.
data[].companystring or null
data[].consent_atstring (date-time) or nullISO 8601 timestamp.
data[].consent_sourcestring or null
data[].consent_statusenumOne of: unknown, opted_in, opted_out.
data[].created_atstring (date-time)ISO 8601 timestamp.
data[].emailstring or null
data[].fieldsobject
data[].first_namestring or null
data[].first_reply_atstring (date-time) or nullISO 8601 timestamp.
data[].idstringContact id (ctc_...).
data[].imessage_capableboolean or null
data[].labelsstring[]
data[].last_inbound_atstring (date-time) or nullISO 8601 timestamp.
data[].last_namestring or null
data[].last_outbound_atstring (date-time) or nullISO 8601 timestamp.
data[].owner_user_idstring (uuid) or null
data[].phonestringPhone number in E.164 format.
data[].updated_atstring (date-time)ISO 8601 timestamp.
next_cursorstring or nullPass as cursor to get the next page; null at the end.

Errors: 400, 401, 403, 404, 409, 413, 415, 429, 500. See errors for the shape and codes.

Create a contact​

POST /v1/contacts

The phone number is normalised to E.164. A number that opted out before is created opted out.

Headers

NameTypeRequiredDescription
x-workspace-idstringNoWorkspace for session (JWT) callers. API keys carry their own workspace.
idempotency-keystringNoMakes the write safe to retry for 24 hours. 1 to 255 printable characters. Keys starting with outreach:, workflow: or agent: are reserved for messages bubbl3 sends itself and are refused with 400. Up to 255 characters.

Request body

FieldTypeRequiredDescription
companystringNoUp to 200 characters.
consent_sourcestringNoUp to 200 characters.
consent_statusenumNoOne of: unknown, opted_in.
emailstring (email)NoUp to 254 characters.
fieldsobjectNoCustom fields.
first_namestringNoUp to 100 characters.
labelsstring[]NoUp to 50 items.
last_namestringNoUp to 100 characters.
owner_user_idstring (uuid)No
phonestringYesPhone number. E.164, or a US/Canada number such as (917) 555-0142. Up to 32 characters.

Response 201

FieldTypeDescription
assigned_line_idstring or nullLine id (ln_...).
capability_checked_atstring (date-time) or nullISO 8601 timestamp.
companystring or null
consent_atstring (date-time) or nullISO 8601 timestamp.
consent_sourcestring or null
consent_statusenumOne of: unknown, opted_in, opted_out.
created_atstring (date-time)ISO 8601 timestamp.
emailstring or null
fieldsobject
first_namestring or null
first_reply_atstring (date-time) or nullISO 8601 timestamp.
idstringContact id (ctc_...).
imessage_capableboolean or null
labelsstring[]
last_inbound_atstring (date-time) or nullISO 8601 timestamp.
last_namestring or null
last_outbound_atstring (date-time) or nullISO 8601 timestamp.
owner_user_idstring (uuid) or null
phonestringPhone number in E.164 format.
updated_atstring (date-time)ISO 8601 timestamp.

Errors: 400, 401, 403, 404, 409, 413, 415, 429, 500. See errors for the shape and codes.

Export contacts as CSV​

GET /v1/contacts/export

Streams every matching contact the caller can see. Cells that a spreadsheet would run as a formula are prefixed with an apostrophe.

Query parameters

NameTypeRequiredDescription
formatenumNoOne of: csv. Default "csv".
labelstringNoUp to 64 characters.
segment_idstring (uuid)No
consent_statusenumNoOne of: unknown, opted_in, opted_out.

Headers

NameTypeRequiredDescription
x-workspace-idstringNoWorkspace for session (JWT) callers. API keys carry their own workspace.

Response 200

No body.

Errors: 400, 401, 403, 404, 409, 413, 415, 429, 500. See errors for the shape and codes.

Import contacts from CSV​

POST /v1/contacts/import

Checks the header and mapping, then queues the import (up to 50000 rows) and returns the job.

Headers

NameTypeRequiredDescription
x-workspace-idstringNoWorkspace for session (JWT) callers. API keys carry their own workspace.
idempotency-keystringNoMakes the write safe to retry for 24 hours. 1 to 255 printable characters. Keys starting with outreach:, workflow: or agent: are reserved for messages bubbl3 sends itself and are refused with 400. Up to 255 characters.

Request body

FieldTypeRequiredDescription
consent_sourcestringNoUp to 200 characters.
csvstringYesUp to 5000000 characters.
labelsstring[]NoUp to 10 items.
mappingobjectYes
update_existingbooleanNoDefault false.

Response 202

FieldTypeDescription
created_atstring (date-time)ISO 8601 timestamp.
errorsobject[]
errors[].messagestring
errors[].rowintegerFrom -9007199254740991 to 9007199254740991.
idstring (uuid)
importedintegerFrom -9007199254740991 to 9007199254740991.
skippedintegerFrom -9007199254740991 to 9007199254740991.
statusenumOne of: queued, running, completed, failed.
total_rowsinteger or nullFrom -9007199254740991 to 9007199254740991.
updatedintegerFrom -9007199254740991 to 9007199254740991.

Errors: 400, 401, 403, 404, 409, 413, 415, 429, 500. See errors for the shape and codes.

Get a contact​

GET /v1/contacts/:id

Path parameters

NameTypeRequiredDescription
idstringYesContact id (ctc_...).

Headers

NameTypeRequiredDescription
x-workspace-idstringNoWorkspace for session (JWT) callers. API keys carry their own workspace.

Response 200

FieldTypeDescription
assigned_line_idstring or nullLine id (ln_...).
capability_checked_atstring (date-time) or nullISO 8601 timestamp.
companystring or null
consent_atstring (date-time) or nullISO 8601 timestamp.
consent_sourcestring or null
consent_statusenumOne of: unknown, opted_in, opted_out.
created_atstring (date-time)ISO 8601 timestamp.
emailstring or null
fieldsobject
first_namestring or null
first_reply_atstring (date-time) or nullISO 8601 timestamp.
idstringContact id (ctc_...).
imessage_capableboolean or null
labelsstring[]
last_inbound_atstring (date-time) or nullISO 8601 timestamp.
last_namestring or null
last_outbound_atstring (date-time) or nullISO 8601 timestamp.
owner_user_idstring (uuid) or null
phonestringPhone number in E.164 format.
updated_atstring (date-time)ISO 8601 timestamp.

Errors: 400, 401, 403, 404, 409, 413, 415, 429, 500. See errors for the shape and codes.

Update a contact​

PATCH /v1/contacts/:id

labels and fields replace the current values. Consent changes go through the consent and opt-out routes, except that moving a contact to a number that opted out before makes it opted out.

Path parameters

NameTypeRequiredDescription
idstringYesContact id (ctc_...).

Headers

NameTypeRequiredDescription
x-workspace-idstringNoWorkspace for session (JWT) callers. API keys carry their own workspace.
idempotency-keystringNoMakes the write safe to retry for 24 hours. 1 to 255 printable characters. Keys starting with outreach:, workflow: or agent: are reserved for messages bubbl3 sends itself and are refused with 400. Up to 255 characters.

Request body

FieldTypeRequiredDescription
companystring or nullNoUp to 200 characters.
emailstring (email) or nullNoUp to 254 characters.
fieldsobjectNoCustom fields.
first_namestring or nullNoUp to 100 characters.
labelsstring[]NoUp to 50 items.
last_namestring or nullNoUp to 100 characters.
owner_user_idstring (uuid) or nullNo
phonestringNoPhone number. E.164, or a US/Canada number such as (917) 555-0142. Up to 32 characters.

Response 200

FieldTypeDescription
assigned_line_idstring or nullLine id (ln_...).
capability_checked_atstring (date-time) or nullISO 8601 timestamp.
companystring or null
consent_atstring (date-time) or nullISO 8601 timestamp.
consent_sourcestring or null
consent_statusenumOne of: unknown, opted_in, opted_out.
created_atstring (date-time)ISO 8601 timestamp.
emailstring or null
fieldsobject
first_namestring or null
first_reply_atstring (date-time) or nullISO 8601 timestamp.
idstringContact id (ctc_...).
imessage_capableboolean or null
labelsstring[]
last_inbound_atstring (date-time) or nullISO 8601 timestamp.
last_namestring or null
last_outbound_atstring (date-time) or nullISO 8601 timestamp.
owner_user_idstring (uuid) or null
phonestringPhone number in E.164 format.
updated_atstring (date-time)ISO 8601 timestamp.

Errors: 400, 401, 403, 404, 409, 413, 415, 429, 500. See errors for the shape and codes.

Delete a contact​

DELETE /v1/contacts/:id

Deletes the contact with its conversations, messages and notes. Opt-out records are kept, so the number stays opted out if it is added again.

Path parameters

NameTypeRequiredDescription
idstringYesContact id (ctc_...).

Headers

NameTypeRequiredDescription
x-workspace-idstringNoWorkspace for session (JWT) callers. API keys carry their own workspace.
idempotency-keystringNoMakes the write safe to retry for 24 hours. 1 to 255 printable characters. Keys starting with outreach:, workflow: or agent: are reserved for messages bubbl3 sends itself and are refused with 400. Up to 255 characters.

Response 200

FieldTypeDescription
deletedenumOne of: true.
idstringContact id (ctc_...).

Errors: 400, 401, 403, 404, 409, 413, 415, 429, 500. See errors for the shape and codes.

POST /v1/contacts/:id/consent

opted_in records where consent came from. opted_out works like opt-out.

Path parameters

NameTypeRequiredDescription
idstringYesContact id (ctc_...).

Headers

NameTypeRequiredDescription
x-workspace-idstringNoWorkspace for session (JWT) callers. API keys carry their own workspace.
idempotency-keystringNoMakes the write safe to retry for 24 hours. 1 to 255 printable characters. Keys starting with outreach:, workflow: or agent: are reserved for messages bubbl3 sends itself and are refused with 400. Up to 255 characters.

Request body

FieldTypeRequiredDescription
sourcestringYesWhere consent came from, e.g. web_form. Up to 200 characters.
statusenumYesOne of: unknown, opted_in, opted_out.

Response 200

FieldTypeDescription
assigned_line_idstring or nullLine id (ln_...).
capability_checked_atstring (date-time) or nullISO 8601 timestamp.
companystring or null
consent_atstring (date-time) or nullISO 8601 timestamp.
consent_sourcestring or null
consent_statusenumOne of: unknown, opted_in, opted_out.
created_atstring (date-time)ISO 8601 timestamp.
emailstring or null
fieldsobject
first_namestring or null
first_reply_atstring (date-time) or nullISO 8601 timestamp.
idstringContact id (ctc_...).
imessage_capableboolean or null
labelsstring[]
last_inbound_atstring (date-time) or nullISO 8601 timestamp.
last_namestring or null
last_outbound_atstring (date-time) or nullISO 8601 timestamp.
owner_user_idstring (uuid) or null
phonestringPhone number in E.164 format.
updated_atstring (date-time)ISO 8601 timestamp.

Errors: 400, 401, 403, 404, 409, 413, 415, 429, 500. See errors for the shape and codes.

Attach or detach a contact's labels​

POST /v1/contacts/:id/labels

Path parameters

NameTypeRequiredDescription
idstringYesContact id (ctc_...).

Headers

NameTypeRequiredDescription
x-workspace-idstringNoWorkspace for session (JWT) callers. API keys carry their own workspace.
idempotency-keystringNoMakes the write safe to retry for 24 hours. 1 to 255 printable characters. Keys starting with outreach:, workflow: or agent: are reserved for messages bubbl3 sends itself and are refused with 400. Up to 255 characters.

Request body

FieldTypeRequiredDescription
addstring[]NoUp to 50 items.
removestring[]NoUp to 50 items.

Response 200

FieldTypeDescription
assigned_line_idstring or nullLine id (ln_...).
capability_checked_atstring (date-time) or nullISO 8601 timestamp.
companystring or null
consent_atstring (date-time) or nullISO 8601 timestamp.
consent_sourcestring or null
consent_statusenumOne of: unknown, opted_in, opted_out.
created_atstring (date-time)ISO 8601 timestamp.
emailstring or null
fieldsobject
first_namestring or null
first_reply_atstring (date-time) or nullISO 8601 timestamp.
idstringContact id (ctc_...).
imessage_capableboolean or null
labelsstring[]
last_inbound_atstring (date-time) or nullISO 8601 timestamp.
last_namestring or null
last_outbound_atstring (date-time) or nullISO 8601 timestamp.
owner_user_idstring (uuid) or null
phonestringPhone number in E.164 format.
updated_atstring (date-time)ISO 8601 timestamp.

Errors: 400, 401, 403, 404, 409, 413, 415, 429, 500. See errors for the shape and codes.

Opt a contact out​

POST /v1/contacts/:id/opt-out

Stops all sending to the contact on every channel and records the opt-out.

Path parameters

NameTypeRequiredDescription
idstringYesContact id (ctc_...).

Headers

NameTypeRequiredDescription
x-workspace-idstringNoWorkspace for session (JWT) callers. API keys carry their own workspace.
idempotency-keystringNoMakes the write safe to retry for 24 hours. 1 to 255 printable characters. Keys starting with outreach:, workflow: or agent: are reserved for messages bubbl3 sends itself and are refused with 400. Up to 255 characters.

Request body

FieldTypeRequiredDescription
keywordstringNoUp to 40 characters.
sourcestringYesUp to 200 characters.

Response 200

FieldTypeDescription
assigned_line_idstring or nullLine id (ln_...).
capability_checked_atstring (date-time) or nullISO 8601 timestamp.
companystring or null
consent_atstring (date-time) or nullISO 8601 timestamp.
consent_sourcestring or null
consent_statusenumOne of: unknown, opted_in, opted_out.
created_atstring (date-time)ISO 8601 timestamp.
emailstring or null
fieldsobject
first_namestring or null
first_reply_atstring (date-time) or nullISO 8601 timestamp.
idstringContact id (ctc_...).
imessage_capableboolean or null
labelsstring[]
last_inbound_atstring (date-time) or nullISO 8601 timestamp.
last_namestring or null
last_outbound_atstring (date-time) or nullISO 8601 timestamp.
owner_user_idstring (uuid) or null
phonestringPhone number in E.164 format.
updated_atstring (date-time)ISO 8601 timestamp.

Errors: 400, 401, 403, 404, 409, 413, 415, 429, 500. See errors for the shape and codes.

List labels​

GET /v1/labels

Headers

NameTypeRequiredDescription
x-workspace-idstringNoWorkspace for session (JWT) callers. API keys carry their own workspace.

Response 200

FieldTypeDescription
dataobject[]
data[].colorstring or null
data[].contact_countintegerFrom 0 to 9007199254740991.
data[].created_atstring (date-time)ISO 8601 timestamp.
data[].idstring (uuid)
data[].namestring

Errors: 400, 401, 403, 404, 409, 413, 415, 429, 500. See errors for the shape and codes.

Create a label​

POST /v1/labels

Headers

NameTypeRequiredDescription
x-workspace-idstringNoWorkspace for session (JWT) callers. API keys carry their own workspace.
idempotency-keystringNoMakes the write safe to retry for 24 hours. 1 to 255 printable characters. Keys starting with outreach:, workflow: or agent: are reserved for messages bubbl3 sends itself and are refused with 400. Up to 255 characters.

Request body

FieldTypeRequiredDescription
colorstringNo
namestringYesUp to 64 characters.

Response 201

FieldTypeDescription
colorstring or null
contact_countintegerFrom 0 to 9007199254740991.
created_atstring (date-time)ISO 8601 timestamp.
idstring (uuid)
namestring

Errors: 400, 401, 403, 404, 409, 413, 415, 429, 500. See errors for the shape and codes.

Rename or recolour a label​

PATCH /v1/labels/:id

Path parameters

NameTypeRequiredDescription
idstring (uuid)Yes

Headers

NameTypeRequiredDescription
x-workspace-idstringNoWorkspace for session (JWT) callers. API keys carry their own workspace.
idempotency-keystringNoMakes the write safe to retry for 24 hours. 1 to 255 printable characters. Keys starting with outreach:, workflow: or agent: are reserved for messages bubbl3 sends itself and are refused with 400. Up to 255 characters.

Request body

FieldTypeRequiredDescription
colorstring or nullNo
namestringNoUp to 64 characters.

Response 200

FieldTypeDescription
colorstring or null
contact_countintegerFrom 0 to 9007199254740991.
created_atstring (date-time)ISO 8601 timestamp.
idstring (uuid)
namestring

Errors: 400, 401, 403, 404, 409, 413, 415, 429, 500. See errors for the shape and codes.

List segments with their current contact counts​

GET /v1/segments

Headers

NameTypeRequiredDescription
x-workspace-idstringNoWorkspace for session (JWT) callers. API keys carry their own workspace.

Response 200

FieldTypeDescription
dataobject[]
data[].contact_countinteger or nullFrom 0 to 9007199254740991.
data[].created_atstring (date-time)ISO 8601 timestamp.
data[].definitionany
data[].idstring (uuid)
data[].namestring

Errors: 400, 401, 403, 404, 409, 413, 415, 429, 500. See errors for the shape and codes.

Create a segment​

POST /v1/segments

Headers

NameTypeRequiredDescription
x-workspace-idstringNoWorkspace for session (JWT) callers. API keys carry their own workspace.
idempotency-keystringNoMakes the write safe to retry for 24 hours. 1 to 255 printable characters. Keys starting with outreach:, workflow: or agent: are reserved for messages bubbl3 sends itself and are refused with 400. Up to 255 characters.

Request body

FieldTypeRequiredDescription
definitionanyYes
namestringYesUp to 80 characters.

Response 201

FieldTypeDescription
contact_countinteger or nullFrom 0 to 9007199254740991.
created_atstring (date-time)ISO 8601 timestamp.
definitionany
idstring (uuid)
namestring

Errors: 400, 401, 403, 404, 409, 413, 415, 429, 500. See errors for the shape and codes.

Rename a segment or change its definition​

PATCH /v1/segments/:id

Path parameters

NameTypeRequiredDescription
idstring (uuid)Yes

Headers

NameTypeRequiredDescription
x-workspace-idstringNoWorkspace for session (JWT) callers. API keys carry their own workspace.
idempotency-keystringNoMakes the write safe to retry for 24 hours. 1 to 255 printable characters. Keys starting with outreach:, workflow: or agent: are reserved for messages bubbl3 sends itself and are refused with 400. Up to 255 characters.

Request body

FieldTypeRequiredDescription
definitionanyNo
namestringNoUp to 80 characters.

Response 200

FieldTypeDescription
contact_countinteger or nullFrom 0 to 9007199254740991.
created_atstring (date-time)ISO 8601 timestamp.
definitionany
idstring (uuid)
namestring

Errors: 400, 401, 403, 404, 409, 413, 415, 429, 500. See errors for the shape and codes.