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 | object | Objet contenant les URLs de callbacks. |
callback_url_for_deliveries | string | URL to which you will receive your messages DR. |
callback_url_for_blacklisted_numbers | string | URL to which you will receive your STOP requests. |
callback_url_for_visits | string | URL to which you will receive your landing pages visits. |
callback_url_for_inbounds | string | URL to which you will receive your incoming messages. |
email_for_inbounds | string | Email 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" }