Documentation API TextioPro

Intégrez facilement la puissance de nos services SMS dans vos applications et sites web.

Introduction

Bienvenue dans la documentation de l'API TextioPro. Notre API RESTful vous permet d'intégrer nos services d'envoi et de réception de SMS, de gestion de contacts, et bien plus encore, directement dans vos propres applications, sites web ou systèmes.

L'API utilise les verbes HTTP standards et retourne des réponses au format JSON. Familiarisez-vous avec nos points de terminaison (endpoints), les paramètres requis et les exemples de requêtes pour commencer rapidement.

Point de terminaison de base (HTTP API):

https://app.textiopro.com/api/http/

Point de terminaison de base (Bearer Token API):

https://app.textiopro.com/api/v3/

Authentification

TextioPro supporte deux méthodes d'authentification pour son API :

1. Authentification par Token API (pour /api/http/)

Pour les points de terminaison sous https://app.textiopro.com/api/http/, vous devez inclure votre token API comme paramètre api_token dans le corps (pour POST, PATCH, DELETE) ou dans l'URL (pour GET) de chaque requête.

Vous pouvez obtenir votre token API depuis la section "Développeurs" de votre tableau de bord TextioPro. Obtenir mon Token API.


// Exemple d'inclusion du token API dans une requête POST (corps JSON)
{
  "api_token": "VOTRE_TOKEN_API_ICI",
  "parametre1": "valeur1",
  // ... autres paramètres
}

# Exemple d'inclusion du token API dans une requête GET (URL)
https://app.textiopro.com/api/http/sms/send?recipient=NUMERO&message=MESSAGE&api_token=VOTRE_TOKEN_API_ICI
                            

2. Authentification par Bearer Token (pour /api/v3/)

Pour les points de terminaison sous https://app.textiopro.com/api/v3/, l'authentification se fait via un Bearer Token dans l'en-tête Authorization de chaque requête.

Vous pouvez également obtenir ce token depuis la section "Développeurs" de votre tableau de bord TextioPro.


# Exemple d'en-tête d'autorisation
Authorization: Bearer VOTRE_BEARER_TOKEN_ICI

Assurez-vous de garder votre token API secret et de ne jamais l'exposer côté client (par exemple, dans du code JavaScript exécuté dans le navigateur).

Toutes les requêtes API doivent également inclure l'en-tête Accept: application/json. Pour les requêtes POST, PATCH, et PUT qui envoient des données JSON, incluez également l'en-tête Content-Type: application/json.

API Contacts

TextioPro API Contacts vous aide à gérer les contacts par leur ID unique. Utilisez cet ID pour créer, afficher, mettre à jour ou supprimer des contacts. Cette API fonctionne comme un ensemble de contacts spécifiques au client, permettant de les regrouper et d'attribuer des valeurs personnalisées pour les messages SMS.

L'API Contacts utilise les verbes HTTP et une structure RESTful. Les données de requête et de réponse sont au format JSON (UTF-8) avec des valeurs codées par URL.

Points de terminaison API (Base)

HTTP API: https://app.textiopro.com/api/http/contacts
Bearer API: https://app.textiopro.com/api/v3/contacts
Paramètres Généraux (pour /api/http/)
Paramètre Obligatoire Description
api_token
Oui
Votre Token API. Obtenir un Token
Accept
Oui
Doit être application/json
Content-Type
Oui
Doit être application/json (pour POST, PATCH, etc.)
En-têtes Généraux (pour /api/v3/)
En-tête Obligatoire Description
Authorization
Oui
Bearer VOTRE_BEARER_TOKEN_ICI
Accept
Oui
Doit être application/json
Content-Type
Oui
Doit être application/json (pour POST, PATCH, etc.)

Créer un contact

Crée un nouvel objet contact. TextioPro retourne l'objet contact créé avec chaque requête.

Point de terminaison API

POST https://app.textiopro.com/api/http/contacts/{group_id}/store
POST https://app.textiopro.com/api/v3/contacts/{group_id}/store
Paramètres
Paramètre Obligatoire Type Description
group_id
Oui
string uid du groupe de contacts
PHONE
Oui
number Le numéro de téléphone du contact.
OTHER_FIELDS
Non
string Tous les autres champs du contact : FIRST_NAME (?), LAST_NAME (?),... (selon la configuration des champs du groupe de contacts)
Exemple de requête (HTTP API)

curl -X POST https://app.textiopro.com/api/http/contacts/6065ecdc9184a/store \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
  "api_token":"VOTRE_TOKEN_API_ICI",
  "PHONE":"8801721970168",
  "FIRST_NAME":"Jhon",
  "LAST_NAME":"Doe"
}'
Exemple de requête (Bearer API)

curl -X POST https://app.textiopro.com/api/v3/contacts/6065ecdc9184a/store \
-H 'Authorization: Bearer VOTRE_BEARER_TOKEN_ICI' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
  "PHONE":"8801721970168",
  "FIRST_NAME":"Jhon",
  "LAST_NAME":"Doe"
}'
Retours

Retourne un objet contact si la requête a réussi.


{
  "status": "success",
  "data": "données du contact avec tous les détails"
}

