POST
https://api.octopush.com/v1/public/subaccount/createEncodage : 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
Name | Type | Description |
---|---|---|
first_name | string | First name to be associated with the sub-account. |
last_name | string | Last name to be associated with the sub-account |
password | string | Sub-account password |
company_name | string | (optional) Company name. |
callbacks | string[] | (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": "[email protected]" } |
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_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]" } }'
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_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]" }}'
JSON Server Response
Success : Server status = 201 CREATED
{ "api_key": "***********************", "api_login": "*******************@sub-accounts.com" }