Declare sender ID
curl --request POST \
--url https://api.withallo.com/v2/api/partner/accounts/{account_id}/sender_ids \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"sender_id": "PLOMBMARTIN",
"example_content": "Bonjour, votre intervention est confirmée demain à 9h. Plomberie Martin"
}
'import requests
url = "https://api.withallo.com/v2/api/partner/accounts/{account_id}/sender_ids"
payload = {
"sender_id": "PLOMBMARTIN",
"example_content": "Bonjour, votre intervention est confirmée demain à 9h. Plomberie Martin"
}
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({
sender_id: 'PLOMBMARTIN',
example_content: 'Bonjour, votre intervention est confirmée demain à 9h. Plomberie Martin'
})
};
fetch('https://api.withallo.com/v2/api/partner/accounts/{account_id}/sender_ids', 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/partner/accounts/{account_id}/sender_ids",
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([
'sender_id' => 'PLOMBMARTIN',
'example_content' => 'Bonjour, votre intervention est confirmée demain à 9h. Plomberie Martin'
]),
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/partner/accounts/{account_id}/sender_ids"
payload := strings.NewReader("{\n \"sender_id\": \"PLOMBMARTIN\",\n \"example_content\": \"Bonjour, votre intervention est confirmée demain à 9h. Plomberie Martin\"\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/partner/accounts/{account_id}/sender_ids")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"sender_id\": \"PLOMBMARTIN\",\n \"example_content\": \"Bonjour, votre intervention est confirmée demain à 9h. Plomberie Martin\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.withallo.com/v2/api/partner/accounts/{account_id}/sender_ids")
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 \"sender_id\": \"PLOMBMARTIN\",\n \"example_content\": \"Bonjour, votre intervention est confirmée demain à 9h. Plomberie Martin\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "vsi-2F6A1C9D4B7E8A0F3D5C6B9A1E2F4D7C8B0A3E61",
"account_id": "usr-575966AF3661061265263C58882BC409D2A427B8",
"partner_client_ref": "crm-12345",
"sender_id": "PLOMBMARTIN",
"status": "PENDING",
"example_content": "Bonjour, votre intervention est confirmée demain à 9h. Plomberie Martin",
"created_at": "2026-11-16T10:05:00"
}
}{
"error": {}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"retry_after_seconds": 123
}
}{
"error": {}
}{
"error": {}
}{
"error": {}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"retry_after_seconds": 123
}
}Sender ID
Déclarer un Sender ID
Declares an alphanumeric sender ID on one of your accounts, so the account can send SMS under that name. The sender ID is created with status PENDING and Allo reviews it by hand, usually in 1 to 5 business days. Allo then sends the partner.sender_id.validated or partner.sender_id.failed webhook. A sender ID belongs to one Allo account only, and an account holds at most 3. Sending the same sender_id again for the same account returns the existing one. Requires the PARTNER scope.
POST
/
v2
/
api
/
partner
/
accounts
/
{account_id}
/
sender_ids
Declare sender ID
curl --request POST \
--url https://api.withallo.com/v2/api/partner/accounts/{account_id}/sender_ids \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"sender_id": "PLOMBMARTIN",
"example_content": "Bonjour, votre intervention est confirmée demain à 9h. Plomberie Martin"
}
'import requests
url = "https://api.withallo.com/v2/api/partner/accounts/{account_id}/sender_ids"
payload = {
"sender_id": "PLOMBMARTIN",
"example_content": "Bonjour, votre intervention est confirmée demain à 9h. Plomberie Martin"
}
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({
sender_id: 'PLOMBMARTIN',
example_content: 'Bonjour, votre intervention est confirmée demain à 9h. Plomberie Martin'
})
};
fetch('https://api.withallo.com/v2/api/partner/accounts/{account_id}/sender_ids', 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/partner/accounts/{account_id}/sender_ids",
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([
'sender_id' => 'PLOMBMARTIN',
'example_content' => 'Bonjour, votre intervention est confirmée demain à 9h. Plomberie Martin'
]),
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/partner/accounts/{account_id}/sender_ids"
payload := strings.NewReader("{\n \"sender_id\": \"PLOMBMARTIN\",\n \"example_content\": \"Bonjour, votre intervention est confirmée demain à 9h. Plomberie Martin\"\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/partner/accounts/{account_id}/sender_ids")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"sender_id\": \"PLOMBMARTIN\",\n \"example_content\": \"Bonjour, votre intervention est confirmée demain à 9h. Plomberie Martin\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.withallo.com/v2/api/partner/accounts/{account_id}/sender_ids")
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 \"sender_id\": \"PLOMBMARTIN\",\n \"example_content\": \"Bonjour, votre intervention est confirmée demain à 9h. Plomberie Martin\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "vsi-2F6A1C9D4B7E8A0F3D5C6B9A1E2F4D7C8B0A3E61",
"account_id": "usr-575966AF3661061265263C58882BC409D2A427B8",
"partner_client_ref": "crm-12345",
"sender_id": "PLOMBMARTIN",
"status": "PENDING",
"example_content": "Bonjour, votre intervention est confirmée demain à 9h. Plomberie Martin",
"created_at": "2026-11-16T10:05:00"
}
}{
"error": {}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"retry_after_seconds": 123
}
}{
"error": {}
}{
"error": {}
}{
"error": {}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"retry_after_seconds": 123
}
}Scope requis :
PARTNERPENDING.
Requête
sender_idest requis : 1 à 11 lettres ou chiffres, sans espace ni symbole, par exemplePLOMBMARTIN. Une valeur absente échoue avecMISSING_FIELD, tout autre format avecSENDER_ID_INVALID_FORMAT. Le nom doit représenter l’activité réelle du compte, voir les règles de nommage du Sender ID.example_contentest optionnel : un exemple de message que le compte enverra, jusqu’à 1 000 caractères. Le relecteur d’Allo le lit. Une valeur plus longue échoue avecEXAMPLE_CONTENT_TOO_LONG.
Règles
- Un Sender ID n’appartient qu’à un seul compte Allo. Un nom déjà détenu par un autre compte Allo échoue avec
409 SENDER_ID_ALREADY_EXISTS. - Un compte détient au plus 3 Sender ID. Un quatrième échoue avec
409 MAX_SENDER_IDS_REACHED. - Renvoyer le même
sender_idpour le même compte renvoie le Sender ID existant : une nouvelle tentative est sans risque. - Vous ne pouvez déclarer des Sender ID que sur les comptes créés par votre propre clé API. Tout autre compte renvoie
404 PARTNER_ACCOUNT_NOT_FOUND.
Validation
Allo valide chaque Sender ID à la main, en général en 1 à 5 jours ouvrés. À la fin de la validation, Allo envoiepartner.sender_id.validated ou partner.sender_id.failed à votre propre endpoint webhook. Sans endpoint webhook, interrogez Obtenir un Sender ID.
Une fois le Sender ID VALIDATED, le compte envoie des SMS avec lui via Envoyer un SMS (France).Corps
application/json
Cette page vous a-t-elle été utile ?