Si la requête échoue, un objet d'erreur sera retourné.


{
  "status": "error",
  "message" : "Description lisible de l'erreur."
}

Voir un contact

Récupère les informations d'un contact existant. Vous devez uniquement fournir l'uid unique du contact et l'uid du groupe qui ont été retournés lors de la création ou de la réception.

Point de terminaison API

POST https://app.textiopro.com/api/http/contacts/{group_id}/search/{uid}
POST https://app.textiopro.com/api/v3/contacts/{group_id}/search/{uid}
Paramètres
Paramètre Obligatoire Type Description
group_id
Oui
string uid du groupe de contacts
uid
Oui
string uid du contact
Exemple de requête (HTTP API)

curl -X POST https://app.textiopro.com/api/http/contacts/6065ecdc9184a/search/606732aec8705 \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{"api_token":"VOTRE_TOKEN_API_ICI"}'
Exemple de requête (Bearer API)

curl -X POST https://app.textiopro.com/api/v3/contacts/6065ecdc9184a/search/606732aec8705 \
-H 'Authorization: Bearer VOTRE_BEARER_TOKEN_ICI' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
Retours

Retourne un objet contact si la requête a réussi.

{ "status": "success", "data": "données du contact avec tous les détails" }

Si la requête échoue, un objet d'erreur sera retourné.

{ "status": "error", "message" : "Description lisible de l'erreur." }

Mettre à jour un contact

Met à jour un contact existant. Vous devez uniquement fournir l'uid unique du contact et l'uid du groupe de contacts qui ont été retournés lors de la création.

Point de terminaison API

PATCH https://app.textiopro.com/api/http/contacts/{group_id}/update/{uid}
PATCH https://app.textiopro.com/api/v3/contacts/{group_id}/update/{uid}
Paramètres
Paramètre Obligatoire Type Description
group_id
Oui
string uid du groupe de contacts
uid
Oui
string uid du contact
PHONE
Oui
number Le nouveau numéro de téléphone du contact.
OTHER_FIELDS
Non
string Les autres champs à mettre à jour.
Exemple de requête (HTTP API)

curl -X PATCH https://app.textiopro.com/api/http/contacts/6065ecdc9184a/update/606732aec8705 \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
  "api_token":"VOTRE_TOKEN_API_ICI",
  "PHONE":"8801721970169",
  "FIRST_NAME":"Johnathan"
}'
Exemple de requête (Bearer API)

curl -X PATCH https://app.textiopro.com/api/v3/contacts/6065ecdc9184a/update/606732aec8705 \
-H 'Authorization: Bearer VOTRE_BEARER_TOKEN_ICI' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
  "PHONE":"8801721970169",
  "FIRST_NAME":"Johnathan"
}'
Retours

Retourne un objet contact si la requête a réussi.

{ "status": "success", "data": "données du contact avec tous les détails" }

Si la requête échoue, un objet d'erreur sera retourné.

{ "status": "error", "message" : "Description lisible de l'erreur." }

Supprimer un contact

Supprime un contact existant. Vous devez uniquement fournir l'uid unique du contact et l'uid du groupe qui ont été retournés lors de la création.

Point de terminaison API

DELETE https://app.textiopro.com/api/http/contacts/{group_id}/delete/{uid}
DELETE https://app.textiopro.com/api/v3/contacts/{group_id}/delete/{uid}
Paramètres
Paramètre Obligatoire Type Description
group_id
Oui
string uid du groupe de contacts
uid
Oui
string uid du contact
Exemple de requête (HTTP API)

curl -X DELETE https://app.textiopro.com/api/http/contacts/6065ecdc9184a/delete/606732aec8705 \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{"api_token":"VOTRE_TOKEN_API_ICI"}'
Exemple de requête (Bearer API)

curl -X DELETE https://app.textiopro.com/api/v3/contacts/6065ecdc9184a/delete/606732aec8705 \
-H 'Authorization: Bearer VOTRE_BEARER_TOKEN_ICI' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
Retours

Retourne un objet de succès si la requête a réussi.


{
  "status": "success",
  "data": "Le contact a été supprimé."
}

Si la requête échoue, un objet d'erreur sera retourné.

{ "status": "error", "message" : "Description lisible de l'erreur." }

Voir tous les contacts d'un groupe

Point de terminaison API

POST https://app.textiopro.com/api/http/contacts/{group_id}/all
POST https://app.textiopro.com/api/v3/contacts/{group_id}/all
Paramètres
Paramètre Obligatoire Type Description
group_id
Oui
string uid du groupe de contacts
Exemple de requête (HTTP API)

curl -X POST https://app.textiopro.com/api/http/contacts/6065ecdc9184a/all \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{"api_token":"VOTRE_TOKEN_API_ICI"}'
Exemple de requête (Bearer API)

curl -X POST https://app.textiopro.com/api/v3/contacts/6065ecdc9184a/all \
-H 'Authorization: Bearer VOTRE_BEARER_TOKEN_ICI' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
Retours

Retourne un objet contenant les données des contacts avec pagination.


{
  "status": "success",
  "data": "données des contacts avec pagination"
}

