Everything about Subaccounts.
Get all subaccounts
Parameter | In | Type | Required | Description |
---|---|---|---|---|
page | query | integer(int32) | false | Page number |
limit | query | integer(int32) | false | Number of records per page |
Refer to Status Codes for definitions of HTTP status code responses.
Successful response
curl --include \ --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA==" \ 'https://rest.clicksend.com/v3/subaccounts'
{- "http_code": 200,
- "response_code": "SUCCESS",
- "response_msg": "SUCCESS",
- "data": [
- {
- "subaccount_id": 126,
- "api_username": "johndoe1",
- "email": "johndoe1@awesome.com",
- "phone_number": "+15184811001",
- "first_name": "John",
- "last_name": "Doe",
- "api_key": "F3702045-EB2C-0091-C211-7728048DCAE2",
- "access_users": 1,
- "access_billing": 1,
- "access_reporting": 1,
- "access_contacts": 1,
- "access_settings": 1,
- "access_sms": 1,
- "access_email": 1,
- "access_voice": 1,
- "access_fax": 1,
- "access_post": 1,
- "access_reseller": 1,
- "access_mms": 1,
- "share_campaigns": 0,
- "notes": null
}
]
}
Create new subaccount
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
api_username | string | true | none | Your new api username. |
password | string | true | none | Your new password |
string | true | none | Your new email. | |
phone_number | string | true | none | Your phone number in E.164 format. |
first_name | string | true | none | Your firstname |
last_name | string | true | none | Your lastname |
access_users | integer(int1) | false | none | Flag value must be 1 for yes or 0 for no. |
access_billing | integer(int1) | false | none | Flag value must be 1 for yes or 0 for no. |
access_reporting | integer(int1) | false | none | Flag value must be 1 for yes or 0 for no. |
access_contacts | integer(int1) | false | none | Flag value must be 1 for yes or 0 for no. |
access_settings | integer(int1) | false | none | Flag value must be 1 for yes or 0 for no. |
Refer to Status Codes for definitions of HTTP status code responses.
Successful response
{- "api_username": "test",
- "password": "test123",
- "email": "test@test.com",
- "phone_number": "+61411111111",
- "first_name": "John",
- "last_name": "Doe",
- "user_id": 3839,
- "sms_deidentify_message": 0,
- "access_smpp": 0,
- "access_users": 1,
- "access_billing": 1,
- "access_reporting": 1,
- "access_contacts": 1,
- "access_settings": 1,
- "notes": "these are test notes"
}
{- "http_code": 200,
- "response_code": "SUCCESS",
- "response_msg": "New account has been created.",
- "data": {
- "subaccount_id": 126,
- "api_username": "johndoe1",
- "email": "johndoe1@awesome.com",
- "phone_number": "+15184811001",
- "first_name": "John",
- "last_name": "Doe",
- "api_key": "F3702045-EB2C-0091-C211-7728048DCAE2",
- "access_users": 1,
- "access_billing": 1,
- "access_reporting": 1,
- "access_contacts": 1,
- "access_settings": 1,
- "access_sms": 1,
- "access_email": 1,
- "access_voice": 1,
- "access_fax": 1,
- "access_post": 1,
- "access_reseller": 1,
- "access_mms": 1,
- "share_campaigns": 0,
- "notes": null
}
}
Get specific subaccount
Parameter | In | Type | Required | Description |
---|---|---|---|---|
subaccount_id | path | integer(int32) | true | ID of subaccount to get |
Refer to Status Codes for definitions of HTTP status code responses.
Successful response
curl --include \ --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA==" \ 'https://rest.clicksend.com/v3/subaccounts/{subaccount_id}'
{- "http_code": 200,
- "response_code": "SUCCESS",
- "response_msg": "Here are your data.",
- "data": {
- "subaccount_id": 126,
- "api_username": "johndoe1",
- "email": "johndoe1@awesome.com",
- "phone_number": "+15184811001",
- "first_name": "John",
- "last_name": "Doe",
- "api_key": "F3702045-EB2C-0091-C211-7728048DCAE2",
- "access_users": 1,
- "access_billing": 1,
- "access_reporting": 1,
- "access_contacts": 1,
- "access_settings": 1,
- "access_sms": 1,
- "access_email": 1,
- "access_voice": 1,
- "access_fax": 1,
- "access_post": 1,
- "access_reseller": 1,
- "access_mms": 1,
- "share_campaigns": 0,
- "notes": null
}
}
Update subaccount
Parameter | In | Type | Required | Description |
---|---|---|---|---|
subaccount_id | path | integer(int32) | true | ID of subaccount to update |
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
api_username | string | true | none | Your new api username. |
password | string | true | none | Your new password |
string | true | none | Your new email. | |
phone_number | string | true | none | Your phone number in E.164 format. |
first_name | string | true | none | Your firstname |
last_name | string | true | none | Your lastname |
access_users | integer(int1) | false | none | Flag value must be 1 for yes or 0 for no. |
access_billing | integer(int1) | false | none | Flag value must be 1 for yes or 0 for no. |
access_reporting | integer(int1) | false | none | Flag value must be 1 for yes or 0 for no. |
access_contacts | integer(int1) | false | none | Flag value must be 1 for yes or 0 for no. |
access_settings | integer(int1) | false | none | Flag value must be 1 for yes or 0 for no. |
Refer to Status Codes for definitions of HTTP status code responses.
Successful response
{- "access_sms": 1,
- "email": "{{email}}"
}
{- "http_code": 200,
- "response_code": "SUCCESS",
- "response_msg": "Subaccount #59 has been updated.",
- "data": {
- "subaccount_id": 59,
- "api_username": "nameP99",
- "email": "testfP0.updated@gmail.com",
- "phone_number": "+619417513065",
- "first_name": "FirstnameKvdRZ Updated",
- "last_name": "LastnameHUPYG Updated",
- "api_key": "367C506E-FBCA-1EDA-E8E0-1384F9F196D5",
- "access_users": 1,
- "access_billing": 1,
- "access_reporting": 1,
- "access_contacts": 1,
- "access_settings": 1,
- "access_sms": 1,
- "access_email": 1,
- "access_voice": 1,
- "access_fax": 1,
- "access_post": 1,
- "access_reseller": 1,
- "access_mms": 1,
- "share_campaigns": 0,
- "notes": null
}
}
Delete a subaccount
Parameter | In | Type | Required | Description |
---|---|---|---|---|
subaccount_id | path | integer(int32) | true | ID of subaccount to delete |
Refer to Status Codes for definitions of HTTP status code responses.
Successful response
curl --include \ --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA==" \ --request DELETE \ 'https://rest.clicksend.com/v3/subaccounts/{subaccount_id}'
{- "http_code": 200,
- "response_code": "SUCCESS",
- "response_msg": "Subaccount #59 has been deleted",
- "data": true
}
Regenerate an API Key
Parameter | In | Type | Required | Description |
---|---|---|---|---|
subaccount_id | path | integer(int32) | true | ID of subaccount to regenerate API key for |
Refer to Status Codes for definitions of HTTP status code responses.
Successful response
{- "access_sms": 1,
- "email": "{{email}}",
- "notes": "This is a test"
}
{- "http_code": 200,
- "response_code": "SUCCESS",
- "response_msg": "Your API Key has been regenerated.",
- "data": {
- "api_key": "E72D09F6-AC80-0A5C-F7F0-1A244A377A5C"
}
}