Skip to content

Change an inbox's out-of-hours message, or turn it on or off

PUT
/v1/inbox/settings/out-of-hours-reply
curl --request PUT \
--url https://api.threadkite.app/v1/inbox/settings/out-of-hours-reply \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "inboxId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "enabled": true, "body": "example", "bodyHtml": "example", "subject": "example" }'

Publishes the wording on the inbox’s out-of-hours reply automation (for new leads, created the first time) and makes it live or pauses it. On every plan. Code advanced_out_of_hours (409) when the inbox has more than one out-of-hours reply, or one with conditions or for every inbox.

Media typeapplication/json
object
inboxId

The inbox to change (your default inbox when left out)

string format: uuid
enabled
required

Send it (true) or not (false)

boolean
body
required

The message, with merge fields such as {{contact.firstName}}

string
>= 1 characters <= 5000 characters
bodyHtml

The message formatted, as HTML with merge fields. When given, body is made from it; null removes the formatting

string
nullable <= 200000 characters
subject

Email subject (left out: unchanged; null or empty: the usual reply subject)

string
nullable <= 200 characters

Example generated

{
"inboxId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"enabled": true,
"body": "example",
"bodyHtml": "example",
"subject": "example"
}
Media typeapplication/json
object
inboxId
required

The inbox it is for

string format: uuid
simple
required

False when the inbox has more than one out-of-hours reply, or one with conditions (sources, locations or channels): change those in Automations

boolean
enabled
required

Whether it is sent (the automation is live; when not simple, whether any of them is)

boolean
subject
required

Email subject (null: the usual reply subject)

string
nullable
body
required

The message sent, with merge fields such as {{contact.firstName}}: the automation’s (or its saved reply’s), or the suggested wording when there is none yet

string
bodyHtml
required

The message formatted, as HTML with merge fields; null when plain

string
nullable
appliesTo
required

New leads only, or every message from a contact

string
Allowed values: leads all
flowId
required

The out-of-hours reply automation (null before there is one)

string format: uuid
nullable
savedReplyId
required

The shared saved reply it sends, when it sends one rather than its own wording (null otherwise, or if the reply was deleted or made personal)

string format: uuid
nullable
autoReplyCount
required

How many out-of-hours reply automations the inbox has

number

Example

{
"appliesTo": "leads",
"autoReplyCount": 1
}
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"
}
]
}
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
}