Si la requête échoue, un objet d'erreur sera retourné.

{ "status": "error", "message" : "Description lisible de l'erreur." }
API Groupes de Contacts

TextioPro API Groupes de contacts vous permet de gérer les groupes de contacts par leur ID unique. Utilisez cet ID pour créer, afficher, mettre à jour ou supprimer des groupes.

Points de terminaison API (Base)

HTTP API: https://app.textiopro.com/api/http/contacts
Bearer API: https://app.textiopro.com/api/v3/contacts

Note: La gestion des groupes se fait sur le même point de terminaison de base que les contacts, mais avec des méthodes HTTP et des chemins spécifiques.

Créer un groupe

Crée un nouvel objet groupe. TextioPro retourne l'objet groupe créé avec chaque requête.

Point de terminaison API

POST https://app.textiopro.com/api/http/contacts
POST https://app.textiopro.com/api/v3/contacts
Paramètres
Paramètre Obligatoire Type Description
name
Oui
string Le nom du groupe
Exemple de requête (HTTP API)

curl -X POST https://app.textiopro.com/api/http/contacts \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{ "api_token":"VOTRE_TOKEN_API_ICI", "name":"Nouveau Groupe" }'
Exemple de requête (Bearer API)

curl -X POST https://app.textiopro.com/api/v3/contacts \
-H 'Authorization: Bearer VOTRE_BEARER_TOKEN_ICI' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{"name":"Nouveau Groupe"}'
Retours

Retourne un objet groupe si la requête a réussi.

{ "status": "success", "data": "données du groupe avec tous les détails" }

Si la requête échoue, un objet d'erreur sera retourné.

{ "status": "error", "message" : "Description lisible de l'erreur." }

Voir un groupe

Récupère les informations d'un groupe existant. Vous devez uniquement fournir l'ID unique du groupe qui a été retourné lors de la création.

Point de terminaison API

POST https://app.textiopro.com/api/http/contacts/{group_id}/show
POST https://app.textiopro.com/api/v3/contacts/{group_id}/show
Paramètres
Paramètre Obligatoire Type Description
group_id
Oui
string uid du groupe de contacts
Exemple de requête (HTTP API)

curl -X POST https://app.textiopro.com/api/http/contacts/6065ecdc9184a/show \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{"api_token":"VOTRE_TOKEN_API_ICI"}'
Exemple de requête (Bearer API)

curl -X POST https://app.textiopro.com/api/v3/contacts/6065ecdc9184a/show \
-H 'Authorization: Bearer VOTRE_BEARER_TOKEN_ICI' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
Retours

Retourne un objet groupe si la requête a réussi.

{ "status": "success", "data": "données du groupe avec tous les détails" }

Si la requête échoue, un objet d'erreur sera retourné.

{ "status": "error", "message" : "Description lisible de l'erreur." }

Mettre à jour un groupe

Met à jour un groupe existant. Vous devez uniquement fournir l'ID unique qui a été retourné lors de la création.

Point de terminaison API

PATCH https://app.textiopro.com/api/http/contacts/{group_id}
PATCH https://app.textiopro.com/api/v3/contacts/{group_id}
Paramètres
Paramètre Obligatoire Type Description
group_id
Oui
string uid du groupe de contacts
name
Oui
string Nouveau nom du groupe
Exemple de requête (HTTP API)

curl -X PATCH https://app.textiopro.com/api/http/contacts/6065ecdc9184a \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{ "api_token":"VOTRE_TOKEN_API_ICI", "name":"Nouveau Nom du Groupe" }'
Exemple de requête (Bearer API)

curl -X PATCH https://app.textiopro.com/api/v3/contacts/6065ecdc9184a \
-H 'Authorization: Bearer VOTRE_BEARER_TOKEN_ICI' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{"name":"Nouveau Nom du Groupe"}'
Retours

Retourne un objet groupe si la requête a réussi.

{ "status": "success", "data": "données du groupe mises à jour avec tous les détails" }

Si la requête échoue, un objet d'erreur sera retourné.

{ "status": "error", "message" : "Description lisible de l'erreur." }

Supprimer un groupe

Deletes an existing group. You only need to supply the unique id that was returned upon creation.

Point de terminaison API

DELETE https://app.textiopro.com/api/http/contacts/{group_id}
DELETE https://app.textiopro.com/api/v3/contacts/{group_id}
Paramètres
Paramètre Obligatoire Type Description
group_id
Oui
string uid du groupe de contacts
Exemple de requête (HTTP API)

curl -X DELETE https://app.textiopro.com/api/http/contacts/6065ecdc9184a \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{"api_token":"VOTRE_TOKEN_API_ICI"}'
Exemple de requête (Bearer API)

curl -X DELETE https://app.textiopro.com/api/v3/contacts/6065ecdc9184a \
-H 'Authorization: Bearer VOTRE_BEARER_TOKEN_ICI' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
Retours

Retourne un objet de succès si la requête a réussi.


{
  "status": "success",
  "data": "null"
}

Si la requête échoue, un objet d'erreur sera retourné.

{ "status": "error", "message" : "Description lisible de l'erreur." }

Voir tous les groupes

