Create thread
curl --request POST \
--url https://api.withallo.com/v2/api/threads \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"entity_type": "CALL",
"entity_id": "cll-abc123",
"content": "Can someone call them back today? @[Jane Doe](usr-abc123)"
}
'import requests
url = "https://api.withallo.com/v2/api/threads"
payload = {
"entity_type": "CALL",
"entity_id": "cll-abc123",
"content": "Can someone call them back today? @[Jane Doe](usr-abc123)"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
entity_type: 'CALL',
entity_id: 'cll-abc123',
content: 'Can someone call them back today? @[Jane Doe](usr-abc123)'
})
};
fetch('https://api.withallo.com/v2/api/threads', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.withallo.com/v2/api/threads",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'entity_type' => 'CALL',
'entity_id' => 'cll-abc123',
'content' => 'Can someone call them back today? @[Jane Doe](usr-abc123)'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.withallo.com/v2/api/threads"
payload := strings.NewReader("{\n \"entity_type\": \"CALL\",\n \"entity_id\": \"cll-abc123\",\n \"content\": \"Can someone call them back today? @[Jane Doe](usr-abc123)\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.withallo.com/v2/api/threads")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"entity_type\": \"CALL\",\n \"entity_id\": \"cll-abc123\",\n \"content\": \"Can someone call them back today? @[Jane Doe](usr-abc123)\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.withallo.com/v2/api/threads")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"entity_type\": \"CALL\",\n \"entity_id\": \"cll-abc123\",\n \"content\": \"Can someone call them back today? @[Jane Doe](usr-abc123)\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "cth-abc123",
"entity_type": "CALL",
"entity_id": "cll-abc123",
"contact_number": "+14155551234",
"resolved": false,
"resolved_at": null,
"resolved_by": null,
"comment_count": 1,
"created_at": "2026-07-13T10:00:00",
"comments": [
{
"id": "thc-abc123",
"content": "Can someone call them back today? @[Jane Doe](usr-abc123)",
"user": {
"id": "usr-def456",
"name": "John Smith"
},
"mentions": [
{
"user_id": "usr-abc123",
"name": "Jane Doe",
"deleted": false
}
],
"created_at": "2026-07-13T10:00:00",
"updated_at": "2026-07-13T10:00:00"
}
]
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"retry_after_seconds": 123
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"retry_after_seconds": 123
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"retry_after_seconds": 123
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"retry_after_seconds": 123
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"retry_after_seconds": 123
}
}Fils de discussion
Créer un fil de discussion
Starts a discussion thread on a conversation item with a first comment. Each item can have only one thread.
POST
/
v2
/
api
/
threads
Create thread
curl --request POST \
--url https://api.withallo.com/v2/api/threads \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"entity_type": "CALL",
"entity_id": "cll-abc123",
"content": "Can someone call them back today? @[Jane Doe](usr-abc123)"
}
'import requests
url = "https://api.withallo.com/v2/api/threads"
payload = {
"entity_type": "CALL",
"entity_id": "cll-abc123",
"content": "Can someone call them back today? @[Jane Doe](usr-abc123)"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
entity_type: 'CALL',
entity_id: 'cll-abc123',
content: 'Can someone call them back today? @[Jane Doe](usr-abc123)'
})
};
fetch('https://api.withallo.com/v2/api/threads', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.withallo.com/v2/api/threads",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'entity_type' => 'CALL',
'entity_id' => 'cll-abc123',
'content' => 'Can someone call them back today? @[Jane Doe](usr-abc123)'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.withallo.com/v2/api/threads"
payload := strings.NewReader("{\n \"entity_type\": \"CALL\",\n \"entity_id\": \"cll-abc123\",\n \"content\": \"Can someone call them back today? @[Jane Doe](usr-abc123)\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.withallo.com/v2/api/threads")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"entity_type\": \"CALL\",\n \"entity_id\": \"cll-abc123\",\n \"content\": \"Can someone call them back today? @[Jane Doe](usr-abc123)\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.withallo.com/v2/api/threads")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"entity_type\": \"CALL\",\n \"entity_id\": \"cll-abc123\",\n \"content\": \"Can someone call them back today? @[Jane Doe](usr-abc123)\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "cth-abc123",
"entity_type": "CALL",
"entity_id": "cll-abc123",
"contact_number": "+14155551234",
"resolved": false,
"resolved_at": null,
"resolved_by": null,
"comment_count": 1,
"created_at": "2026-07-13T10:00:00",
"comments": [
{
"id": "thc-abc123",
"content": "Can someone call them back today? @[Jane Doe](usr-abc123)",
"user": {
"id": "usr-def456",
"name": "John Smith"
},
"mentions": [
{
"user_id": "usr-abc123",
"name": "Jane Doe",
"deleted": false
}
],
"created_at": "2026-07-13T10:00:00",
"updated_at": "2026-07-13T10:00:00"
}
]
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"retry_after_seconds": 123
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"retry_after_seconds": 123
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"retry_after_seconds": 123
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"retry_after_seconds": 123
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"retry_after_seconds": 123
}
}Scope requis :
THREADS_WRITEComportement
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 danscontent 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 |
Autorisations
Corps
application/json
Type of the conversation item to attach the thread to.
Options disponibles:
CALL, TEXT_MESSAGE, CONVERSATION_NOTE ID of the conversation item (cll-*, msg-*, or not-*).
Exemple:
"cll-abc123"
First comment text (max 4000 characters). Mention teammates inline with @[Name](usr-...).
Exemple:
"Can someone call them back today? @[Jane Doe](usr-abc123)"
Réponse
Thread created with its first comment
Show child attributes
Show child attributes
Cette page vous a-t-elle été utile ?
⌘I