- API reference
- Conversations
Start a conversation
POSThttps://app.notert.io/api/v1/conversations
Writes first to a customer as the token's holder, by email: to a contact or to an address. It starts a conversation and emails the message at once, under a subject written from it, and what the customer writes back lands in it. An email can't be taken back, so send the same id when you send again after getting no answer: the conversation is started once.
A token with conversations:write. How to send one
Request
curl -X POST https://app.notert.io/api/v1/conversations \
-H "Authorization: Bearer $NOTERT_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": "3b7e2a90-5c1d-4f8e-9a6b-1d2c3e4f5a60",
"customerId": "c_e1a5c9d3-7b2f-4e8a-b6c4-0d2f4a6c8e13",
"email": "ingrid@example.com",
"body": "The CSV export you asked for shipped today.",
"pictureUrls": [
"https://example.com/shots/export.png"
]
}'Response 201
{
"id": "3b7e2a90-5c1d-4f8e-9a6b-1d2c3e4f5a60",
"customerId": "c_e1a5c9d3-7b2f-4e8a-b6c4-0d2f4a6c8e13"
}Headers
Idempotency-KeystringA key of your own for this call, such as a UUID, sent again with a call made again after its answer was lost, so it stores and sends once and answers what the first stored. The same key with other words names another record. Send it or an id in the body, not both.
At least 1 character. At most 255 characters.
Body
iduuidAn id of your own, a UUID, so a call sent again after its answer was lost answers the conversation already started rather than starting and emailing a second. Or send an Idempotency-Key header instead, not both.
customerIdstringThe customer to write to, by their c_ id from the people endpoints. Leave it out to write to an email.
emailstringThe address to write to, in place of a customerId: the contact who has it, or a new one.
At most 254 characters.
bodystringRequiredThe first message, as plain text, which the customer reads by email and in the conversation.
At least 1 character. At most 5000 characters.
pictureUrlsuri[]Public https addresses of pictures to send with the first message (JPEG, PNG, GIF or WebP, of no more pixels than 3840 x 2160, up to 10 MB each), at most 10 and the plan's count, which the server fetches from the open web. One that can't be fetched, isn't a picture or is too large is PICTURE_REFUSED, and nothing is sent.
Default [].
Response 201
idstringThe new conversation's id.
customerIdstring or nullThe customer it was written to, as the people endpoints name them: the contact named, or the one who has the email, added if there was none. Null only for a contact deleted since, on a call sent again.
Errors
- 400
BAD_REQUESTInput validation failed. - 400
IDEMPOTENCY_KEY_REFUSEDSend an Idempotency-Key of 1 to 255 visible characters, or an id of your own in the body, not both. - 401
UNAUTHORIZEDSend a valid API token as a Bearer token. - 403
BANNEDThe workspace banned that person, so nothing is written for them. - 403
HOLDER_NOT_ALLOWEDThe teammate who holds this API token's secret can't do this in the workspace now. A teammate who can should roll it in the workspace's settings. - 403
INSUFFICIENT_SCOPEThis API token can't reply to or organize conversations. Create one that may in the workspace's settings. - 403
NETWORK_NOT_ALLOWEDThis API token works only from the networks it was made for. Call from one of them, or create a token for this one in the workspace's settings. - 403
NO_EMAILThat contact has no email address to write to. Name an address in email instead. - 403
NO_SEATThis workspace's plan has no seat for you. - 403
UNSUBSCRIBEDThat person asked not to be emailed, so they can't be written to. - 403
WORKSPACE_SUSPENDEDThis workspace is suspended. - 404
NOT_FOUNDNot Found. - 409
BLOCKEDThe team blocked that sender, so they can't be written to. - 409
BOUNCEDEmails to that address bounce, so it can't be written to. - 409
CHANGED_MEANWHILESomething changed meanwhile. Try again. - 409
OWN_ADDRESSThat is the workspace's own address, so it can't be written to. - 409
TOO_MANY_FILESThat is more files than the workspace's plan takes. Its data holdslimit. - 409
UNAVAILABLEThis workspace can't start conversations by email yet. - 422
PICTURE_REFUSEDA picture in pictureUrls couldn't be attached, so nothing was written. data.url names it and data.reason says why. Its data holdsurl,reason. - 429
TOO_MANY_REQUESTSToo Many Requests. Its data holdsretryAfter.
A refusal names its code beside a message. Rate limits says when to try again.