Skip to content

Save your replies

PATCH
/v1/me/replies
curl --request PATCH \
--url https://app.mondochat.io/v1/me/replies \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "away": { "enabled": true, "text": "Back at 21h" }, "quick": [ "Prices: 5 EUR/min", "Online at 21h" ] }'

Replaces the caller’s quick replies (up to 20) and sets the away reply. A field left out is unchanged, and the fields sent apply together or not at all. quick needs workspace.quick_replies and away needs workspace.away_reply. While the caller is offline and has not been seen for 5 minutes, the away text is sent as a text message with auto true, at most once a day per conversation. Needs a session token.

Errors: 403 policy_denied with reason seller, quick_replies or away_reply; 422 validation for more than 20 quick replies, an entry or away text that is empty after trimming (quick), over 1000 characters or over chat.text_max_length, or enabled true with no text.

Guide: Conversations.

Media typeapplication/json
RepliesPatch

The replies to change; a field left out is unchanged.

object
away
Away

Left out: unchanged.

object
enabled
Enabled

Send the text while the seller is away.

boolean
text
Any of:
string
<= 1000 characters
quick
Quick

Left out: unchanged.

Array<string>
<= 20 items

Successful Response

Media typeapplication/json
Replies

A seller’s quick replies and away reply.

object
away
Away

The away reply.

object
enabled
Enabled

Send the text while the seller is away.

boolean
text
Any of:
string
<= 1000 characters
quick
Quick

The quick replies, in order.

Array<string>
default:

Example

{
"away": {
"enabled": true,
"text": "Back at 21h"
},
"quick": [
"Prices: 5 EUR/min",
"Online at 21h"
]
}

Problem

Media typeapplication/problem+json

An RFC 9457 problem: the body of every error answer.

object
code
required

The stable error code to branch on, such as policy_denied.

string
detail

What went wrong this time, when there is more to say.

string | null
errors

For validation, one entry per invalid field.

Array<object>

One invalid field.

object
loc

The path to the field.

array
msg

What is wrong with it.

string
instance

The path of the request.

string
reason

For policy_denied and limit_reached, the rule or limit that refused the request; for forbidden, a short cause such as you_blocked; for banned, temporary when the ban expires.

string
status
required

The HTTP status code.

integer
title
required

A short summary of the problem.

string
type
required

A URL that names the problem, https://app.mondochat.io/problems/<code>.

string

Example

{
"code": "policy_denied",
"detail": null,
"instance": "/v1/conversations/0199d6a0-2000-7000-8000-000000000001",
"reason": "pins",
"status": 403,
"title": "Policy denied",
"type": "https://app.mondochat.io/problems/policy_denied"
}