Point de terminaison API

POST https://app.textiopro.com/api/http/contacts
GET https://app.textiopro.com/api/v3/contacts
Paramètres
Paramètre Obligatoire Type Description
api_token
Oui
string Votre Token API (pour HTTP API). Obtenir un Token
Exemple de requête (HTTP API)

curl -X POST https://app.textiopro.com/api/http/contacts \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{"api_token":"VOTRE_TOKEN_API_ICI"}'
Exemple de requête (Bearer API)

curl -X GET https://app.textiopro.com/api/v3/contacts \
-H 'Authorization: Bearer VOTRE_BEARER_TOKEN_ICI' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
Retours

Retourne un objet contenant les données des groupes avec pagination.


{
  "status": "success",
  "data": "données des groupes avec pagination"
}

Si la requête échoue, un objet d'erreur sera retourné.

{ "status": "error", "message" : "Description lisible de l'erreur." }
API SMS

TextioPro API SMS permet d'envoyer et recevoir des SMS depuis et vers n'importe quel pays via une API REST. Chaque message a un ID unique pour vérifier son statut.

Points de terminaison API (Base)

HTTP API: https://app.textiopro.com/api/http/sms
Bearer API: https://app.textiopro.com/api/v3/sms

Envoyer un SMS

TextioPro's Programmable SMS API enables you to programmatically send SMS messages from your web application. First, you need to create a new message object. TextioPro returns the created message object with each request.

Send your first SMS message with this example request.

Point de terminaison API

POST https://app.textiopro.com/api/http/sms/send
POST https://app.textiopro.com/api/v3/sms/send
Paramètres
Paramètre Obligatoire Type Description
api_token
Oui
string Votre Token API (pour HTTP API). Get API Token
Authorization
Oui
string Bearer VOTRE_BEARER_TOKEN_ICI (pour Bearer API)
recipient
Oui
string Number to send message. Use comma (,) to send multiple numbers. Ex. 31612345678,8801721970168
sender_id
Oui
string The sender of the message. This can be a telephone number (including country code) or an alphanumeric string. In case of an alphanumeric string, the maximum length is 11 characters.
type
Oui
string The type of the message. For text message you have to insert plain as sms type.
message
Oui
string The body of the SMS message.
schedule_time
Non
datetime The scheduled date and time of the message in RFC3339 format (Y-m-d H:i)
dlt_template_id
Non
string The ID of your registered DLT (Distributed Ledger Technology) content template.
Example request for Single Number (HTTP API)

curl -X POST https://app.textiopro.com/api/http/sms/send \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"api_token":"VOTRE_TOKEN_API_ICI",
"recipient":"31612345678",
"sender_id":"YourName",
"type":"plain",
"message":"This is a test message"
}'
Example request for Single Number (Bearer API)

curl -X POST https://app.textiopro.com/api/v3/sms/send \
-H 'Authorization: Bearer VOTRE_BEARER_TOKEN_ICI' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"recipient":"31612345678",
"sender_id":"YourName",
"type":"plain",
"message":"This is a test message"
}'
Example request for GET method (HTTP API)

https://app.textiopro.com/api/http/sms/send?recipient=31612345678&sender_id=YourName&message=test&api_token=VOTRE_TOKEN_API_ICI
    
Example request for Multiple Numbers (HTTP API)

curl -X POST https://app.textiopro.com/api/http/sms/send \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"api_token":"VOTRE_TOKEN_API_ICI",
"recipient":"31612345678,880172145789",
"sender_id":"YourName",
"type":"plain",
"message":"This is a test message",
"schedule_time=2021-12-20 07:00"
}'
Example request for Multiple Numbers (Bearer API)

curl -X POST https://app.textiopro.com/api/v3/sms/send \
-H 'Authorization: Bearer VOTRE_BEARER_TOKEN_ICI' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"recipient":"31612345678,880172145789",
"sender_id":"YourName",
"type":"plain",
"message":"This is a test message",
"schedule_time=2021-12-20 07:00"
}'
Retours

Retourne un objet si la requête a réussi.


{
    "status": "success",
    "data": "sms reports with all details",
}

Si la requête échoue, un objet d'erreur sera retourné.


{
    "status": "error",
    "message" : "A human-readable description of the error."
}

Envoyer une Campagne (Utilisant une liste de contacts)

TextioPro's Programmable SMS API enables you to programmatically send Campaigns from your web application. First, you need to create a new message object. TextioPro returns the created message object with each request.

Send your first Campaign Using Contact List with this example request.

Point de terminaison API

POST https://app.textiopro.com/api/http/sms/campaign
POST https://app.textiopro.com/api/v3/sms/campaign
Paramètres
Paramètre Obligatoire Type Description
api_token
Oui
string Votre Token API (pour HTTP API). Get API Token
Authorization
Oui
string Bearer VOTRE_BEARER_TOKEN_ICI (pour Bearer API)
contact_list_id
Oui
string Contact list to send message. Use comma (,) to send multiple contact lists. Ex. 6415907d0d7a6,6415907d0d37a
sender_id
Oui
string The sender of the message. This can be a telephone number (including country code) or an alphanumeric string. In case of an alphanumeric string, the maximum length is 11 characters.
type
Oui
string The type of the message. For text message you have to insert plain as sms type.
message
Oui
string The body of the SMS message.
schedule_time
Non
datetime The scheduled date and time of the message in RFC3339 format (Y-m-d H:i)
dlt_template_id
Non
string The ID of your registered DLT (Distributed Ledger Technology) content template.
Example request for Single Contact List (HTTP API)

