Déclare un Sender ID alphanumérique sur l'un de vos comptes, pour que le compte envoie des SMS sous le nom de sa marque plutôt que depuis un numéro. En…
Déclare un Sender ID alphanumérique sur l'un de vos comptes, pour que le compte envoie des SMS sous le nom de sa marque plutôt que depuis un numéro. En France, les SMS automatisés ne peuvent pas partir d'un numéro mobile : le Sender ID est donc ce qui permet à votre logiciel d'écrire aux clients du compte. La réponse renvoie le Sender ID avec le statut PENDING.
Requête
sender_id est requis : 1 à 11 lettres ou chiffres, sans espace ni symbole, par exemple PLOMBMARTIN. Une valeur absente échoue avec MISSING_FIELD, tout autre format avec SENDER_ID_INVALID_FORMAT. Le nom doit représenter l'activité réelle du compte, voir les règles de nommage du Sender ID.
example_content est 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 avec EXAMPLE_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_id pour 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.
Une fois le Sender ID VALIDATED, le compte envoie des SMS avec lui via Envoyer un SMS (France).
Autorisation
Authorizationstring · headerrequis
Api-Key ak_live_…
Paramètres de chemin
account_idstringrequis
The account id returned by Create account (usr-*).
Corps
sender_idstringrequis
1 to 11 letters or digits, with no spaces or symbols. It must not belong to another Allo account.
example_contentstring | null
Optional. An example of a message the account will send, shown to the Allo reviewer.
Réponses
201Sender ID declared, waiting for Allo's review
dataobject
An alphanumeric sender ID declared on an account you provisioned.
7 champs
idstring
The sender ID's id (vsi-*).
account_idstring
The account the sender ID is declared on.
partner_client_refstring | null
Your own reference, set when the account was created.
sender_idstring
The name recipients see instead of a phone number.
statusenum<string>
PENDING: waiting for Allo's review. VALIDATED: approved, the account can send SMS with it. FAILED: rejected, declare another name. DISABLED: deactivated by Allo after validation, sending with it is refused.
PENDINGVALIDATEDFAILEDDISABLED
example_contentstring | null
The example message sent with the declaration.
created_atstring<date-time>
When the sender ID was declared.
400Validation error: MISSING_FIELD (sender_id), SENDER_ID_INVALID_FORMAT (sender_id is not 1 to 11 letters or digits) or EXAMPLE_CONTENT_TOO_LONG (example_content is longer than 1000 characters).
errorobject
401403The API key lacks the PARTNER scope.
errorobject
404No account with this id was provisioned by your API key, or the account is deactivated (PARTNER_ACCOUNT_NOT_FOUND).
errorobject
409The sender ID already belongs to another Allo account (SENDER_ID_ALREADY_EXISTS), or the account already has 3 sender IDs (MAX_SENDER_IDS_REACHED).