Create a Subaccount

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

Encodage : UTF-8

Authentification

Your “api-key” and “api-login” identifiers must be added in the headers.

Definition

Sub-account creation service. The default limit is 20 sub-accounts per user.

Special parameters

NameTypeDescription
first_namestringFirst name to be associated with the sub-account.
last_namestringLast name to be associated with the sub-account
passwordstringSub-account password
company_namestring(optional) Company name.
callbacksstring[] (optional) URLs for callbacks. 4 URLs + 1 email for 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": "some_user@email.org"
}

Curl Example

curl -X POST \ 
'https://api.octopush.com/v1/public/subaccount/create' \ 
-H 'Content-Type: application/json' \ 
-H 'api-key: ************' \ 
-H 'api-login: ******@email.org' \ 
-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": "some_user@email.org"
  }
}'

JSON Server Response

Success : Server status  = 201 CREATED

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