curl -X POST https://app.textiopro.com/api/http/sms/campaign \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"api_token":"VOTRE_TOKEN_API_ICI",
"recipient":"6415907d0d37a",
"sender_id":"YourName",
"type":"plain",
"message":"This is a test message"
}'
Example request for Single Contact List (Bearer API)

curl -X POST https://app.textiopro.com/api/v3/sms/campaign \
-H 'Authorization: Bearer VOTRE_BEARER_TOKEN_ICI' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"recipient":"6415907d0d37a",
"sender_id":"YourName",
"type":"plain",
"message":"This is a test message"
}'
Example request for Multiple Contact Lists (HTTP API)

curl -X POST https://app.textiopro.com/api/http/sms/campaign \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"api_token":"VOTRE_TOKEN_API_ICI",
"recipient":"6415907d0d37a,6415907d0d7a6",
"sender_id":"YourName",
"type":"plain",
"message":"This is a test message",
"schedule_time=2021-12-20 07:00"
}'
Example request for Multiple Contact Lists (Bearer API)

curl -X POST https://app.textiopro.com/api/v3/sms/campaign \
-H 'Authorization: Bearer VOTRE_BEARER_TOKEN_ICI' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"recipient":"6415907d0d37a,6415907d0d7a6",
"sender_id":"YourName",
"type":"plain",
"message":"This is a test message",
"schedule_time=2021-12-20 07:00"
}'
Retours

Retourne un objet si la requête a réussi.


{
    "status": "success",
    "data": "campaign reports with all details",
}

Si la requête échoue, un objet d'erreur sera retourné.


{
    "status": "error",
    "message" : "A human-readable description of the error."
}

Voir un SMS

You can use TextioPro's SMS API to retrieve information of an existing inbound or outbound SMS message.

You only need to supply the unique message id that was returned upon creation or receiving.

Point de terminaison API

POST https://app.textiopro.com/api/http/sms/{uid}
GET https://app.textiopro.com/api/v3/sms/{uid}
Paramètres
Paramètre Obligatoire Type Description
api_token
Oui
string Votre Token API (pour HTTP API). Get API Token
Authorization
Oui
string Bearer VOTRE_BEARER_TOKEN_ICI (pour Bearer API)
uid
Oui
string A unique random uid which is created on the TextioPro platform and is returned upon creation of the object.
Example request (HTTP API)

curl -X POST https://app.textiopro.com/api/http/sms/606812e63f78b \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{"api_token":"VOTRE_TOKEN_API_ICI"}'
Example request (Bearer API)

curl -X GET https://app.textiopro.com/api/v3/sms/606812e63f78b \
-H 'Authorization: Bearer VOTRE_BEARER_TOKEN_ICI' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
Retours

Returns a contact object if the request was successful.


{
    "status": "success",
    "data": "sms data with all details",
}

If the request failed, an error object will be returned.


{
    "status": "error",
    "message" : "A human-readable description of the error."
}

Voir tous les messages

Point de terminaison API

POST https://app.textiopro.com/api/http/sms
GET https://app.textiopro.com/api/v3/sms
Paramètres
Paramètre Obligatoire Type Description
api_token
Oui
string Votre Token API (pour HTTP API). Get API Token
Example request (HTTP API)

curl -X POST https://app.textiopro.com/api/http/sms \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{"api_token":"VOTRE_TOKEN_API_ICI"}'
Example request (Bearer API)

curl -X GET https://app.textiopro.com/api/v3/sms \
-H 'Authorization: Bearer VOTRE_BEARER_TOKEN_ICI' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
Retours

Returns a contact object if the request was successful.


{
    "status": "success",
    "data": "sms reports with pagination",
}

Si the request fails, an error object will be returned.


{
    "status": "error",
    "message" : "A human-readable description of the error."
}

Voir une Campagne

You can use TextioPro's Campaign API to retrieve information of an existing Campaigns.

You only need to supply the unique campaign id that was returned upon creation or receiving.

Point de terminaison API

POST https://app.textiopro.com/api/http/campaign/{uid}/view
GET https://app.textiopro.com/api/v3/campaign/{uid}/view
Paramètres
Paramètre Obligatoire Type Description
api_token
Oui
string Votre Token API (pour HTTP API). Get API Token
Authorization
Oui
string Bearer VOTRE_BEARER_TOKEN_ICI (pour Bearer API)
uid
Oui
string A unique random uid which is created on the TextioPro platform and is returned upon creation of the object.
Example request (HTTP API)

curl -X POST https://app.textiopro.com/api/http/campaign/606812e63f78b/view \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{"api_token":"VOTRE_TOKEN_API_ICI"}'
Example request (Bearer API)

