Accueil » API SMS Octopush » API Sous-comptes » Créer un sous-compte

Créer un sous-compte

POST
https://api.octopush.com/v1/public/subaccount/create

Encodage : UTF-8

Authentification

Vos identifiants « api-key » et « api-login » doivent être ajoutés dans les headers.

Définition

Service de création d’un sous-compte. La limite par défaut est de 20 sous-comptes par utilisateur.

Paramètres particuliers

NomTypeDescription
first_namestringPrénom à associer au sous-compte
last_namestringNom à associer au sous-compte
passwordstringMot de passe du sous-compte.
company_namestring(optionel) Nom de l’entreprise.
callbacksstring[] (optionel) URLs de callbacks. 4 URLs + 1 email pour les inbounds.
{
    "callback_url_for_inbounds": "https://dns.com/url-1",
    "callback_url_for_sms_deliveries": "https://dns.com/url-2",
    "callback_url_for_vocal_sms_deliveries": "https://dns.com/url-3",
    "callback_url_for_blacklisted_numbers": "https://dns.com/url-4",
    "email_for_inbounds": "[email protected]"
}

Exemple Curl

curl -X POST \ 
'https://api.octopush.com/v1/public/subaccount/create' \ 
-H 'Content-Type: application/json' \ 
-H 'api-login: ******@email.org' \ 
-H 'api-key: ************' \ 
-H 'cache-control: no-cache' \ 
-d '{
  "first_name":"Leonardo",
  "last_name": "Da Vinci",
  "company_name": "Italy",
  "password": "**********",
  "callbacks": {
    "callback_url_for_inbounds": "https://dns.com/call-back-url-1",
    "callback_url_for_sms_deliveries": "https://dns.com/call-back-url-2",
    "callback_url_for_vocal_sms_deliveries": "https://dns.com/call-back-url-3",
    "callback_url_for_blacklisted_numbers": "https://dns.com/call-back-url-4",
    "email_for_inbounds": "[email protected]"
  }
}'

Code à copier-coller

curl -X POST 'https://api.octopush.com/v1/public/subaccount/create' -H 'Content-Type: application/json' -H 'api-login: ******@email.org' -H 'api-key: ************' -H 'cache-control: no-cache' -d '{"first_name":"Leonardo",  "last_name": "Da Vinci", "company_name": "Italy", "password": "**********", "callbacks": {"callback_url_for_inbounds": "https://dns.com/call-back-url-1", "callback_url_for_sms_deliveries": "https://dns.com/call-back-url-2", "callback_url_for_vocal_sms_deliveries": "https://dns.com/call-back-url-3", "callback_url_for_blacklisted_numbers": "https://dns.com/call-back-url-4", "email_for_inbounds": "[email protected]"}}'

Retour Server en json

Succès : 201 CREATED

{
  "api_key": "***********************",
  "api_login": "*******************@sub-accounts.com"
}