Skip to content

Add a saved reply

POST
/v1/saved-replies
curl --request POST \
--url https://api.threadkite.app/v1/saved-replies \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "name": "example", "subject": "example", "body": "example", "bodyHtml": "example", "locationId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "inboxId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "visibility": "personal" }'

Anyone with a Full seat can add personal replies; shared replies need the inbox settings permission. API keys add shared replies.

Media typeapplication/json
object
name
required
string
>= 1 characters <= 80 characters
subject
string
nullable <= 200 characters
body
required

Merge fields such as {{contact.firstName}} are filled in

string
>= 1 characters <= 10000 characters
bodyHtml

The reply formatted, as HTML with merge fields. When given, body is made from it (its plain text); null removes the formatting

string
nullable <= 200000 characters
locationId
string format: uuid
nullable
inboxId

Share it with one inbox only (shared replies); null for the whole organisation

string format: uuid
nullable
visibility

shared when left out. Shared replies need the inbox settings permission (and are what API keys create); anyone with a Full seat can keep personal ones

string
default: shared
Allowed values: personal shared
Media typeapplication/json
object
id
required
string format: uuid
name
required
string
subject
required
string
nullable
body
required

The plain text (what texts and previews show), with merge fields

string
bodyHtml
required

The reply formatted (bold, lists, links), as HTML with the same merge fields; null when it has no formatting. Email sends it; WhatsApp gets its own formatting from it

string
nullable
locationId
required
string format: uuid
nullable
inboxId
required

A shared reply offered in this inbox only (to the people who can see it); null for the whole organisation or a personal reply

string format: uuid
nullable
visibility
required

personal: only its owner sees it; shared: the whole organisation, or one inbox (inboxId)

string
Allowed values: personal shared
ownerUserId
required

The person a personal reply belongs to (null when shared)

string
nullable
canEdit
required

You can change or delete it

boolean
usedByRules
required

Automations (and old out-of-hours rules still on) that send it; it cannot be deleted or made personal while in use

number
createdAt
required
string format: date-time
updatedAt
required
string format: date-time

Example

{
"name": "Still available",
"body": "Hi {{contact.firstName}}, yes, the {{item.title}} is still available.",
"bodyHtml": "<p>Hi {{contact.firstName}}, yes, the <strong>{{item.title}}</strong> is still available.</p>",
"visibility": "personal"
}
Media typeapplication/json
object
statusCode
required
number
code
required

Stable machine-readable reason

string
message
required
string
errors

With code invalid: every problem with the request, by field (message is the first)

Array<object>
object
path
required

Dotted path inside the item, e.g. attributes.price.amountMinor

string
message
required
string

Example

{
"statusCode": 403,
"code": "forbidden",
"message": "You do not have permission to do that.",
"errors": [
{
"message": "Enter the make"
}
]
}

Missing or invalid API key

Media typeapplication/json
object
statusCode
required
number
code
required

Stable machine-readable reason

string
message
required
string
errors

With code invalid: every problem with the request, by field (message is the first)

Array<object>
object
path
required

Dotted path inside the item, e.g. attributes.price.amountMinor

string
message
required
string

Example

{
"statusCode": 403,
"code": "forbidden",
"message": "You do not have permission to do that.",
"errors": [
{
"message": "Enter the make"
}
]
}

The organisation is on the Free plan (code upgrade_required)

Media typeapplication/json
object
statusCode
required
number
code
required

Stable machine-readable reason

string
message
required
string
feature
required

The feature that needs Pro

string
nullable
Allowed values: extraSeats connections aiAssistant aiReplies rules fullReports api inboxes bulkMessages videoMessages
upgradePath
required

Where to upgrade or pay, in the web app

string

Example

{
"statusCode": 402,
"code": "upgrade_required",
"message": "Connections are part of Pro. Upgrade to connect texts, calls and more.",
"feature": "extraSeats",
"upgradePath": "/settings/billing"
}

The key does not have the scope (or the person the permission)

Media typeapplication/json
object
statusCode
required
number
code
required

Stable machine-readable reason

string
message
required
string
errors

With code invalid: every problem with the request, by field (message is the first)

Array<object>
object
path
required

Dotted path inside the item, e.g. attributes.price.amountMinor

string
message
required
string

Example

{
"statusCode": 403,
"code": "forbidden",
"message": "You do not have permission to do that.",
"errors": [
{
"message": "Enter the make"
}
]
}

Rate limit reached

Media typeapplication/json
object
statusCode
required
number
code
required

Stable machine-readable reason

string
message
required
string
retryAfter
required

Seconds until another request will be accepted

number

Example

{
"statusCode": 429,
"code": "rate_limited",
"message": "Too many requests. Each key can make 120 requests a minute; try again in 12 seconds.",
"retryAfter": 12
}