Démarre un fil de discussion sur un élément de conversation. content devient le premier commentaire du fil, et la réponse est le fil complet incluant ce…
POST/v2/api/threads
Comportement
Démarre un fil de discussion sur un élément de conversation. content devient le premier commentaire du fil, et la réponse est le fil complet incluant ce commentaire.
Chaque élément ne peut avoir qu'un seul fil. S'il en existe déjà un, la requête retourne une erreur 409 avec le code THREAD_ALREADY_EXISTS — retrouvez-le avec GET /v2/api/threads et ajoutez-y un commentaire à la place.
Mentions
Mentionnez des coéquipiers inline dans content avec @[Display Name](usr-xxxx) — voir le guide des mentions.
Erreurs
Statut
Code
Quand
400
INVALID_THREAD_ENTITY_TYPE
entity_type n'est pas l'un de CALL, TEXT_MESSAGE, CONVERSATION_NOTE
400
EMPTY_NOTE_CONTENT
content est manquant ou vide
400
NOTE_CONTENT_TOO_LONG
content dépasse 4 000 caractères
404
CONVERSATION_ITEM_NOT_FOUND
Aucun élément de conversation avec cet entity_id
409
THREAD_ALREADY_EXISTS
L'élément a déjà un fil
Autorisation
Authorizationstring · headerrequis
Api-Key ak_live_…
Corps
entity_typeenum<string>requis
Type of the conversation item to attach the thread to.
CALLTEXT_MESSAGECONVERSATION_NOTE
entity_idstringrequis
ID of the conversation item (cll-*, msg-*, or not-*).
contentstringrequis
First comment text (max 4000 characters). Mention teammates inline with @[Name](usr-...).
Réponses
201Thread created with its first comment
dataobject
10 champs
idstring
Thread ID (cth-*)
entity_typeenum<string>
Type of the conversation item the thread is attached to.
CALLTEXT_MESSAGECONVERSATION_NOTE
entity_idstring
ID of the conversation item (cll-*, msg-*, or not-*).
contact_numberstring
The contact's phone number (E.164).
resolvedboolean
resolved_atstring<date-time> | null
resolved_byobject
Author of a note or comment.
2 champs
idstring
namestring | null
comment_countinteger
created_atstring<date-time>
commentsobject[]
6 champs
idstring
Comment ID (thc-*)
contentstring
Comment text, with mentions inline as @[Name](usr-...).
userobject
Author of a note or comment.
2 champs
idstring
namestring | null
mentionsobject[]
3 champs
user_idstring
namestring | null
deletedboolean
true if the mentioned user has since been removed from the team.