curl -X GET https://app.textiopro.com/api/v3/campaign/606812e63f78b/view \
-H 'Authorization: Bearer VOTRE_BEARER_TOKEN_ICI' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
Retours

Returns a contact object if the request was successful.


{
    "status": "success",
    "data": "campaign data with all details",
}

Si the request fails, an error object will be returned.


{
    "status": "error",
    "message" : "A human-readable description of the error."
}
API Voice

TextioPro API Voice allows you to send voice messages to any country via a REST API. Each message has a unique ID to verify its status.

Points de terminaison API (Base)

HTTP API: https://app.textiopro.com/api/http/sms/send
Bearer API: https://app.textiopro.com/api/v3/sms/send

Note: Voice messages use the same send endpoint as SMS, but require different parameters.

Envoyer un message vocal

Send your first Voice message with this example request.

Point de terminaison API

POST https://app.textiopro.com/api/http/sms/send
POST https://app.textiopro.com/api/v3/sms/send
Paramètres
Paramètre Obligatoire Type Description
api_token
Oui
string Votre Token API (pour HTTP API). Get API Token
Authorization
Oui
string Bearer VOTRE_BEARER_TOKEN_ICI (pour Bearer API)
recipient
Oui
string Number to send message
sender_id
Oui
string The sender of the message. This can be a telephone number (including country code) or an alphanumeric string. In case of an alphanumeric string, the maximum length is 11 characters.
type
Oui
string The type of the message. For text message you have to insert voice as sms type.
language
Oui
string The language in which the message needs to be read to the recipient. Possible values are: cy-gb, da-dk, de-de, el-gr, en-au, en-gb, en-gb-wls, en-in, en-us, es-es, es-mx, es-us, fr-ca, fr-fr, id-id, is-is, it-it, ja-jp, ko-kr, ms-my, nb-no, nl-nl, pl-pl, pt-br, pt-pt, ro-ro, ru-ru, sv-se, ta-in, th-th, tr-tr, vi-vn, zh-cn, zh-hk.
gender
Oui
string The gender in which the messages needs to be read to the recipient. Possible values are: male, female
message
Oui
string The body of the SMS message.
schedule_time
Non
datetime The scheduled date and time of the message in RFC3339 format (Y-m-d H:i)
Example request (HTTP API)

curl -X POST https://app.textiopro.com/api/http/sms/send \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"api_token":"VOTRE_TOKEN_API_ICI",
"recipient":"31612345678",
"sender_id":"YourName",
"type":"voice",
"language=en-gb",
"gender=female",
"message":"This is a test message"
}'
Example request (Bearer API)

curl -X POST https://app.textiopro.com/api/v3/sms/send \
-H 'Authorization: Bearer VOTRE_BEARER_TOKEN_ICI' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"recipient":"31612345678",
"sender_id":"YourName",
"type":"voice",
"language=en-gb",
"gender=female",
"message":"This is a test message"
}'
Example request for GET method (HTTP API)

https://app.textiopro.com/api/http/sms/send?recipient=31612345678&sender_id=YourName&message=test&api_token=VOTRE_TOKEN_API_ICI&type=voice&language=en-gb&gender=female
    
Retours

Returns an object if the request was successful.


{
    "status": "success",
    "data": "sms reports with all details",
}

Si the request fails, an error object will be returned.


{
    "status": "error",
    "message" : "A human-readable description of the error."
}
API MMS

TextioPro API MMS allows you to send MMS messages to any country via a REST API. Each message has a unique ID to verify its status.

Points de terminaison API (Base)

HTTP API: https://app.textiopro.com/api/http/sms/send
Bearer API: https://app.textiopro.com/api/v3/sms/send

Note: MMS messages use the same send endpoint as SMS and Voice, but require different parameters, specifically the media_url.

Envoyer un message MMS

Send your first MMS message with this example request.

Point de terminaison API

POST https://app.textiopro.com/api/http/sms/send
POST https://app.textiopro.com/api/v3/sms/send
Paramètres
Paramètre Obligatoire Type Description
api_token
Oui
string Votre Token API (pour HTTP API). Get API Token
Authorization
Oui
string Bearer VOTRE_BEARER_TOKEN_ICI (pour Bearer API)
recipient
Oui
string Number to send message
sender_id
Oui
string The sender of the message. This can be a telephone number (including country code) or an alphanumeric string. In case of an alphanumeric string, the maximum length is 11 characters.
type
Oui
string The type of the message. For MMS message you have to insert mms as type.
message
Oui
string The body of the MMS message.
media_url
Oui
string The URL of the media file (image, video, etc.) to include in the MMS.
schedule_time
Non
datetime The scheduled date and time of the message in RFC3339 format (Y-m-d H:i)
Example request (HTTP API)

curl -X POST https://app.textiopro.com/api/http/sms/send \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"api_token":"VOTRE_TOKEN_API_ICI",
"recipient":"31612345678",
"sender_id":"YourName",
"type":"mms",
"message":"This is an MMS message with an image.",
"media_url":"https://example.com/image.jpg"
}'
Example request (Bearer API)

