API reference
Support assistant
The assistant that drafts answers for your support desk: its drafts, and what it has been taught.
Base URL https://partners.monotree.com/api/v1
· every call needs a token
Endpoints
get/support/threads/{thread}/drafts
List the assistant's drafts
post
/support/threads/{thread}/drafts
Ask for a draft
delete
/support/threads/{thread}/drafts/{draft}
Put a draft aside
post
/support/threads/{thread}/drafts/{draft}/send
Send a draft
post
/support/threads/{thread}/drafts/{draft}/close
Agree there is nothing to answer
get
/support/memories
List what the assistant was taught
post
/support/memories
Teach the assistant a fact
patch
/support/memories/{memory}
Change a fact
delete
/support/memories/{memory}
Forget a fact
List the assistant's drafts
/support/threads/{thread}/drafts
support:read The versions of the assistant's draft for the customer's latest turn (the round of the thread's draft), the newest version first. The first is the one on the thread as draft. Every version comes in one answer: there are no pages. Drafts of earlier rounds are not listed.
Parameters
thread
required
string · path
Response · 200 The versions, newest first. Empty where nothing was drafted.
object
string
has_more
boolean
next_cursor
string, nullable
cursor for the next page.
data
array of objects
Errors
invalid_token: the token is missing, revoked or expired.
insufficient_ability: the token lacks the ability this call needs.
not_found: no such support thread for your company and mode.
rate_limited: too many requests. The general limit is 120 requests a minute for all your tokens of one mode (live or sandbox) together, and 300 a minute per IP address before the token is checked. Some calls have a lower limit of their own, which counts only calls that did what they ask (a call refused with another error uses up no place); the Rate limits guide lists them. Wait for the number of seconds in the Retry-After header.
curl https://partners.monotree.com/api/v1/support/threads/sth_01m7d1ajq9w7ak2vnnp8hfdwj8/drafts \
-H "Authorization: Bearer $MONOTREE_TOKEN"$client = new GuzzleHttp\Client();
$response = $client->request('GET', 'https://partners.monotree.com/api/v1/support/threads/sth_01m7d1ajq9w7ak2vnnp8hfdwj8/drafts', [
'headers' => [
'Authorization' => 'Bearer '.getenv('MONOTREE_TOKEN'),
],
]);
$data = json_decode($response->getBody(), true);const response = await fetch('https://partners.monotree.com/api/v1/support/threads/sth_01m7d1ajq9w7ak2vnnp8hfdwj8/drafts', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.MONOTREE_TOKEN}`,
},
});
const data = await response.json();import os
import requests
response = requests.get(
"https://partners.monotree.com/api/v1/support/threads/sth_01m7d1ajq9w7ak2vnnp8hfdwj8/drafts",
headers={
"Authorization": f"Bearer {os.environ['MONOTREE_TOKEN']}",
},
)
data = response.json(){
"object": "list",
"has_more": false,
"next_cursor": "string",
"data": [
{
"id": "drf_229",
"object": "support_draft",
"status": "ready",
"round": 2,
"version": 2,
"trigger": "redraft",
"stale": false,
"body": "Bonjour Sophie, essayez de vous déconnecter et de vous reconnecter. Dites-nous si cela ne suffit pas.",
"language": "fr",
"summary": null,
"kind": "bug",
"no_reply_needed": false,
"confidence": "medium",
"recommendation": {
"action": "create_ticket",
"label": "Escalate to Monotree",
"text": "This sounds like a fault in the app rather than a question. Send the first steps, and escalate it to Monotree if they do not help.",
"unverified": [
"Whether it happens on every phone or only one kind."
]
},
"questions": [],
"answers": [
{
"q": "Should the answer ask which phone they use now, or only if the first step does not help?",
"a": "Ask now"
}
],
"note": "Shorter, please.",
"escalation": {
"category": "bug",
"title": "Cela ne marche toujours pas, erreur sur Android.",
"description": "Reported in support:\n\n> Cela ne marche toujours pas, erreur sur Android.",
"tags": []
},
"sources": [],
"error": null,
"outcome": null,
"created_at": "2026-11-14T12:43:47Z",
"finished_at": "2026-11-14T12:43:47Z"
}
]
}
Only mpt_test_… tokens work here; nothing reaches a real customer. Kept in this browser tab only.
Ask for a draft
/support/threads/{thread}/drafts
support:write Without from, asks the assistant for a draft of an answer to the thread as it stands (no body needed). With from, asks for another version of that draft: pick among the options of its questions in answers, say what to change in note, or both; a draft that is stale can be redone without either. The new draft becomes the thread's draft. It may come back queued or running: support.thread.updated with change: drafted is sent when the assistant is done, and the draft is then ready or failed. In the sandbox it is ready at once.
Parameters
thread
required
string · path
Accepts an optional Idempotency-Key header to make a retry safe.
Request body
from
string
at most 40 characters
note
string, nullable
from: what to change.
at most 2000 characters
answers
array of objects
from: options picked among the questions of that draft. An entry that is not one of its questions and options, word for word, is left out.
Response · 201 The new draft.
id
string
object
string
status
string
queued and running: the assistant is at it. ready: written. failed: it could not be written; see error. cancelled: given up.
one of queued, running, ready, failed, cancelled
round
integer
version
integer
trigger
string
one of new, followup, redraft, manual, release
stale
boolean
body
string, nullable
language
string, nullable
summary
string, nullable
kind
string, nullable
question, bug, feature_request or other.
no_reply_needed
boolean
confidence
string, nullable
one of high, medium, low
recommendation
object, nullable
action
string
send: send the draft. ask_customer: ask the customer for more. create_ticket: escalate to Monotree. close: close without answering. escalate: hand to Monotree now.
one of send, ask_customer, create_ticket, close, escalate
label
string
text
string
unverified
array of strings
questions
array of objects
answers.
answers
array of objects
note
string, nullable
escalation
object, nullable
category
string
bug, feature_request or investigation.
title
string
description
string
tags
array of strings
sources
array of objects
error
string, nullable
status is failed.
outcome
string, nullable
sent_unchanged, edited, replaced: it was sent, as written, changed, or mostly rewritten. discarded: put aside. superseded: an answer went out another way, or a draft for their next turn replaced it. no_reply_accepted: the thread was closed on it.
one of sent_unchanged, edited, replaced, discarded, superseded, no_reply_accepted
created_at
string, nullable
finished_at
string, nullable
Errors
invalid_idempotency_key: the Idempotency-Key is longer than 255 characters.
invalid_token: the token is missing, revoked or expired.
insufficient_ability: the token lacks the ability this call needs.
not_found: no such support thread, or no such draft in it (from).
invalid_state: a draft is already being written; or, with from, that draft is not ready, or neither an option of its questions nor a note was sent. idempotency_in_progress: a call with the same Idempotency-Key is still running.
validation_error: note is longer than 2,000 characters, or an entry of answers lacks q or a, has one longer than 500 characters, or has another field. idempotency_key_reused: the Idempotency-Key was used for a different request.
rate_limited: too many requests. The general limit is 120 requests a minute for all your tokens of one mode (live or sandbox) together, and 300 a minute per IP address before the token is checked. Some calls have a lower limit of their own, which counts only calls that did what they ask (a call refused with another error uses up no place); the Rate limits guide lists them. Wait for the number of seconds in the Retry-After header.
curl -X POST https://partners.monotree.com/api/v1/support/threads/sth_01m7d1ajq9w7ak2vnnp8hfdwj8/drafts \
-H "Authorization: Bearer $MONOTREE_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"from": "drf_228",
"note": "Shorter, please.",
"answers": [
{
"q": "Should the answer ask which phone they use now, or only if the first step does not help?",
"a": "Ask now"
}
]
}'$client = new GuzzleHttp\Client();
$response = $client->request('POST', 'https://partners.monotree.com/api/v1/support/threads/sth_01m7d1ajq9w7ak2vnnp8hfdwj8/drafts', [
'headers' => [
'Authorization' => 'Bearer '.getenv('MONOTREE_TOKEN'),
],
'json' => [
'from' => 'drf_228',
'note' => 'Shorter, please.',
'answers' => [
[
'q' => 'Should the answer ask which phone they use now, or only if the first step does not help?',
'a' => 'Ask now',
],
],
],
]);
$data = json_decode($response->getBody(), true);const response = await fetch('https://partners.monotree.com/api/v1/support/threads/sth_01m7d1ajq9w7ak2vnnp8hfdwj8/drafts', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.MONOTREE_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"from": "drf_228",
"note": "Shorter, please.",
"answers": [
{
"q": "Should the answer ask which phone they use now, or only if the first step does not help?",
"a": "Ask now"
}
]
}),
});
const data = await response.json();import os
import requests
response = requests.post(
"https://partners.monotree.com/api/v1/support/threads/sth_01m7d1ajq9w7ak2vnnp8hfdwj8/drafts",
headers={
"Authorization": f"Bearer {os.environ['MONOTREE_TOKEN']}",
},
json={
"from": "drf_228",
"note": "Shorter, please.",
"answers": [
{
"q": "Should the answer ask which phone they use now, or only if the first step does not help?",
"a": "Ask now"
}
]
},
)
data = response.json(){
"id": "drf_229",
"object": "support_draft",
"status": "ready",
"round": 2,
"version": 2,
"trigger": "redraft",
"stale": false,
"body": "Bonjour Sophie, essayez de vous déconnecter et de vous reconnecter. Dites-nous si cela ne suffit pas.",
"language": "fr",
"summary": null,
"kind": "bug",
"no_reply_needed": false,
"confidence": "medium",
"recommendation": {
"action": "create_ticket",
"label": "Escalate to Monotree",
"text": "This sounds like a fault in the app rather than a question. Send the first steps, and escalate it to Monotree if they do not help.",
"unverified": [
"Whether it happens on every phone or only one kind."
]
},
"questions": [],
"answers": [
{
"q": "Should the answer ask which phone they use now, or only if the first step does not help?",
"a": "Ask now"
}
],
"note": "Shorter, please.",
"escalation": {
"category": "bug",
"title": "Cela ne marche toujours pas, erreur sur Android.",
"description": "Reported in support:\n\n> Cela ne marche toujours pas, erreur sur Android.",
"tags": []
},
"sources": [],
"error": null,
"outcome": null,
"created_at": "2026-11-14T12:43:47Z",
"finished_at": "2026-11-14T12:43:47Z"
}
Only mpt_test_… tokens work here; nothing reaches a real customer. Kept in this browser tab only.
Put a draft aside
/support/threads/{thread}/drafts/{draft}
support:write Marks a draft that is ready and not yet used as not used. Nothing is deleted: the draft stays readable, with outcome discarded, and the answer is the draft (200, not 204).
Parameters
thread
required
string · path
draft
required
string · path
Response · 200 The draft, with `outcome: discarded`.
id
string
object
string
status
string
queued and running: the assistant is at it. ready: written. failed: it could not be written; see error. cancelled: given up.
one of queued, running, ready, failed, cancelled
round
integer
version
integer
trigger
string
one of new, followup, redraft, manual, release
stale
boolean
body
string, nullable
language
string, nullable
summary
string, nullable
kind
string, nullable
question, bug, feature_request or other.
no_reply_needed
boolean
confidence
string, nullable
one of high, medium, low
recommendation
object, nullable
action
string
send: send the draft. ask_customer: ask the customer for more. create_ticket: escalate to Monotree. close: close without answering. escalate: hand to Monotree now.
one of send, ask_customer, create_ticket, close, escalate
label
string
text
string
unverified
array of strings
questions
array of objects
answers.
answers
array of objects
note
string, nullable
escalation
object, nullable
category
string
bug, feature_request or investigation.
title
string
description
string
tags
array of strings
sources
array of objects
error
string, nullable
status is failed.
outcome
string, nullable
sent_unchanged, edited, replaced: it was sent, as written, changed, or mostly rewritten. discarded: put aside. superseded: an answer went out another way, or a draft for their next turn replaced it. no_reply_accepted: the thread was closed on it.
one of sent_unchanged, edited, replaced, discarded, superseded, no_reply_accepted
created_at
string, nullable
finished_at
string, nullable
Errors
invalid_token: the token is missing, revoked or expired.
insufficient_ability: the token lacks the ability this call needs.
not_found: no such support thread, or no such draft in it.
invalid_state: the draft is not ready, or was used or put aside already.
rate_limited: too many requests. The general limit is 120 requests a minute for all your tokens of one mode (live or sandbox) together, and 300 a minute per IP address before the token is checked. Some calls have a lower limit of their own, which counts only calls that did what they ask (a call refused with another error uses up no place); the Rate limits guide lists them. Wait for the number of seconds in the Retry-After header.
curl -X DELETE https://partners.monotree.com/api/v1/support/threads/sth_01m7d1ajq9w7ak2vnnp8hfdwj8/drafts/drf_229 \
-H "Authorization: Bearer $MONOTREE_TOKEN"$client = new GuzzleHttp\Client();
$response = $client->request('DELETE', 'https://partners.monotree.com/api/v1/support/threads/sth_01m7d1ajq9w7ak2vnnp8hfdwj8/drafts/drf_229', [
'headers' => [
'Authorization' => 'Bearer '.getenv('MONOTREE_TOKEN'),
],
]);
$data = json_decode($response->getBody(), true);const response = await fetch('https://partners.monotree.com/api/v1/support/threads/sth_01m7d1ajq9w7ak2vnnp8hfdwj8/drafts/drf_229', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.MONOTREE_TOKEN}`,
},
});
const data = await response.json();import os
import requests
response = requests.delete(
"https://partners.monotree.com/api/v1/support/threads/sth_01m7d1ajq9w7ak2vnnp8hfdwj8/drafts/drf_229",
headers={
"Authorization": f"Bearer {os.environ['MONOTREE_TOKEN']}",
},
)
data = response.json(){
"id": "drf_229",
"object": "support_draft",
"status": "ready",
"round": 2,
"version": 2,
"trigger": "redraft",
"stale": false,
"body": "Bonjour Sophie, essayez de vous déconnecter et de vous reconnecter. Dites-nous si cela ne suffit pas.",
"language": "fr",
"summary": null,
"kind": "bug",
"no_reply_needed": false,
"confidence": "medium",
"recommendation": {
"action": "create_ticket",
"label": "Escalate to Monotree",
"text": "This sounds like a fault in the app rather than a question. Send the first steps, and escalate it to Monotree if they do not help.",
"unverified": [
"Whether it happens on every phone or only one kind."
]
},
"questions": [],
"answers": [
{
"q": "Should the answer ask which phone they use now, or only if the first step does not help?",
"a": "Ask now"
}
],
"note": "Shorter, please.",
"escalation": {
"category": "bug",
"title": "Cela ne marche toujours pas, erreur sur Android.",
"description": "Reported in support:\n\n> Cela ne marche toujours pas, erreur sur Android.",
"tags": []
},
"sources": [],
"error": null,
"outcome": null,
"created_at": "2026-11-14T12:43:47Z",
"finished_at": "2026-11-14T12:43:47Z"
}
Only mpt_test_… tokens work here; nothing reaches a real customer. Kept in this browser tab only.
Send a draft
/support/threads/{thread}/drafts/{draft}/send
support:write Sends a draft that is ready and not yet used as your answer: as the assistant wrote it (no body needed), or with body as you changed it. It goes out as an answer of your token does. The draft's outcome then says which: sent_unchanged, edited, or replaced where less than about a third of it was left.
Parameters
thread
required
string · path
draft
required
string · path
Accepts an optional Idempotency-Key header to make a retry safe.
Request body
body
string
at least 1 characters · at most 10000 characters
last_seen_message
string
direction: in) you have read. Where that is not their latest message any more, nothing is sent (409 invalid_state).
at most 40 characters
Response · 201 The thread whole, with the answer last in `messages`.
id
string
object
string
channel
string
chat: their Support room in the Monotree app. email: mail to your support address.
one of chat, email
status
string
open waits for you, waiting waits for the customer. closed is done; dismissed was never one to answer (spam, a mistake, an automatic mail).
one of open, waiting, closed, dismissed
view
string
status, or snoozed for an open or waiting thread put aside until snoozed_until. Never followup: a thread under that view keeps its own view here.
one of open, waiting, snoozed, closed, dismissed
priority
string
normal until the assistant reads the thread or you set it; what you set stays.
one of urgent, high, normal, low
kind
string, nullable
one of question, bug, feature_request, other
subject
string, nullable
summary
string, nullable
preview
string, nullable
language
string, nullable
unread
boolean
unread: false.
customer
object, nullable
id
string
company_name
string
external_ref
string, nullable
person
object
id
string, nullable
email.
object
string
name
string
email
string, nullable
phone
string, nullable
role
string, nullable
title
string, nullable
locale
string, nullable
timezone
string, nullable
departments
array of strings
device
object, nullable
platform
string, nullable
model
string, nullable
os
string, nullable
app_version
string, nullable
last_active_on
string, nullable
verified
boolean
chat
boolean
admin
boolean
customer
object, nullable
customer.
id
string
company_name
string
assignee
object, nullable
id
string
name
string
tags
array of objects
cc
array of objects
signed
boolean
signature setting for a chat and is always true for a mail, unless set on the thread.
needs_person
object, nullable
auto on sends, did not send its draft and one of your people must look. Cleared when one of you answers.
since
string
reason
string, nullable
no_reply_needed
boolean
snoozed_until
string, nullable
resolution
string, nullable
answered, no_reply (there was nothing to answer), no_response (they went quiet), outreach (a message of yours to many people, sent from the portal). Null while it is open or waiting.
dismissed_reason
string, nullable
staff (by hand, no reason given), spam, mistake, duplicate, api (over the API, no reason given); or by the desk itself, auto (an automatic mail) or deleted (they took the message back).
rating
string, nullable
one of positive, negative
rated_at
string, nullable
reopened_count
integer
message_count
integer
started_at
string, nullable
waiting_since
string, nullable
first_response_at
string, nullable
last_message_at
string, nullable
closed_at
string, nullable
updated_at
string, nullable
messages
array of objects
has_earlier_messages
boolean
messages.
notes
array of objects
history
array of objects
escalations
array of objects
draft
object, nullable
id
string
object
string
status
string
queued and running: the assistant is at it. ready: written. failed: it could not be written; see error. cancelled: given up.
one of queued, running, ready, failed, cancelled
round
integer
version
integer
trigger
string
one of new, followup, redraft, manual, release
stale
boolean
body
string, nullable
language
string, nullable
summary
string, nullable
kind
string, nullable
question, bug, feature_request or other.
no_reply_needed
boolean
confidence
string, nullable
one of high, medium, low
recommendation
object, nullable
action
string
send: send the draft. ask_customer: ask the customer for more. create_ticket: escalate to Monotree. close: close without answering. escalate: hand to Monotree now.
one of send, ask_customer, create_ticket, close, escalate
label
string
text
string
unverified
array of strings
questions
array of objects
answers.
answers
array of objects
note
string, nullable
escalation
object, nullable
category
string
bug, feature_request or investigation.
title
string
description
string
tags
array of strings
sources
array of objects
error
string, nullable
status is failed.
outcome
string, nullable
sent_unchanged, edited, replaced: it was sent, as written, changed, or mostly rewritten. discarded: put aside. superseded: an answer went out another way, or a draft for their next turn replaced it. no_reply_accepted: the thread was closed on it.
one of sent_unchanged, edited, replaced, discarded, superseded, no_reply_accepted
created_at
string, nullable
finished_at
string, nullable
Errors
invalid_idempotency_key: the Idempotency-Key is longer than 255 characters.
invalid_token: the token is missing, revoked or expired.
insufficient_ability: the token lacks the ability this call needs.
not_found: no such support thread, draft, or message (last_seen_message).
invalid_state: the draft is not ready or was used already; they have written again since last_seen_message; the thread is dismissed; or the draft has no text and no body was sent. idempotency_in_progress: a call with the same Idempotency-Key is still running.
validation_error: body is empty or longer than 10,000 characters. idempotency_key_reused: the Idempotency-Key was used for a different request.
rate_limited: in a thread by mail, more than 20 answers to this thread or 200 answers by mail in all in an hour; or over the general limit. Wait for the number of seconds in Retry-After.
curl -X POST https://partners.monotree.com/api/v1/support/threads/sth_01m7d1ajq9w7ak2vnnp8hfdwj8/drafts/drf_229/send \
-H "Authorization: Bearer $MONOTREE_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"body": "Bonjour Sophie, essayez de vous déconnecter et de vous reconnecter. Quel téléphone utilisez-vous ?",
"last_seen_message": "msg_01m7d1b8f34d98pr5q1mnbdcpt"
}'$client = new GuzzleHttp\Client();
$response = $client->request('POST', 'https://partners.monotree.com/api/v1/support/threads/sth_01m7d1ajq9w7ak2vnnp8hfdwj8/drafts/drf_229/send', [
'headers' => [
'Authorization' => 'Bearer '.getenv('MONOTREE_TOKEN'),
],
'json' => [
'body' => 'Bonjour Sophie, essayez de vous déconnecter et de vous reconnecter. Quel téléphone utilisez-vous ?',
'last_seen_message' => 'msg_01m7d1b8f34d98pr5q1mnbdcpt',
],
]);
$data = json_decode($response->getBody(), true);const response = await fetch('https://partners.monotree.com/api/v1/support/threads/sth_01m7d1ajq9w7ak2vnnp8hfdwj8/drafts/drf_229/send', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.MONOTREE_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"body": "Bonjour Sophie, essayez de vous déconnecter et de vous reconnecter. Quel téléphone utilisez-vous ?",
"last_seen_message": "msg_01m7d1b8f34d98pr5q1mnbdcpt"
}),
});
const data = await response.json();import os
import requests
response = requests.post(
"https://partners.monotree.com/api/v1/support/threads/sth_01m7d1ajq9w7ak2vnnp8hfdwj8/drafts/drf_229/send",
headers={
"Authorization": f"Bearer {os.environ['MONOTREE_TOKEN']}",
},
json={
"body": "Bonjour Sophie, essayez de vous déconnecter et de vous reconnecter. Quel téléphone utilisez-vous ?",
"last_seen_message": "msg_01m7d1b8f34d98pr5q1mnbdcpt"
},
)
data = response.json(){
"id": "sth_01m7d1ajq9w7ak2vnnp8hfdwj8",
"object": "support_thread",
"channel": "chat",
"status": "waiting",
"view": "waiting",
"priority": "high",
"kind": "bug",
"subject": null,
"summary": null,
"preview": "Bonjour, mon invitation ne marche pas.",
"language": "fr",
"unread": false,
"customer": {
"id": "cus_01jcz8w3k1x9q2v7s4e6m0b5n8",
"company_name": "Boulangerie Martin",
"external_ref": "org_48213"
},
"person": {
"id": "per_132",
"object": "support_person",
"name": "Sophie Garnier",
"email": "sophie@boulangeriemartin.example",
"phone": null,
"role": "Manager",
"title": null,
"locale": "fr",
"timezone": null,
"departments": [],
"device": null,
"last_active_on": null,
"verified": true,
"chat": true,
"customer": null
},
"assignee": {
"id": "sel_5",
"name": "Emma Dubois"
},
"tags": [
{
"id": 1,
"name": "Invitations",
"color": "#0e7490"
}
],
"cc": [],
"signed": true,
"needs_person": null,
"no_reply_needed": false,
"snoozed_until": null,
"resolution": null,
"dismissed_reason": null,
"rating": null,
"rated_at": null,
"reopened_count": 0,
"message_count": 2,
"started_at": "2026-11-14T12:43:10Z",
"waiting_since": null,
"first_response_at": "2026-11-14T12:43:21Z",
"last_message_at": "2026-11-14T12:43:21Z",
"closed_at": null,
"updated_at": "2026-11-14T12:44:09Z",
"messages": [
{
"id": "msg_01m7d1ajqgwbvenrpw7gz6xn25",
"object": "support_message",
"direction": "in",
"kind": "message",
"author": {
"type": "customer",
"name": "Sophie Garnier"
},
"body": "Bonjour, mon invitation ne marche pas.",
"edited": false,
"deleted": false,
"attachments": [],
"delivery": null,
"send_state": null,
"sent_at": "2026-11-14T12:43:10Z",
"delivered_at": null
},
{
"id": "msg_01m7d1awpxds8kqrrt6733j0d2",
"object": "support_message",
"direction": "out",
"kind": "message",
"author": {
"type": "api",
"name": "API · Back office, production"
},
"body": "Bonjour Sophie, voici le guide.",
"edited": false,
"deleted": false,
"attachments": [
{
"id": "att_2",
"name": "guide.pdf",
"mime": "application/pdf",
"size": 48213,
"url": "https://partners.monotree.com/api/v1/support/attachments/att_2"
}
],
"delivery": {
"state": "delivered",
"error": null,
"delivered_at": "2026-11-14T12:43:21Z"
},
"send_state": "sent",
"sent_at": "2026-11-14T12:43:21Z",
"delivered_at": "2026-11-14T12:43:21Z"
}
],
"has_earlier_messages": false,
"notes": [
{
"id": "note_2",
"object": "support_note",
"author": {
"type": "api",
"name": "API · Back office, production"
},
"body": "Called the manager; she will try again on Monday.",
"created_at": "2026-11-14T12:43:20Z"
}
],
"history": [
{
"type": "opened",
"by": null,
"details": null,
"at": "2026-11-14T12:43:10Z"
},
{
"type": "assigned",
"by": "API · Back office, production",
"details": {
"assignee": "Emma Dubois"
},
"at": "2026-11-14T12:44:09Z"
}
],
"escalations": [
{
"id": "esc_01m7d1cbwj6agthjesfk7198t7",
"title": "Invitation link opens a blank page",
"category": "bug",
"status": "sent",
"relation": "created",
"released_in": null,
"follow_up_due": false,
"followed_up_at": null,
"follow_up_outcome": null
}
],
"draft": {
"id": "drf_227",
"object": "support_draft",
"status": "ready",
"round": 1,
"version": 1,
"trigger": "new",
"stale": false,
"body": "Bonjour Sophie,\n\nMerci pour votre message.\n\nEssayez d'abord de vous déconnecter puis de vous reconnecter, et vérifiez que l'application Monotree est à jour.",
"language": "fr",
"summary": null,
"kind": "bug",
"no_reply_needed": false,
"confidence": "medium",
"recommendation": {
"action": "create_ticket",
"label": "Escalate to Monotree",
"text": "This sounds like a fault in the app rather than a question. Send the first steps, and escalate it to Monotree if they do not help.",
"unverified": [
"Whether it happens on every phone or only one kind."
]
},
"questions": [],
"answers": [],
"note": null,
"escalation": null,
"sources": [],
"error": null,
"outcome": "superseded",
"created_at": "2026-11-14T12:43:10Z",
"finished_at": "2026-11-14T12:43:10Z"
}
}
Only mpt_test_… tokens work here; nothing reaches a real customer. Kept in this browser tab only.
Agree there is nothing to answer
/support/threads/{thread}/drafts/{draft}/close
support:write Where a draft says no_reply_needed (a thank-you, say) and you agree, this closes the thread without an answer, with resolution no_reply. The draft's outcome becomes no_reply_accepted. No body is needed.
Parameters
thread
required
string · path
draft
required
string · path
Accepts an optional Idempotency-Key header to make a retry safe.
Response · 200 The thread whole, closed.
id
string
object
string
channel
string
chat: their Support room in the Monotree app. email: mail to your support address.
one of chat, email
status
string
open waits for you, waiting waits for the customer. closed is done; dismissed was never one to answer (spam, a mistake, an automatic mail).
one of open, waiting, closed, dismissed
view
string
status, or snoozed for an open or waiting thread put aside until snoozed_until. Never followup: a thread under that view keeps its own view here.
one of open, waiting, snoozed, closed, dismissed
priority
string
normal until the assistant reads the thread or you set it; what you set stays.
one of urgent, high, normal, low
kind
string, nullable
one of question, bug, feature_request, other
subject
string, nullable
summary
string, nullable
preview
string, nullable
language
string, nullable
unread
boolean
unread: false.
customer
object, nullable
id
string
company_name
string
external_ref
string, nullable
person
object
id
string, nullable
email.
object
string
name
string
email
string, nullable
phone
string, nullable
role
string, nullable
title
string, nullable
locale
string, nullable
timezone
string, nullable
departments
array of strings
device
object, nullable
platform
string, nullable
model
string, nullable
os
string, nullable
app_version
string, nullable
last_active_on
string, nullable
verified
boolean
chat
boolean
admin
boolean
customer
object, nullable
customer.
id
string
company_name
string
assignee
object, nullable
id
string
name
string
tags
array of objects
cc
array of objects
signed
boolean
signature setting for a chat and is always true for a mail, unless set on the thread.
needs_person
object, nullable
auto on sends, did not send its draft and one of your people must look. Cleared when one of you answers.
since
string
reason
string, nullable
no_reply_needed
boolean
snoozed_until
string, nullable
resolution
string, nullable
answered, no_reply (there was nothing to answer), no_response (they went quiet), outreach (a message of yours to many people, sent from the portal). Null while it is open or waiting.
dismissed_reason
string, nullable
staff (by hand, no reason given), spam, mistake, duplicate, api (over the API, no reason given); or by the desk itself, auto (an automatic mail) or deleted (they took the message back).
rating
string, nullable
one of positive, negative
rated_at
string, nullable
reopened_count
integer
message_count
integer
started_at
string, nullable
waiting_since
string, nullable
first_response_at
string, nullable
last_message_at
string, nullable
closed_at
string, nullable
updated_at
string, nullable
messages
array of objects
has_earlier_messages
boolean
messages.
notes
array of objects
history
array of objects
escalations
array of objects
draft
object, nullable
id
string
object
string
status
string
queued and running: the assistant is at it. ready: written. failed: it could not be written; see error. cancelled: given up.
one of queued, running, ready, failed, cancelled
round
integer
version
integer
trigger
string
one of new, followup, redraft, manual, release
stale
boolean
body
string, nullable
language
string, nullable
summary
string, nullable
kind
string, nullable
question, bug, feature_request or other.
no_reply_needed
boolean
confidence
string, nullable
one of high, medium, low
recommendation
object, nullable
action
string
send: send the draft. ask_customer: ask the customer for more. create_ticket: escalate to Monotree. close: close without answering. escalate: hand to Monotree now.
one of send, ask_customer, create_ticket, close, escalate
label
string
text
string
unverified
array of strings
questions
array of objects
answers.
answers
array of objects
note
string, nullable
escalation
object, nullable
category
string
bug, feature_request or investigation.
title
string
description
string
tags
array of strings
sources
array of objects
error
string, nullable
status is failed.
outcome
string, nullable
sent_unchanged, edited, replaced: it was sent, as written, changed, or mostly rewritten. discarded: put aside. superseded: an answer went out another way, or a draft for their next turn replaced it. no_reply_accepted: the thread was closed on it.
one of sent_unchanged, edited, replaced, discarded, superseded, no_reply_accepted
created_at
string, nullable
finished_at
string, nullable
Errors
invalid_idempotency_key: the Idempotency-Key is longer than 255 characters.
invalid_token: the token is missing, revoked or expired.
insufficient_ability: the token lacks the ability this call needs.
not_found: no such support thread, or no such draft in it.
invalid_state: the draft does not say no_reply_needed. idempotency_in_progress: a call with the same Idempotency-Key is still running.
idempotency_key_reused: the Idempotency-Key was used for a different request.
rate_limited: too many requests. The general limit is 120 requests a minute for all your tokens of one mode (live or sandbox) together, and 300 a minute per IP address before the token is checked. Some calls have a lower limit of their own, which counts only calls that did what they ask (a call refused with another error uses up no place); the Rate limits guide lists them. Wait for the number of seconds in the Retry-After header.
curl -X POST https://partners.monotree.com/api/v1/support/threads/sth_01m7d1ajq9w7ak2vnnp8hfdwj8/drafts/drf_229/close \
-H "Authorization: Bearer $MONOTREE_TOKEN"$client = new GuzzleHttp\Client();
$response = $client->request('POST', 'https://partners.monotree.com/api/v1/support/threads/sth_01m7d1ajq9w7ak2vnnp8hfdwj8/drafts/drf_229/close', [
'headers' => [
'Authorization' => 'Bearer '.getenv('MONOTREE_TOKEN'),
],
]);
$data = json_decode($response->getBody(), true);const response = await fetch('https://partners.monotree.com/api/v1/support/threads/sth_01m7d1ajq9w7ak2vnnp8hfdwj8/drafts/drf_229/close', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.MONOTREE_TOKEN}`,
},
});
const data = await response.json();import os
import requests
response = requests.post(
"https://partners.monotree.com/api/v1/support/threads/sth_01m7d1ajq9w7ak2vnnp8hfdwj8/drafts/drf_229/close",
headers={
"Authorization": f"Bearer {os.environ['MONOTREE_TOKEN']}",
},
)
data = response.json(){
"id": "sth_01m7d1ajq9w7ak2vnnp8hfdwj8",
"object": "support_thread",
"channel": "chat",
"status": "waiting",
"view": "waiting",
"priority": "high",
"kind": "bug",
"subject": null,
"summary": null,
"preview": "Bonjour, mon invitation ne marche pas.",
"language": "fr",
"unread": false,
"customer": {
"id": "cus_01jcz8w3k1x9q2v7s4e6m0b5n8",
"company_name": "Boulangerie Martin",
"external_ref": "org_48213"
},
"person": {
"id": "per_132",
"object": "support_person",
"name": "Sophie Garnier",
"email": "sophie@boulangeriemartin.example",
"phone": null,
"role": "Manager",
"title": null,
"locale": "fr",
"timezone": null,
"departments": [],
"device": null,
"last_active_on": null,
"verified": true,
"chat": true,
"customer": null
},
"assignee": {
"id": "sel_5",
"name": "Emma Dubois"
},
"tags": [
{
"id": 1,
"name": "Invitations",
"color": "#0e7490"
}
],
"cc": [],
"signed": true,
"needs_person": null,
"no_reply_needed": false,
"snoozed_until": null,
"resolution": null,
"dismissed_reason": null,
"rating": null,
"rated_at": null,
"reopened_count": 0,
"message_count": 2,
"started_at": "2026-11-14T12:43:10Z",
"waiting_since": null,
"first_response_at": "2026-11-14T12:43:21Z",
"last_message_at": "2026-11-14T12:43:21Z",
"closed_at": null,
"updated_at": "2026-11-14T12:44:09Z",
"messages": [
{
"id": "msg_01m7d1ajqgwbvenrpw7gz6xn25",
"object": "support_message",
"direction": "in",
"kind": "message",
"author": {
"type": "customer",
"name": "Sophie Garnier"
},
"body": "Bonjour, mon invitation ne marche pas.",
"edited": false,
"deleted": false,
"attachments": [],
"delivery": null,
"send_state": null,
"sent_at": "2026-11-14T12:43:10Z",
"delivered_at": null
},
{
"id": "msg_01m7d1awpxds8kqrrt6733j0d2",
"object": "support_message",
"direction": "out",
"kind": "message",
"author": {
"type": "api",
"name": "API · Back office, production"
},
"body": "Bonjour Sophie, voici le guide.",
"edited": false,
"deleted": false,
"attachments": [
{
"id": "att_2",
"name": "guide.pdf",
"mime": "application/pdf",
"size": 48213,
"url": "https://partners.monotree.com/api/v1/support/attachments/att_2"
}
],
"delivery": {
"state": "delivered",
"error": null,
"delivered_at": "2026-11-14T12:43:21Z"
},
"send_state": "sent",
"sent_at": "2026-11-14T12:43:21Z",
"delivered_at": "2026-11-14T12:43:21Z"
}
],
"has_earlier_messages": false,
"notes": [
{
"id": "note_2",
"object": "support_note",
"author": {
"type": "api",
"name": "API · Back office, production"
},
"body": "Called the manager; she will try again on Monday.",
"created_at": "2026-11-14T12:43:20Z"
}
],
"history": [
{
"type": "opened",
"by": null,
"details": null,
"at": "2026-11-14T12:43:10Z"
},
{
"type": "assigned",
"by": "API · Back office, production",
"details": {
"assignee": "Emma Dubois"
},
"at": "2026-11-14T12:44:09Z"
}
],
"escalations": [
{
"id": "esc_01m7d1cbwj6agthjesfk7198t7",
"title": "Invitation link opens a blank page",
"category": "bug",
"status": "sent",
"relation": "created",
"released_in": null,
"follow_up_due": false,
"followed_up_at": null,
"follow_up_outcome": null
}
],
"draft": {
"id": "drf_227",
"object": "support_draft",
"status": "ready",
"round": 1,
"version": 1,
"trigger": "new",
"stale": false,
"body": "Bonjour Sophie,\n\nMerci pour votre message.\n\nEssayez d'abord de vous déconnecter puis de vous reconnecter, et vérifiez que l'application Monotree est à jour.",
"language": "fr",
"summary": null,
"kind": "bug",
"no_reply_needed": false,
"confidence": "medium",
"recommendation": {
"action": "create_ticket",
"label": "Escalate to Monotree",
"text": "This sounds like a fault in the app rather than a question. Send the first steps, and escalate it to Monotree if they do not help.",
"unverified": [
"Whether it happens on every phone or only one kind."
]
},
"questions": [],
"answers": [],
"note": null,
"escalation": null,
"sources": [],
"error": null,
"outcome": "superseded",
"created_at": "2026-11-14T12:43:10Z",
"finished_at": "2026-11-14T12:43:10Z"
}
}
Only mpt_test_… tokens work here; nothing reaches a real customer. Kept in this browser tab only.
List what the assistant was taught
/support/memories
support:configure The assistant's memory: facts about how you work that it reads before every draft for your customers. A fact has a name, a line that says what it is about, and the fact itself. Newest first. A sandbox token has a memory of its own.
Parameters
limit
integer · query
default 25 · up to 100
cursor
string · query
next_cursor of the page before, for the next page. Send the same filters with it.
status
string · query
remembered: facts the assistant uses. proposed: what it would remember of an answer of yours, waiting for you to agree.
one of remembered, proposed · default remembered
Response · 200 A page of facts.
object
string
has_more
boolean
next_cursor
string, nullable
cursor for the next page.
data
array of objects
Errors
invalid_cursor: the cursor is not one this API gave out.
invalid_token: the token is missing, revoked or expired.
insufficient_ability: the token lacks the ability this call needs.
validation_error: a field is missing or invalid; fields says which.
rate_limited: too many requests. The general limit is 120 requests a minute for all your tokens of one mode (live or sandbox) together, and 300 a minute per IP address before the token is checked. Some calls have a lower limit of their own, which counts only calls that did what they ask (a call refused with another error uses up no place); the Rate limits guide lists them. Wait for the number of seconds in the Retry-After header.
curl https://partners.monotree.com/api/v1/support/memories \
-H "Authorization: Bearer $MONOTREE_TOKEN"$client = new GuzzleHttp\Client();
$response = $client->request('GET', 'https://partners.monotree.com/api/v1/support/memories', [
'headers' => [
'Authorization' => 'Bearer '.getenv('MONOTREE_TOKEN'),
],
]);
$data = json_decode($response->getBody(), true);const response = await fetch('https://partners.monotree.com/api/v1/support/memories', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.MONOTREE_TOKEN}`,
},
});
const data = await response.json();import os
import requests
response = requests.get(
"https://partners.monotree.com/api/v1/support/memories",
headers={
"Authorization": f"Bearer {os.environ['MONOTREE_TOKEN']}",
},
)
data = response.json(){
"object": "list",
"has_more": false,
"next_cursor": "string",
"data": [
{
"id": "mem_6",
"object": "support_memory",
"name": "employees-are-added-by-the-admin",
"description": "Employees are added by the customer's admin",
"body": "Only the admin of a customer can add employees: Users, then Invite. Support never adds them.",
"status": "remembered",
"thread": null,
"created_at": "2026-11-14T12:45:47Z",
"approved_at": "2026-11-14T12:45:47Z"
}
]
}
Only mpt_test_… tokens work here; nothing reaches a real customer. Kept in this browser tab only.
Teach the assistant a fact
/support/memories
support:configure Either write the fact yourself (name, description and body, all three), which the assistant uses from then on, or send only from_message with one of your answers and the assistant proposes what it would remember of it: that comes back proposed, and counts once you agree to it. An answer can be learned from once.
Accepts an optional Idempotency-Key header to make a retry safe.
Request body
name
string
at most 70 characters
description
string
at most 200 characters
body
string
at most 4000 characters
from_message
string
at most 40 characters
Response · 201 The fact (`remembered`), or the proposal (`proposed`).
id
string
object
string
name
string
description
string
body
string
status
string
remembered: the assistant uses it. proposed: it waits for you to agree.
one of proposed, remembered
thread
string, nullable
created_at
string, nullable
approved_at
string, nullable
Errors
invalid_idempotency_key: the Idempotency-Key is longer than 255 characters.
invalid_token: the token is missing, revoked or expired.
insufficient_ability: the token lacks the ability this call needs.
not_found: from_message is not a message in a thread of your company and mode.
nothing_to_learn: the assistant found nothing in that answer worth remembering. invalid_state: the message is not an answer of yours, or was learned from already; or name has no letters or digits. idempotency_in_progress: a call with the same Idempotency-Key is still running.
validation_error: without from_message, name, description and body are all needed. idempotency_key_reused: the Idempotency-Key was used for a different request.
rate_limited: too many requests. The general limit is 120 requests a minute for all your tokens of one mode (live or sandbox) together, and 300 a minute per IP address before the token is checked. Some calls have a lower limit of their own, which counts only calls that did what they ask (a call refused with another error uses up no place); the Rate limits guide lists them. Wait for the number of seconds in the Retry-After header.
curl -X POST https://partners.monotree.com/api/v1/support/memories \
-H "Authorization: Bearer $MONOTREE_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Employees are added by the admin",
"description": "Employees are added by the customer'\''s admin",
"body": "Only the admin of a customer can add employees: Users, then Invite. Support never adds them."
}'$client = new GuzzleHttp\Client();
$response = $client->request('POST', 'https://partners.monotree.com/api/v1/support/memories', [
'headers' => [
'Authorization' => 'Bearer '.getenv('MONOTREE_TOKEN'),
],
'json' => [
'name' => 'Employees are added by the admin',
'description' => 'Employees are added by the customer\'s admin',
'body' => 'Only the admin of a customer can add employees: Users, then Invite. Support never adds them.',
],
]);
$data = json_decode($response->getBody(), true);const response = await fetch('https://partners.monotree.com/api/v1/support/memories', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.MONOTREE_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"name": "Employees are added by the admin",
"description": "Employees are added by the customer's admin",
"body": "Only the admin of a customer can add employees: Users, then Invite. Support never adds them."
}),
});
const data = await response.json();import os
import requests
response = requests.post(
"https://partners.monotree.com/api/v1/support/memories",
headers={
"Authorization": f"Bearer {os.environ['MONOTREE_TOKEN']}",
},
json={
"name": "Employees are added by the admin",
"description": "Employees are added by the customer's admin",
"body": "Only the admin of a customer can add employees: Users, then Invite. Support never adds them."
},
)
data = response.json(){
"id": "mem_6",
"object": "support_memory",
"name": "employees-are-added-by-the-admin",
"description": "Employees are added by the customer's admin",
"body": "Only the admin of a customer can add employees: Users, then Invite. Support never adds them.",
"status": "remembered",
"thread": null,
"created_at": "2026-11-14T12:45:47Z",
"approved_at": "2026-11-14T12:45:47Z"
}
Only mpt_test_… tokens work here; nothing reaches a real customer. Kept in this browser tab only.
Change a fact
/support/memories/{memory}
support:configure Changes what you send of a fact and leaves the rest. A proposal becomes a fact with it, even with an empty JSON object as the body: that is how you agree to one.
Parameters
memory
required
string · path
Request body
name
string
at most 70 characters
description
string
at most 200 characters
body
string
at most 4000 characters
Response · 200 The fact, `remembered`.
id
string
object
string
name
string
description
string
body
string
status
string
remembered: the assistant uses it. proposed: it waits for you to agree.
one of proposed, remembered
thread
string, nullable
created_at
string, nullable
approved_at
string, nullable
Errors
invalid_token: the token is missing, revoked or expired.
insufficient_ability: the token lacks the ability this call needs.
not_found: no such fact for your company and mode.
invalid_state: the name would be left with no letters or digits.
validation_error: a field is empty or too long.
rate_limited: too many requests. The general limit is 120 requests a minute for all your tokens of one mode (live or sandbox) together, and 300 a minute per IP address before the token is checked. Some calls have a lower limit of their own, which counts only calls that did what they ask (a call refused with another error uses up no place); the Rate limits guide lists them. Wait for the number of seconds in the Retry-After header.
curl -X PATCH https://partners.monotree.com/api/v1/support/memories/mem_6 \
-H "Authorization: Bearer $MONOTREE_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"body": "Only the admin of a customer can add employees: Users, then Invite."
}'$client = new GuzzleHttp\Client();
$response = $client->request('PATCH', 'https://partners.monotree.com/api/v1/support/memories/mem_6', [
'headers' => [
'Authorization' => 'Bearer '.getenv('MONOTREE_TOKEN'),
],
'json' => [
'body' => 'Only the admin of a customer can add employees: Users, then Invite.',
],
]);
$data = json_decode($response->getBody(), true);const response = await fetch('https://partners.monotree.com/api/v1/support/memories/mem_6', {
method: 'PATCH',
headers: {
Authorization: `Bearer ${process.env.MONOTREE_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"body": "Only the admin of a customer can add employees: Users, then Invite."
}),
});
const data = await response.json();import os
import requests
response = requests.patch(
"https://partners.monotree.com/api/v1/support/memories/mem_6",
headers={
"Authorization": f"Bearer {os.environ['MONOTREE_TOKEN']}",
},
json={
"body": "Only the admin of a customer can add employees: Users, then Invite."
},
)
data = response.json(){
"id": "mem_6",
"object": "support_memory",
"name": "employees-are-added-by-the-admin",
"description": "Employees are added by the customer's admin",
"body": "Only the admin of a customer can add employees: Users, then Invite. Support never adds them.",
"status": "remembered",
"thread": null,
"created_at": "2026-11-14T12:45:47Z",
"approved_at": "2026-11-14T12:45:47Z"
}
Only mpt_test_… tokens work here; nothing reaches a real customer. Kept in this browser tab only.
Forget a fact
/support/memories/{memory}
support:configure Removes a fact, or turns a proposal down. The assistant no longer reads it.
Parameters
memory
required
string · path
Errors
invalid_token: the token is missing, revoked or expired.
insufficient_ability: the token lacks the ability this call needs.
not_found: no such fact for your company and mode.
rate_limited: too many requests. The general limit is 120 requests a minute for all your tokens of one mode (live or sandbox) together, and 300 a minute per IP address before the token is checked. Some calls have a lower limit of their own, which counts only calls that did what they ask (a call refused with another error uses up no place); the Rate limits guide lists them. Wait for the number of seconds in the Retry-After header.
curl -X DELETE https://partners.monotree.com/api/v1/support/memories/mem_6 \
-H "Authorization: Bearer $MONOTREE_TOKEN"$client = new GuzzleHttp\Client();
$response = $client->request('DELETE', 'https://partners.monotree.com/api/v1/support/memories/mem_6', [
'headers' => [
'Authorization' => 'Bearer '.getenv('MONOTREE_TOKEN'),
],
]);
$data = json_decode($response->getBody(), true);const response = await fetch('https://partners.monotree.com/api/v1/support/memories/mem_6', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.MONOTREE_TOKEN}`,
},
});
const data = await response.json();import os
import requests
response = requests.delete(
"https://partners.monotree.com/api/v1/support/memories/mem_6",
headers={
"Authorization": f"Bearer {os.environ['MONOTREE_TOKEN']}",
},
)
data = response.json()Only mpt_test_… tokens work here; nothing reaches a real customer. Kept in this browser tab only.