Skip to content
Home » Octopush Gateway SMS API » API Sub-Accounts » Create a Subaccount

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.
callbacksobjectObjet contenant les URLs de callbacks.
callback_url_for_deliveriesstringURL to which you will receive your messages DR.
callback_url_for_blacklisted_numbersstringURL to which you will receive your STOP requests.
callback_url_for_visitsstringURL to which you will receive your landing pages visits.
callback_url_for_inboundsstringURL to which you will receive your incoming messages.
email_for_inboundsstringEmail address to which you will receive your incoming messages.

Curl Example

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_deliveries": "https://dns.com/call-back-url-2",
    "callback_url_for_visits": "https://dns.com/call-back-url-3",
    "callback_url_for_blacklisted_numbers": "https://dns.com/call-back-url-4",
    "email_for_inbounds": "[email protected]"
  }
}'

Command to copy/paste

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_deliveries": "https://dns.com/call-back-url-2", "callback_url_for_visits": "https://dns.com/call-back-url-3", "callback_url_for_blacklisted_numbers": "https://dns.com/call-back-url-4", "email_for_inbounds": "[email protected]" }}'

JSON Server Response

Success : Server status  = 201 CREATED

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