curl -X POST https://app.textiopro.com/api/v3/sms/send \
-H 'Authorization: Bearer VOTRE_BEARER_TOKEN_ICI' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"recipient":"31612345678",
"sender_id":"YourName",
"type":"mms",
"message":"This is an MMS message with an image.",
"media_url":"https://example.com/image.jpg"
}'
Retours

Returns an object if the request was successful.


{
    "status": "success",
    "data": "mms reports with all details",
}

Si the request fails, an error object will be returned.


{
    "status": "error",
    "message" : "A human-readable description of the error."
}
API WhatsApp

TextioPro API WhatsApp allows you to send WhatsApp messages via a REST API. Each message has a unique ID to verify its status.

Points de terminaison API (Base)

HTTP API: https://app.textiopro.com/api/http/sms/send
Bearer API: https://app.textiopro.com/api/v3/sms/send

Note: WhatsApp messages use the same send endpoint as SMS, Voice, and MMS, but require different parameters.

Envoyer un message WhatsApp

Send your first WhatsApp message with this example request.

Point de terminaison API

POST https://app.textiopro.com/api/http/sms/send
POST https://app.textiopro.com/api/v3/sms/send
Paramètres
Paramètre Obligatoire Type Description
api_token
Oui
string Votre Token API (pour HTTP API). Get API Token
Authorization
Oui
string Bearer VOTRE_BEARER_TOKEN_ICI (pour Bearer API)
recipient
Oui
string Number to send message
sender_id
Oui
string The sender of the message (your WhatsApp Business ID).
type
Oui
string The type of the message. For WhatsApp message you have to insert whatsapp as type.
message
Oui
string The body of the WhatsApp message.
media_url
Non
string Optional: The URL of the media file (image, video, etc.) to include.
schedule_time
Non
datetime The scheduled date and time of the message in RFC3339 format (Y-m-d H:i)
Example request (HTTP API)

curl -X POST https://app.textiopro.com/api/http/sms/send \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"api_token":"VOTRE_TOKEN_API_ICI",
"recipient":"31612345678",
"sender_id":"YOUR_WHATSAPP_ID",
"type":"whatsapp",
"message":"Hello from WhatsApp API!"
}'
Example request (Bearer API)

curl -X POST https://app.textiopro.com/api/v3/sms/send \
-H 'Authorization: Bearer VOTRE_BEARER_TOKEN_ICI' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"recipient":"31612345678",
"sender_id":"YOUR_WHATSAPP_ID",
"type":"whatsapp",
"message":"Hello from WhatsApp API!"
}'
Retours

Returns an object if the request was successful.


{
    "status": "success",
    "data": "whatsapp reports with all details",
}

Si the request fails, an error object will be returned.


{
    "status": "error",
    "message" : "A human-readable description of the error."
}
API Viber

TextioPro API Viber allows you to send Viber messages via a REST API. Each message has a unique ID to verify its status.

Points de terminaison API (Base)

HTTP API: https://app.textiopro.com/api/http/sms/send
Bearer API: https://app.textiopro.com/api/v3/sms/send

Note: Viber messages use the same send endpoint as SMS, Voice, MMS, and WhatsApp, but require different parameters.

Envoyer un message Viber

Send your first Viber message with this example request.

Point de terminaison API

POST https://app.textiopro.com/api/http/sms/send
POST https://app.textiopro.com/api/v3/sms/send
Paramètres
Paramètre Obligatoire Type Description
api_token
Oui
string Votre Token API (pour HTTP API). Get API Token
Authorization
Oui
string Bearer VOTRE_BEARER_TOKEN_ICI (pour Bearer API)
recipient
Oui
string Number to send message
sender_id
Oui
string The sender of the message (your Viber Service ID).
type
Oui
string The type of the message. For Viber message you have to insert viber as type.
message
Oui
string The body of the Viber message.
media_url
Non
string Optional: The URL of the media file (image, video, etc.) to include.
schedule_time
Non
datetime The scheduled date and time of the message in RFC3339 format (Y-m-d H:i)
Example request (HTTP API)

curl -X POST https://app.textiopro.com/api/http/sms/send \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"api_token":"VOTRE_TOKEN_API_ICI",
"recipient":"31612345678",
"sender_id":"YOUR_VIBER_ID",
"type":"viber",
"message":"Hello from Viber API!"
}'
Example request (Bearer API)

curl -X POST https://app.textiopro.com/api/v3/sms/send \
-H 'Authorization: Bearer VOTRE_BEARER_TOKEN_ICI' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"recipient":"31612345678",
"sender_id":"YOUR_VIBER_ID",
"type":"viber",
"message":"Hello from Viber API!"
}'
Retours

Returns an object if the request was successful.


{
    "status": "success",
    "data": "viber reports with all details",
}

Si the request fails, an error object will be returned.


{
    "status": "error",
    "message" : "A human-readable description of the error."
}
API OTP

TextioPro API OTP allows you to send One-Time Password (OTP) messages via a REST API. These are typically used for verification purposes.

Points de terminaison API (Base)

HTTP API: https://app.textiopro.com/api/http/sms/send
Bearer API: https://app.textiopro.com/api/v3/sms/send

Note: OTP messages use the same send endpoint as SMS, Voice, MMS, Viber, and WhatsApp, but require different parameters.

Envoyer un message OTP

Send your first OTP message with this example request.

Point de terminaison API

POST https://app.textiopro.com/api/http/sms/send
POST https://app.textiopro.com/api/v3/sms/send
Paramètres
Paramètre Obligatoire Type Description
api_token
Oui
string Votre Token API (pour HTTP API). Get API Token
Authorization
Oui
string Bearer VOTRE_BEARER_TOKEN_ICI (pour Bearer API)
recipient
Oui
string Number to send message
sender_id
Oui
string The sender of the message. This can be a telephone number (including country code) or an alphanumeric string. In case of an alphanumeric string, the maximum length is 11 characters.
type
Oui
string The type of the message. For OTP message you have to insert otp as type.
message
Oui
string The body of the OTP message (usually containing the code).
schedule_time
Non
datetime The scheduled date and time of the message in RFC3339 format (Y-m-d H:i)
Example request (HTTP API)

curl -X POST https://app.textiopro.com/api/http/sms/send \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"api_token":"VOTRE_TOKEN_API_ICI",
"recipient":"31612345678",
"sender_id":"YourName",
"type":"otp",
"message":"Your verification code is 123456"
}'
Example request (Bearer API)

curl -X POST https://app.textiopro.com/api/v3/sms/send \
-H 'Authorization: Bearer VOTRE_BEARER_TOKEN_ICI' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"recipient":"31612345678",
"sender_id":"YourName",
"type":"otp",
"message":"Your verification code is 123456"
}'
Retours

Returns an object if the request was successful.


{
    "status": "success",
    "data": "otp reports with all details",
}

Si the request fails, an error object will be returned.


{
    "status": "error",
    "message" : "A human-readable description of the error."
}
API Profil

TextioPro API Profil allows you to retrieve information about your account, such as your SMS balance and user profile details.

Points de terminaison API (Base)

HTTP API: https://app.textiopro.com/api/http/
Bearer API: https://app.textiopro.com/api/v3/

Voir solde SMS

Retrieve your current SMS balance.

Point de terminaison API

POST https://app.textiopro.com/api/http/balance
GET https://app.textiopro.com/api/v3/balance
Paramètres
Paramètre Obligatoire Type Description
api_token
Oui
string Votre Token API (pour HTTP API). Get API Token
Authorization
Oui
string Bearer VOTRE_BEARER_TOKEN_ICI (pour Bearer API)
Example request (HTTP API)

curl -X POST https://app.textiopro.com/api/http/balance \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{"api_token":"VOTRE_TOKEN_API_ICI"}'
Example request (Bearer API)

curl -X GET https://app.textiopro.com/api/v3/balance \
-H 'Authorization: Bearer VOTRE_BEARER_TOKEN_ICI' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
Retours

Returns an object containing your SMS balance if the request was successful.


{
    "status": "success",
    "data": {
        "balance": 100, // Example balance
        "unit": "sms"
    }
}

Si the request fails, an error object will be returned.


{
    "status": "error",
    "message" : "A human-readable description of the error."
}

Voir profil utilisateur

Retrieve details about your user profile.

Point de terminaison API

POST https://app.textiopro.com/api/http/me
GET https://app.textiopro.com/api/v3/me
Paramètres
Paramètre Obligatoire Type Description
api_token
Oui
string Votre Token API (pour HTTP API). Get API Token
Authorization
Oui
string Bearer VOTRE_BEARER_TOKEN_ICI (pour Bearer API)
Example request (HTTP API)

curl -X POST https://app.textiopro.com/api/http/me \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{"api_token":"VOTRE_TOKEN_API_ICI"}'
Example request (Bearer API)

curl -X GET https://app.textiopro.com/api/v3/me \
-H 'Authorization: Bearer VOTRE_BEARER_TOKEN_ICI' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
Retours

Returns an object containing your user profile details if the request was successful.


{
    "status": "success",
    "data": {
        "id": 1,
        "uid": "some-uid",
        "first_name": "John",
        "last_name": "Doe",
        "email": "john.doe@example.com",
        // ... other profile details
    }
}

Si the request fails, an error object will be returned.


{
    "status": "error",
    "message" : "A human-readable description of the error."
}
Codes d'Erreur

When an API request fails, TextioPro returns an error object with a human-readable message and a status indicating failure.

Structure de l'objet d'erreur


{
  "status": "error",
  "message" : "Description lisible de l'erreur."
}

Exemples d'erreurs courantes

  • Authentification échouée: Souvent dû à un token API manquant ou invalide.
  • Paramètres manquants ou invalides: Un paramètre requis n'est pas fourni, ou un paramètre a un format incorrect.
  • Ressource non trouvée: L'ID du contact, du groupe, ou de la campagne spécifié n'existe pas.
  • Quota dépassé: Vous avez atteint la limite d'envoi pour votre plan.
  • Numéro invalide: Le numéro de téléphone du destinataire est mal formaté ou invalide.
  • Erreur interne du serveur: Un problème est survenu sur notre serveur (rare).

En cas d'erreur, lisez attentivement le message retourné pour comprendre la cause et corriger votre requête.