FORMAT: 1A
HOST: https://rest.clicksend.com/v3/
# ClickSend REST API v3

This is the official API documentation for ClickSend.com

Below you will find a current list of the available methods for clicksend.

**NOTE**: You will need to create a free account to use the API.

You can
[**Register Here**](https://dashboard.clicksend.com/#/signup/step1/).

# API URL
The API should always be accessed over SSL.

Base URL: `https://rest.clicksend.com/v3/`



# Authentication

Basic HTTP authentication should be used in the header.

**Either:**

`username`: Your API username

`password`: Your API key

```
You can get your API credentials by clicking 'API Credentials' on the top right of the dashboard.
```

**OR**

`username`: Your account username

`password`: Your account password

```
These are the same credentials that you use to login to the dashboard.
```
### Authorization Header
The Authorization header is constructed as follows:
1. Username and password are combined into a string `username:password`
1. The resulting string is then encoded using Base64 encoding
1. The authorization method and a space i.e. "Basic " is then put before the encoded string.

For example, if the user uses `Aladdin` as the username and `open sesame` as the password then the header is formed as follows:

`Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==`

### PHP Authentication Header Example (using cURL)

`curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Basic ' . base64_encode("$username:$password")]);`

# Verbs
The API uses restful verbs.

| Verb | Description |
|---|---|
| `GET` | Select one or more items. Success returns `200` status code. |
| `POST` | Create a new item. Success returns `200` status code. |
| `PUT` | Update an item. Success returns `200` status code. |
| `DELETE` | Delete an item. Success returns `200` status code. |

# Status Codes
The API will respond with one of the following HTTP status codes.

| Code | Response | Description |
|---|---|---|
| `200` | `SUCCESS` | Request completed successfully. |
| `400` | `BAD_REQUEST` | The request was invalid or cannot be otherwise served. An accompanying error message will explain further. |
| `401` | `UNAUTHORIZED` | Authentication credentials were missing or incorrect. |
| `403` | `FORBIDDEN` | The request is understood, but it has been refused or access is not allowed. An accompanying error message will explain why. |
| `404` | `NOT_FOUND` | The URI requested is invalid or the resource requested does not exists. |
| `405` | `NOT_FOUND` | Method doesn't exist or is not allowed. |
| `429` | `TOO_MANY_REQUESTS` | Rate Limit Exceeded. Returned when a request cannot be served due to the application’s rate limit having been exhausted for the resource. See Rate Limiting. |
| `500` | `INTERNAL_SERVER_ERROR` | Something is broken |

# Application Status Codes
The following status codes can be returned in addition to the HTTP status code. For example, when using the Send SMS endpoint:

| Response | Description |
|---|---|
| `SUCCESS` | Message added to queue OK. Use delivery reports to get an update on the delivery status.|
| `MISSING_CREDENTIALS` | Not enough information has been supplied for authentication. Please ensure that your Username and Unique Key are supplied in your request.|
| `ACCOUNT_NOT_ACTIVATED` | Your account has not been activated.|
| `INVALID_RECIPIENT` | The destination mobile number is invalid.|
| `THROTTLED` | Identical message body recently sent to the same recipient. Please try again in a few seconds.|
| `INVALID_SENDER_ID` | Invalid Sender ID. Please ensure Sender ID is no longer than 11 characters (if alphanumeric), and contains no spaces.|
| `INSUFFICIENT_CREDIT` | You have reached the end of your message credits. You will need to purchase more message credits.|
| `INVALID_CREDENTIALS` | Your Username or Unique Key is incorrect.|
| `ALREADY_EXISTS` | The resource you're trying to add already exists.|
| `EMPTY_MESSAGE` | Message is empty.|
| `TOO_MANY_RECIPIENTS` | Too many recipients.|
| `MISSING_REQUIRED_FIELDS` | Some required fields are missing.|
| `INVALID_SCHEDULE` | The schedule specified is invalid. Use a unix timestamp e.g. 1429170372.|
| `NOT_ENOUGH_PERMISSION_TO_LIST_ID` | Don't have enough privilege to access or send to a list_id.|
| `INTERNAL_ERROR` | Internal error.|
| `INVALID_LANG` | An invalid language option has been provided.|
| `INVALID_VOICE` | An invalid voice (gender) option has been provided.|
| `SUBJECT_REQUIRED` | Usually happens when MMS Subject is empty.|
| `INVALID_MEDIA_FILE` | Usually MMS media file is invalid file.|
| `SOMETHING_IS_WRONG` | Generic Error happened.|

# Required Headers
You'll need to send some headers when making API calls.

| Header | Value |
|---|---|
| `Content-type` | `application/json` |

# Pagination
    Some methods are paginated. By default, 1 page of 15 items will be returned. You can set the pagination parameters by adding `?page={page}&limit={limit}` to the URL.

## Request

| Parameter | Type | Default | Value |
|---|---|---|---|
| `page` | integer | `1` | The page number to return in the response. |
| `limit` | integer | `15` | The number of results per page. Min 15, Max 100. |

## Response

| Attribute | Type | Value |
|---|---|---|---|
| `total` | integer | Total number of results available. |
| `per_page` | integer | Number of results returned per page. |
| `current_page` | integer | Current page number. |
| `last_page` | integer | Last page number. |
| `next_page_url` | string | A URL of the next page. `null` if not available.|
| `prev_page_url` | string | A URL of the previous page. `null` if not available.|
| `from` | integer | Number of the first result in current page. |
| `to` | integer | Number of the last result in current page. |

# Searching and Sorting

Most GET endpoints allow searching and sorting. Searches are **not** case-sensitive.

## Search

To perform a search, add `q` as a query parameter. For example:

`/subaccounts?q=field:value,field2:value`

## Order

To perform a sort, add `order_by` as a query parameter. For example:

`/subaccounts?order_by=field:desc/asc`

## AND / OR

By default, it will search using the `AND` operator. This can be set using `operator` as a query parameter. For example:

`/subaccounts?q=field:value&operator=OR`

**Options:**
- `AN` - returns results matching **all** query fields specified
- `OR` - returns results matching **any** query fields specified

## Example

`/subaccounts?q=first_name:john,last_name:smith&order_by=subaccount_id:asc&operator=AND`

# CORS
When creating your API app, specify the JavaScript (CORS) origins you'll be using. We use these origins to return the headers needed for CORS.

# Date and Time
All date/timestamps will be returned in Unix time (also known as POSIX time or erroneously as Epoch time) with no leap seconds.

For example: `1435255816`
```
(ISO 8601: 2015-06-25T18:10:16Z)
```
More information: [Wikipedia: Unix time](https://en.wikipedia.org/wiki/Unix_time).

There is ony one Unix time and it is created by using the UTC/GMT time zone. This means you might have convert time zones to calculate timestamps. Most programming language have libraries to help you converting time zones.

**The current Unix time can be found here:** [Epoch Converter](http://www.epochconverter.com)

# Testing

## Test Credentials

These API credentials can be used to test specific scenarios.

**Note:** you will need to create a free account to test other scenarios. Refer to introduction.

| API Username | API Key | Description |
|---|---|---|---|
| `nocredit` | `D83DED51-9E35-4D42-9BB9-0E34B7CA85AE` | This account has no credit. |
| `notactive` | `D83DED51-9E35-4D42-9BB9-0E34B7CA85AE` | This account is not active. |
| `banned` | `D83DED51-9E35-4D42-9BB9-0E34B7CA85AE` | This account is banned. |

## Test SMS/MMS Numbers

The following numbers can be used when testing. No messages will be sent, and your account won't be charged. A success response will be returned.

- `+61411111111`
- `+61422222222`
- `+61433333333`
- `+61444444444`
- `+14055555555`
- `+14055555666`
- `+447777777777`
- `+8615555555555`

## Test Voice Numbers

The following numbers can be used when testing. No messages will be sent, and your account won't be charged. A success response will be returned.

- `+61411111111`
- `+61422222222`
- `+61433333333`
- `+61444444444`
- `+14055555555`
- `+14055555666`
- `+447777777777`
- `+8615555555555`

## Test Fax Numbers

The following numbers can be used when testing. No messages will be sent, and your account won't be charged. A success response will be returned.

- `+61261111111`
- `+61262222222`
- `+61263333333`

## Test Email Addresses

The following email addresses can be used when testing. No messages will be sent, and your account won't be charged. A success response will be returned.

- `test1@test.com`
- `test2@test.com`
- `test3@test.com`

## Test Post Letter Addresses

The following Postal Codes (address_postal_code) can be used when testing. No messages will be sent when using these post codes, and your account won't be charged. A success response will be returned.

- `11111`
- `22222`
- `33333`

# Group Account

## Account Collection [/account]

### Get account [GET]

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Here's your account",
            "data":{
                "user_id":3819,
                "username":"ULXHP",
                "user_email":"PNUMB@VAPXX.com",
                "active":1,
                "banned":0,
                "balance":"1117.461060",
                "user_phone":"+61433333888",
                "user_first_name":"fffff",
                "user_last_name":"llll",
                "account":0,
                "account_name":"FTHCQ~!@#$ %^&*()XQMPO",
                "account_billing_email":"XDVXC@SJRJU.com",
                "account_billing_mobile":"+61433333888",
                "country":"AU",
                "default_country_sms":"AU",
                "auto_recharge":0,
                "auto_recharge_amount":"20.00",
                "low_credit_amount":"0.00",
                "setting_unicode_sms":0,
                "setting_email_sms_subject":0,
                "setting_fix_sender_id":0,
                "setting_sms_message_char_limit":8,
                "old_dashboard":0,
                "balance_commission":"2.330130",
                "timezone":"Australia/Melbourne",
                "private_uploads":0,
                "fax_quality":0,
                "setting_sms_hide_your_number":0,
                "setting_sms_hide_business_name":1,
                "_currency":{
                    "currency_name_short":"AUD",
                    "currency_prefix_d":"$",
                    "currency_prefix_c":"c",
                    "currency_name_long":"Australian Dollars"
                },
                "_subaccount":{
                    "subaccount_id":1716,
                    "api_username":"KCIHOYEYGM",
                    "email":"ICMGR@VBSPT.com",
                    "phone_number":"+61433333333",
                    "first_name":"Firstname40710",
                    "last_name":"Lastname3672",
                    "api_key":"IJVEGTCF-VOHU-GSVF-KNKK-XHTARJXMQTXK",
                    "access_users":1,
                    "access_billing":1,
                    "access_reporting":1,
                    "access_contacts":0,
                    "access_settings":1,
                    "access_sms":0,
                    "access_email":0,
                    "access_voice":0,
                    "access_fax":0,
                    "access_post":0,
                    "access_reseller":0,
                    "access_mms":1,
                    "share_campaigns":1,
                    "notes":null
                }
            }
        }

### Create a new account [POST]
**Note:** *Authentication isn't required to create a new account.*

+ Request (application/json)

    + Attributes (object)
        + username: johndoe1 (string, required) - Your username.
        + password: pass (string, required) - Your password.
        + `user_email`: johndoe1@awesome.com (string, required) - Your email.
        + `user_phone`: "+15184811001" (string, required) - Your phone number in E.164 format.
        + `user_first_name`: John (string, required) - Your first name.
        + `user_last_name`: Doe (string, required) - Your last name.
        + `account_name`: The Awesome Company (string, required) - Your delivery to value.
        + country: US (string, required) - Your country.

    + Body

                {
                    "username":"johndoe1",
                    "user_email":"johndoe1@awesome.com",
                    "user_phone":"518-481-1001",
                    "user_first_name":"John",
                    "user_last_name":"Doe",
                    "country":"US",
                    "password":"pass",
                    "account_name":"The Awesome Company"
                }

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Successfully created an account.",
            "data":{
                "user_id":116,
                "username":"johndoe1",
                "user_email":"johndoe1@awesome.com",
                "active":0,
                "banned":0,
                "balance":"4.998000",
                "user_phone":"+15184811001",
                "reply_to":"originalemail",
                "delivery_to":null,
                "user_first_name":"John",
                "user_last_name":"Doe",
                "account":0,
                "account_name":"The Awesome Company",
                "account_billing_email":"johndoe1@awesome.com",
                "account_billing_mobile":"+15184811001",
                "country":"US",
                "default_country_sms":"US",
                "auto_recharge":0,
                "auto_recharge_amount":"20.00",
                "low_credit_amount":"0.00",
                "setting_unicode_sms":0,
                "setting_email_sms_subject":0,
                "setting_fix_sender_id":0,
                "setting_sms_message_char_limit":6,
                "old_dashboard":0,
                "balance_commission": "0.299954",
                "timezone": "Australia/Melbourne",
                "_currency":{
                    "currency_name_short":"USD",
                    "currency_prefix_d":"$",
                    "currency_prefix_c":"¢",
                    "currency_name_long":"US Dollars"
                },
                "_subaccount":{
                    "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 Account [PUT]

+ Request (application/json)

    + Attributes (object)
        + username: johndoe (string, required) - Your username.
        + password: pass (string, required) - Your password.
        + `user_email`: johndoe1@awesome.com (string, required) - Your email.
        + `user_phone`: "+15184811001" (string, required) - Your phone number in E.164 format.
        + `user_first_name`: John (string, required) - Your first name.
        + `user_last_name`: Doe (string, required) - Your last name.
        + `account_name`: The Awesome Company (string, required) - Your delivery to value.
        + country: AU (string, required) - Your country.
        + timezone: `Australia/Melbourne`  (string, required) - Timezone.
        + `private_uploads`: 0 (number) - Set the private uploads flag. 0 or 1 only.
        + `setting_sms_hide_your_number`: 0 (number) - Set the private uploads flag. 0 or 1 only.
        + `setting_sms_hide_business_name`: 0 (number) - Set the private uploads flag. 0 or 1 only.

    + Body

                {
                    "username":"johndoe",
                    "user_email":"johndoe@awesome.com",
                    "user_phone":"518-481-1002",
                    "user_first_name":"John",
                    "user_last_name":"Doe",
                    "country":"AU",
                    "password":"pass",
                    "account_name":"The Awesome Company",
                    "timezone": "Australia/Melbourne",
                    "private_uploads": 1,
                    "setting_sms_hide_your_number": 0,
                    "setting_sms_hide_business_name": 1
                }

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Your account has been updated.",
            "data":{
                "user_id":1,
                "username":"johndoe",
                "user_email":"johndoe@awesome.com",
                "active":1,
                "banned":0,
                "balance":"0.592200",
                "user_phone":"518-481-1003",
                "reply_to":"11@test.com",
                "delivery_to":"1@test.com",
                "user_first_name":"John",
                "user_last_name":"Doe",
                "account":0,
                "account_name":"The Awesome Company",
                "account_billing_email":"1@test.com",
                "account_billing_mobile":"+19171234591",
                "country":"AU",
                "default_country_sms":"AU",
                "auto_recharge":1,
                "auto_recharge_amount":"20.00",
                "low_credit_amount":"200.00",
                "setting_unicode_sms":0,
                "setting_email_sms_subject":0,
                "setting_fix_sender_id":1,
                "setting_sms_message_char_limit":8,
                "old_dashboard":1,
                "balance_commission":"0.299954",
                "timezone":"Australia/Melbourne",
                "private_uploads":0,
                "fax_quality":0,
                "setting_sms_hide_your_number":0,
                "setting_sms_hide_business_name":1,
                "_currency":{
                    "currency_name_short":"AUD",
                    "currency_prefix_d":"$",
                    "currency_prefix_c":"c",
                    "currency_name_long":"Australian Dollars"
                },
                "_subaccount":null
            }
        }

### Account Usage [GET /account/usage/{year}/{month}/{type}]

+ Parameters
    + year: 2016 (required, number) - Your account usage year.
    + month: 4 (required, number) - Your account usage month.
    + type: subaccount (required, string) - The account type. Value can only be either email or subaccount.

+ Response 200 (application/json)

        {
            "http_code": 200,
            "response_code": "SUCCESS",
            "response_msg": "Here is your usage for this month.",
            "data": {
                "sms": [
                    {
                        "subaccount_id": 1039,
                        "username": "gerald",
                        "total_count": "29.00",
                        "total_price": "2.1337"
                    },
                    {
                        "subaccount_id": 1047,
                        "username": "user5",
                        "total_count": "4.00",
                        "total_price": "0.3080"
                    }
                ],
                "voice": [
                    {
                        "subaccount_id": 1039,
                        "username": "user1",
                        "total_count": "6.00",
                        "total_price": "0.1980"
                    },
                    {
                        "subaccount_id": 1047,
                        "username": "user5",
                        "total_count": "1.00",
                        "total_price": "0.0330"
                    }
                ],
                "fax": [
                    {
                        "subaccount_id": 1039,
                        "username": "user1",
                        "total_count": "3.00",
                        "total_price": "0.6943"
                    },
                    {
                        "subaccount_id": 1047,
                        "username": "user5",
                        "total_count": "1.00",
                        "total_price": "0.2314"
                    }
                ],
                "post": [
                    {
                        "subaccount_id": 1039,
                        "username": "user1",
                        "total_count": "10",
                        "total_price": "8.5624"
                    },
                    {
                        "subaccount_id": 1047,
                        "username": "user5",
                        "total_count": "3",
                        "total_price": "2.5586"
                    }
                ],
                "email": [
                    {
                        "subaccount_id": 1039,
                        "username": "user1",
                        "total_count": 3992,
                        "total_price": "9.0020"
                    },
                    {
                        "subaccount_id": 1047,
                        "username": "user5",
                        "total_count": 998,
                        "total_price": "0.0000"
                    }
                ],
                "sms_total": {
                    "count": 33,
                    "price": "2.4417"
                },
                "voice_total": {
                    "count": 7,
                    "price": "0.2310"
                },
                "fax_total": {
                    "count": 4,
                    "price": "0.9257"
                },
                "post_total": {
                    "count": 13,
                    "price": "11.1210"
                },
                "email_total": {
                    "count": 4990,
                    "price": "9.0020"
                }
            }
        }

## Account Activation [/account-verify]

### Send account activation token [PUT /account-verify/send]

+ Request (application/json)

    + Headers

            Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA==

    + Body

                {
                    "user_phone":"352-394-4199",
                    "type":"sms",
                    "country": "US"
                }

+ Response 200 (application/json)

        {
            "http_code": 200,
            "response_code": "SUCCESS",
            "response_msg": "Verification sent.",
            "data": {
                "user_phone": "+13523944199",
                "type": "sms",
                "country": "US",
                "activation_token": "547850"
            }
        }

### Verify new account [PUT /account-verify/verify/{activation_token}]

+ Parameters
    + `activation_token`: 1827364 (required, string) - The ActivationToken to be used to verify an account.

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"You're account has been verified.",
            "data":{
                "user_id":1,
                "username":"1",
                "user_email":"1@test.com",
                "active":1,
                "banned":0,
                "balance":"4.041500",
                "user_phone":"+13523944199",
                "reply_to":"1@test.com",
                "delivery_to":null,
                "user_first_name":"John",
                "user_last_name":"Doe",
                "account":1,
                "account_name":null,
                "account_billing_email":"1@test.com",
                "account_billing_mobile":null,
                "country":"US",
                "default_country_sms":"US",
                "unsubscribe_mail":0,
                "auto_recharge":0,
                "auto_recharge_amount":"20.00",
                "low_credit_amount":"1.50",
                "setting_unicode_sms":0,
                "setting_beta":0,
                "setting_email_sms_subject":0,
                "setting_fix_sender_id":1,
                "_currency":{
                    "currency_name_short":"USD",
                    "currency_prefix_d":"$",
                    "currency_prefix_c":"¢",
                    "currency_name_long":"US Dollars"
                },
                "_subaccount":{
                    "subaccount_id":1,
                    "api_username":"1",
                    "email":"1@test.com",
                    "mobile":"+639171234501",
                    "first_name":"John",
                    "last_name":"Doe",
                    "api_key":"FD3259F9D0A35548682ACEA84A6FF26A",
                    "user_id":1,
                    "sms_deidentify_message":0,
                    "access_smpp":0,
                    "access_users":1,
                    "access_billing":1,
                    "access_reporting":1,
                    "access_contacts":0,
                    "access_settings":1
                }
            }
        }

# Group Account Recharge

## Credit Card Info [/recharge/credit-card]

### Get Credit Card info [GET]

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Customer payment info.",
            "data":{
                "display_number":"XXXX-XXXX-XXXX-0000",
                "expiry_month":5,
                "expiry_year":2016,
                "name":"Roland Robot"
            }
        }

### Update Credit Card info [PUT]

+ Request (application/json)

    + Attributes
        + number: 5520000000000000 (number, optional) - Your credit card no.
        + `expiry_month`: 05 (number, required) - Your credit card expiry month.
        + `expiry_year`: 2016 (number, optional) - Your credit card expiry year.
        + cvc: 123 (number, required) - Your CVC digits.
        + name: Roland Robot (string, required) - Your name.
        + `bank_name`: Robotic Banking (string, required) - Your bank's name that issued the credit card.

    + Body

                {
                    "number":"5520000000000000",
                    "expiry_month":"05",
                    "expiry_year":"2016",
                    "cvc":"123",
                    "name":"Roland Robot",
                    "bank_name": "Robotic Banking"
                }

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Your payment info has been updated.",
            "data":{
                "token":"cus_6Z3mHM9QvQQoJ28WsIWuLA"
            }
        }

### List of Packages [GET /recharge/packages?country={country}]

+ Parameters
    + country: "AU" (string, optional) - Your country.

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"List of Packages.",
            "data":{
                "packages":[
                    {
                        "package_id":1,
                        "package_price":"20.00",
                        "sms_price":0.099,
                        "sms_quantity":202,
                        "voice_mobile_price":0.099,
                        "voice_mobile_quantity":202,
                        "voice_landline_price":0.0583,
                        "voice_landline_quantity":343,
                        "fax_price":0.198,
                        "fax_quantity":101,
                        "email_price":0.033,
                        "email_quantity":606,
                        "post_letter_black_price":1.397,
                        "post_letter_colour_price":1.617,
                        "post_page_black_price":0.11,
                        "post_page_colour_price":0.264,
                        "post_letter_black_quantity":13,
                        "post_letter_colour_quantity":10,
                        "post_direct_mail_dl_price":0.44,
                        "post_direct_mail_a5_price":0.66,
                        "post_direct_mail_min_quantity":5000,
                        "postcard_price":11,
                        "postcard_quantity":1
                    },
                    {
                        "package_id":2,
                        "package_price":"50.00",
                        "sms_price":0.099,
                        "sms_quantity":505,
                        "voice_mobile_price":0.099,
                        "voice_mobile_quantity":505,
                        "voice_landline_price":0.0583,
                        "voice_landline_quantity":857,
                        "fax_price":0.198,
                        "fax_quantity":252,
                        "email_price":0.033,
                        "email_quantity":1515,
                        "post_letter_black_price":1.397,
                        "post_letter_colour_price":1.617,
                        "post_page_black_price":0.11,
                        "post_page_colour_price":0.264,
                        "post_letter_black_quantity":33,
                        "post_letter_colour_quantity":26,
                        "post_direct_mail_dl_price":0.44,
                        "post_direct_mail_a5_price":0.66,
                        "post_direct_mail_min_quantity":5000,
                        "postcard_price":11,
                        "postcard_quantity":4
                    },
                    {
                        "package_id":3,
                        "package_price":"100.00",
                        "sms_price":0.099,
                        "sms_quantity":1010,
                        "voice_mobile_price":0.099,
                        "voice_mobile_quantity":1010,
                        "voice_landline_price":0.0583,
                        "voice_landline_quantity":1715,
                        "fax_price":0.198,
                        "fax_quantity":505,
                        "email_price":0.033,
                        "email_quantity":3030,
                        "post_letter_black_price":1.397,
                        "post_letter_colour_price":1.617,
                        "post_page_black_price":0.11,
                        "post_page_colour_price":0.264,
                        "post_letter_black_quantity":66,
                        "post_letter_colour_quantity":53,
                        "post_direct_mail_dl_price":0.44,
                        "post_direct_mail_a5_price":0.66,
                        "post_direct_mail_min_quantity":5000,
                        "postcard_price":11,
                        "postcard_quantity":9
                    },
                    {
                        "package_id":4,
                        "package_price":"200.00",
                        "sms_price":0.088,
                        "sms_quantity":2272,
                        "voice_mobile_price":0.099,
                        "voice_mobile_quantity":2020,
                        "voice_landline_price":0.0583,
                        "voice_landline_quantity":3430,
                        "fax_price":0.198,
                        "fax_quantity":1010,
                        "email_price":0.011,
                        "email_quantity":18181,
                        "post_letter_black_price":1.397,
                        "post_letter_colour_price":1.617,
                        "post_page_black_price":0.11,
                        "post_page_colour_price":0.264,
                        "post_letter_black_quantity":132,
                        "post_letter_colour_quantity":106,
                        "post_direct_mail_dl_price":0.44,
                        "post_direct_mail_a5_price":0.66,
                        "post_direct_mail_min_quantity":5000,
                        "postcard_price":11,
                        "postcard_quantity":18
                    },
                    {
                        "package_id":5,
                        "package_price":"500.00",
                        "sms_price":0.088,
                        "sms_quantity":5681,
                        "voice_mobile_price":0.099,
                        "voice_mobile_quantity":5050,
                        "voice_landline_price":0.0583,
                        "voice_landline_quantity":8576,
                        "fax_price":0.198,
                        "fax_quantity":2525,
                        "email_price":0.011,
                        "email_quantity":45454,
                        "post_letter_black_price":1.397,
                        "post_letter_colour_price":1.617,
                        "post_page_black_price":0.11,
                        "post_page_colour_price":0.264,
                        "post_letter_black_quantity":331,
                        "post_letter_colour_quantity":265,
                        "post_direct_mail_dl_price":0.44,
                        "post_direct_mail_a5_price":0.66,
                        "post_direct_mail_min_quantity":5000,
                        "postcard_price":11,
                        "postcard_quantity":45
                    },
                    {
                        "package_id":6,
                        "package_price":"1000.00",
                        "sms_price":0.077,
                        "sms_quantity":12987,
                        "voice_mobile_price":0.099,
                        "voice_mobile_quantity":10101,
                        "voice_landline_price":0.0583,
                        "voice_landline_quantity":17152,
                        "fax_price":0.198,
                        "fax_quantity":5050,
                        "email_price":0.0055,
                        "email_quantity":181818,
                        "post_letter_black_price":1.397,
                        "post_letter_colour_price":1.617,
                        "post_page_black_price":0.11,
                        "post_page_colour_price":0.264,
                        "post_letter_black_quantity":663,
                        "post_letter_colour_quantity":531,
                        "post_direct_mail_dl_price":0.44,
                        "post_direct_mail_a5_price":0.66,
                        "post_direct_mail_min_quantity":5000,
                        "postcard_price":11,
                        "postcard_quantity":90
                    },
                    {
                        "package_id":7,
                        "package_price":"1500.00",
                        "sms_price":0.077,
                        "sms_quantity":19480,
                        "voice_mobile_price":0.099,
                        "voice_mobile_quantity":15151,
                        "voice_landline_price":0.0583,
                        "voice_landline_quantity":25728,
                        "fax_price":0.198,
                        "fax_quantity":7575,
                        "email_price":0.0055,
                        "email_quantity":272727,
                        "post_letter_black_price":1.397,
                        "post_letter_colour_price":1.617,
                        "post_page_black_price":0.11,
                        "post_page_colour_price":0.264,
                        "post_letter_black_quantity":995,
                        "post_letter_colour_quantity":797,
                        "post_direct_mail_dl_price":0.44,
                        "post_direct_mail_a5_price":0.66,
                        "post_direct_mail_min_quantity":5000,
                        "postcard_price":11,
                        "postcard_quantity":136
                    },
                    {
                        "package_id":8,
                        "package_price":"2000.00",
                        "sms_price":0.077,
                        "sms_quantity":25974,
                        "voice_mobile_price":0.099,
                        "voice_mobile_quantity":20202,
                        "voice_landline_price":0.0583,
                        "voice_landline_quantity":34305,
                        "fax_price":0.198,
                        "fax_quantity":10101,
                        "email_price":0.0055,
                        "email_quantity":363636,
                        "post_letter_black_price":1.397,
                        "post_letter_colour_price":1.617,
                        "post_page_black_price":0.11,
                        "post_page_colour_price":0.264,
                        "post_letter_black_quantity":1327,
                        "post_letter_colour_quantity":1063,
                        "post_direct_mail_dl_price":0.44,
                        "post_direct_mail_a5_price":0.66,
                        "post_direct_mail_min_quantity":5000,
                        "postcard_price":11,
                        "postcard_quantity":181
                    },
                    {
                        "package_id":9,
                        "package_price":"3000.00",
                        "sms_price":0.077,
                        "sms_quantity":38961,
                        "voice_mobile_price":0.099,
                        "voice_mobile_quantity":30303,
                        "voice_landline_price":0.0583,
                        "voice_landline_quantity":51457,
                        "fax_price":0.198,
                        "fax_quantity":15151,
                        "email_price":0.0055,
                        "email_quantity":545454,
                        "post_letter_black_price":1.397,
                        "post_letter_colour_price":1.617,
                        "post_page_black_price":0.11,
                        "post_page_colour_price":0.264,
                        "post_letter_black_quantity":1990,
                        "post_letter_colour_quantity":1594,
                        "post_direct_mail_dl_price":0.44,
                        "post_direct_mail_a5_price":0.66,
                        "post_direct_mail_min_quantity":5000,
                        "postcard_price":11,
                        "postcard_quantity":272
                    },
                    {
                        "package_id":10,
                        "package_price":"5500.00",
                        "sms_price":0.066,
                        "sms_quantity":83333,
                        "voice_mobile_price":0.099,
                        "voice_mobile_quantity":55555,
                        "voice_landline_price":0.0583,
                        "voice_landline_quantity":94339,
                        "fax_price":0.198,
                        "fax_quantity":27777,
                        "email_price":0.0044,
                        "email_quantity":1250000,
                        "post_letter_black_price":1.397,
                        "post_letter_colour_price":1.617,
                        "post_page_black_price":0.11,
                        "post_page_colour_price":0.264,
                        "post_letter_black_quantity":3649,
                        "post_letter_colour_quantity":2923,
                        "post_direct_mail_dl_price":0.44,
                        "post_direct_mail_a5_price":0.66,
                        "post_direct_mail_min_quantity":5000,
                        "postcard_price":11,
                        "postcard_quantity":500
                    }
                ],
                "currency":{
                    "currency_name_short":"AUD",
                    "currency_prefix_d":"$",
                    "currency_prefix_c":"c",
                    "currency_name_long":"Australian Dollars"
                }
            }
        }

### Purchase a Package [PUT /recharge/purchase/{package_id}]

+ Parameters
    + `package_id`: 1 (number, required) - Your package id.

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Successfully purchased a package #1",
            "data":{
                "user_id":1,
                "amount":"50.00",
                "currency":"USD",
                "amount_aud":"61.86",
                "date":1442216451
            }
        }

### Get Transactions [GET /recharge/transactions]

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Here are your transactions.",
            "data":{
                "total":16,
                "per_page":15,
                "current_page":1,
                "last_page":2,
                "next_page_url":"https://rest.clicksend.com/v3/recharge/transactions/?page=2",
                "prev_page_url":null,
                "from":1,
                "to":15,
                "data":[
                    {
                        "invoice_number":"cb726c65-1c65-47fa-aea2-3ded9ed57557",
                        "amount":"20.00",
                        "currency":"AUD",
                        "date":1443420196
                    },
                    {
                        "invoice_number":"13d35606-5f10-4d31-9de4-065b025aa5b8",
                        "amount":"20.00",
                        "currency":"AUD",
                        "date":1443420094
                    },
                    {
                        "invoice_number":"4e9fc8af-f514-45b1-86c2-fc85630bb14d",
                        "amount":"20.00",
                        "currency":"AUD",
                        "date":1443418982
                    },
                    {
                        "invoice_number":"65c0bfe0-168c-4b46-9dbd-6120a18b5efa",
                        "amount":"20.00",
                        "currency":"AUD",
                        "date":1443403590
                    },
                    {
                        "invoice_number":"902e78dc-9a70-417b-8426-6967f0efc6eb",
                        "amount":"20.00",
                        "currency":"AUD",
                        "date":1443149774
                    },
                    {
                        "invoice_number":"21571831-ae8f-4605-ac3e-3efe424a2a39",
                        "amount":"20.00",
                        "currency":"AUD",
                        "date":1443148806
                    },
                    {
                        "invoice_number":"b978f05b-3de0-4d17-9796-a852eb82d820",
                        "amount":"20.00",
                        "currency":"AUD",
                        "date":1443147864
                    },
                    {
                        "invoice_number":"180999f7-1928-4137-a7c3-754420fc1235",
                        "amount":"20.00",
                        "currency":"AUD",
                        "date":1443146363
                    },
                    {
                        "invoice_number":"3d527e8f-03e1-460b-9f7d-5fce9fc2997e",
                        "amount":"20.00",
                        "currency":"AUD",
                        "date":1442907133
                    },
                    {
                        "invoice_number":"cdee6647-7b82-49b5-b26e-033eadb2a485",
                        "amount":"20.00",
                        "currency":"AUD",
                        "date":1442902821
                    },
                    {
                        "invoice_number":"0b6c4073-e214-439d-9821-8f0b69ea61f8",
                        "amount":"20.00",
                        "currency":"AUD",
                        "date":1442902477
                    },
                    {
                        "invoice_number":"e9d48b44-fad1-4d47-94bb-5d11d88f01f4",
                        "amount":"20.00",
                        "currency":"AUD",
                        "date":1442902394
                    },
                    {
                        "invoice_number":"1ea56734-a540-4ab6-8b10-fc364065c046",
                        "amount":"20.00",
                        "currency":"AUD",
                        "date":1442902192
                    },
                    {
                        "invoice_number":"b5031e92-0ca3-47a1-9f66-b14a7eaac9b1",
                        "amount":"20.00",
                        "currency":"AUD",
                        "date":1442896724
                    },
                    {
                        "invoice_number":"aeb4bff3-ea08-40ba-9f84-3ff000aa9283",
                        "amount":"50.00",
                        "currency":"USD",
                        "date":1442216451
                    }
                ]
            }
        }

### Get a specific transaction [GET /recharge/transactions/{transaction_id}]

+ Parameters
    + `transaction_id`: cb726c65-1c65-47fa-aea2-3ded9ed57557 (number, required) - Your transction id.

+ Response 200 (application/pdf)

        {
        }

# Group Automation Rules

## Inbound SMS Rules [/automations/sms/inbound]

### List rules [GET]

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Your list of inbound rules.",
            "data":{
                "total":10,
                "per_page":15,
                "current_page":1,
                "last_page":1,
                "next_page_url":null,
                "prev_page_url":null,
                "from":1,
                "to":10,
                "data":[
                    {
                        "inbound_rule_id":10,
                        "dedicated_number":"+61298441484",
                        "rule_name":"My Rule 10",
                        "message_search_type":3,
                        "message_search_term":"My Search Term",
                        "action":"CREATE_CONTACT_PLUS_EMAIL",
                        "action_address":"430",
                        "body":"test@test.com",
                        "enabled":1
                    },
                    {
                        "inbound_rule_id":9,
                        "dedicated_number":"+61298441484",
                        "rule_name":"My Rule 9",
                        "message_search_type":3,
                        "message_search_term":"My Search Term",
                        "action":"CREATE_CONTACT",
                        "action_address":"john@doe.com",
                        "body":null,
                        "enabled":1
                    },
                    {
                        "inbound_rule_id":8,
                        "dedicated_number":"+61298441484",
                        "rule_name":"My Rule 8",
                        "message_search_type":3,
                        "message_search_term":"My Search Term",
                        "action":"MOVE_CONTACT",
                        "action_address":"john@doe.com",
                        "body":null,
                        "enabled":1
                    },
                    {
                        "inbound_rule_id":7,
                        "dedicated_number":"+61298441484",
                        "rule_name":"My Rule 7",
                        "message_search_type":3,
                        "message_search_term":"My Search Term",
                        "action":"GROUP_SMS",
                        "action_address":"john@doe.com",
                        "body":null,
                        "enabled":1
                    },
                    {
                        "inbound_rule_id":6,
                        "dedicated_number":"+61298441484",
                        "rule_name":"My Rule 6",
                        "message_search_type":3,
                        "message_search_term":"My Search Term",
                        "action":"POLL",
                        "action_address":"john@doe.com",
                        "body":null,
                        "enabled":1
                    },
                    {
                        "inbound_rule_id":5,
                        "dedicated_number":"+61298441484",
                        "rule_name":"My Rule 5",
                        "message_search_type":3,
                        "message_search_term":"My Search Term",
                        "action":"SMS",
                        "action_address":"john@doe.com",
                        "body":null,
                        "enabled":1
                    },
                    {
                        "inbound_rule_id":4,
                        "dedicated_number":"+61298441484",
                        "rule_name":"My Rule 4",
                        "message_search_type":3,
                        "message_search_term":"My Search Term",
                        "action":"URL",
                        "action_address":"john@doe.com",
                        "body":null,
                        "enabled":1
                    },
                    {
                        "inbound_rule_id":3,
                        "dedicated_number":"+61298441484",
                        "rule_name":"My Rule 3",
                        "message_search_type":3,
                        "message_search_term":"My Search Term",
                        "action":"EMAIL_FIXED",
                        "action_address":"john@doe.com",
                        "body":null,
                        "enabled":1
                    },
                    {
                        "inbound_rule_id":2,
                        "dedicated_number":"+61298441484",
                        "rule_name":"My Rule 2",
                        "message_search_type":3,
                        "message_search_term":"My Search Term",
                        "action":"EMAIL_USER",
                        "action_address":"john@doe.com",
                        "body":null,
                        "enabled":1
                    },
                    {
                        "inbound_rule_id":1,
                        "dedicated_number":"+61298441484",
                        "rule_name":"My Rule 1",
                        "message_search_type":3,
                        "message_search_term":null,
                        "action":"AUTO_REPLY",
                        "action_address":"john@doe.com",
                        "body":null,
                        "enabled":1
                    },
                    {
                        "inbound_rule_id": 1,
                        "dedicated_number": "+61298441484",
                        "rule_name": "My Rule 1",
                        "message_search_type": 3,
                        "message_search_term": null,
                        "action": "CREATE_CONTACT_PLUS_NAME",
                        "action_address": 534,
                        "body": null,
                        "enabled": 1
                    }
                ]
            }
        }

### Get a specific rule [GET /automations/sms/inbound/{inbound_rule_id}]

+ Parameters
    + `inbound_rule_id`: 1 (required, number) - Inbound Rule ID.

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Your inbound rule.",
            "data":{
                "inbound_rule_id":1,
                "dedicated_number":"+61298441484",
                "rule_name":"My Rule",
                "message_search_type":3,
                "message_search_term":null,
                "action":"EMAIL_FIXED",
                "action_address":"john@doe.com",
                "body":null,
                "enabled":1
            }
        }

### Create a new rule [POST /automations/sms/inbound/]

+ Request (application/json)

    + Attributes
        + `dedicated_number`: `+61298441484` (required, number) - Dedicated Number.
        + `rule_name`: `My Rule` (required, string) - Rule Name.
        + `message_search_type`: 3 (required, number) - Message Search Type: 0=Any message, 1=starts with, 2=contains, 3=does not contain.
        + `message_search_term`: `My Search Term` (required, string) - Message Search Term.
        + action: `EMAIL_FIXED` (required, string) - Action.
        + `action_address`: `john@doe.com` (required, string) - Action Address.
        + enabled: 1 (required, number) - Enabled.

    + Body

            {
                "dedicated_number":"+61298441484",
                "rule_name":"My Rule",
                "message_search_type":3,
                "message_search_term":"My Search Term",
                "action":"EMAIL_FIXED",
                "action_address":"john@doe.com",
                "enabled":1
            }

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Your record has been added.",
            "data":{
                "inbound_rule_id":11,
                "dedicated_number":"+61298441484",
                "rule_name":"My Rule",
                "message_search_type":3,
                "message_search_term":"My Search Term",
                "action":"EMAIL_FIXED",
                "action_address":"john@doe.com",
                "enabled":1
            }
        }

### Update a rule [PUT /automations/sms/inbound/{inbound_rule_id}]

+ Parameters
    + `inbound_rule_id`: 1 (required, number) - Inbound Rule ID.

+ Request (application/json)

    + Attributes
        + `dedicated_number`: `+61298441484` (required, string) - Dedicated Number
        + `message_search_type`: 3 (required, number) - Message Search Type: 0=Any message, 1=starts with, 2=contains, 3=does not contain.
        + `message_search_term`: `My Search Term` (required, string) - Message Search Term.
        + action: `EMAIL_FIXED` (required, string) - Action.
        + `action_address`: `john@doe.com` (required, string) - Action Address.
        + enabled: 1 (required, number) - Enabled.

    + Body

            {
                "dedicated_number":"+61298441484",
                "rule_name":"My Rule",
                "message_search_type":3,
                "message_search_term":"My Search Term",
                "action":"EMAIL_FIXED",
                "action_address":"john@doe.com",
                "enabled":1
            }

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Your record has been updated.",
            "data":{
                "inbound_rule_id":1,
                "dedicated_number":"+61298441484",
                "rule_name":"My Rule",
                "message_search_type":3,
                "message_search_term":null,
                "action":"EMAIL_FIXED",
                "action_address":"john@doe.com",
                "body":null,
                "enabled":1
            }
        }

### Delete a rule [DELETE /automations/sms/inbound/{inbound_rule_id}]

+ Parameters
    + `inbound_rule_id`: 1 (required, number) - Inbound Rule ID.

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Your record has been deleted.",
            "data":[]
        }

## SMS Delivery Receipt Rules [/automations/sms/receipts]

### List rules [GET /automations/sms/receipts]

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Your list of rule incoming sms receipt.",
            "data":{
                "total":5,
                "per_page":15,
                "current_page":1,
                "last_page":1,
                "next_page_url":null,
                "prev_page_url":null,
                "from":1,
                "to":5,
                "data":[
                    {
                        "receipt_rule_id":5,
                        "rule_name":"My Rule",
                        "match_type":0,
                        "action":"EMAIL_FIXED",
                        "action_address":"john@doe.com",
                        "enabled":0
                    },
                    {
                        "receipt_rule_id":6,
                        "rule_name":"My Rule",
                        "match_type":0,
                        "action":"EMAIL_FIXED",
                        "action_address":"john@doe.com",
                        "enabled":1
                    },
                    {
                        "receipt_rule_id":7,
                        "rule_name":"My Rule",
                        "match_type":0,
                        "action":"EMAIL_FIXED",
                        "action_address":"john@doe.com",
                        "enabled":1
                    },
                    {
                        "receipt_rule_id":8,
                        "rule_name":"My Rule",
                        "match_type":0,
                        "action":"SMS",
                        "action_address":"+61298441484",
                        "enabled":1
                    },
                    {
                        "receipt_rule_id":9,
                        "rule_name":"My Rule",
                        "match_type":0,
                        "action":"URL",
                        "action_address":"+61298441485",
                        "enabled":1
                    }
                ]
            }
        }

### Get a specific rule [GET /automations/sms/receipts/{receipt_rule_id}]

+ Parameters
    + `receipt_rule_id`: 2 (required, number) - Receipt Rule ID.

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Your rule incoming voice receipt.",
            "data":{
                "receipt_rule_id":6,
                "rule_name":"My Rule",
                "match_type":0,
                "action":"EMAIL_FIXED",
                "action_address":"john@doe.com",
                "enabled":1
            }
        }

### Create a new rule [POST /automations/sms/receipts]

+ Request (application/json)

    + Attributes
        + `rule_name`: "My Rule" (required, string) - Rule Name.
        + `match_type`: 1 (required, number) - Match Type. 0=All reports, 1=Only failed, 2=Only successful.
        + action: `EMAIL_FIXED` (required, string) - Action.
        + `action_address`: "john@doe.com" (required, string) - Action Address.
        + enabled: 1 (required, number) - Enabled.

    + Body

            {
                "rule_name": "My Rule",
                "match_type": 3,
                "action": "EMAIL_FIXED",
                "action_address": "john@doe.com",
                "enabled": 1
            }

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Your new SMS receipt has been added.",
            "data":{
                "receipt_rule_id":10,
                "rule_name":"My Rule",
                "match_type":3,
                "action":"EMAIL_FIXED",
                "action_address":"john@doe.com",
                "enabled":1
            }
        }

### Update a rule [PUT /automations/sms/receipts/{receipt_rule_id}]

+ Parameters
    + `receipt_rule_id`: 7 (required, number) - Receipt Rule ID.

+ Request (application/json)

    + Attributes
        + `rule_name`: "My Rule" (required, string) - Rule Name.
        + `match_type`: 1 (required, number) - Match Type. 0=All reports, 1=Only failed, 2=Only successful.
        + action: `EMAIL_FIXED` (required, string) - Action.
        + `action_address`: "john@doe.com" (required, string) - Action Address.
        + enabled: 1 (required, number) - Enabled.

    + Body

            {
                "rule_name": "My Rule",
                "match_type": 3,
                "action": "EMAIL_FIXED",
                "action_address": "john@doe.com",
                "enabled": 1
            }

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Your rule incoming sms receipt has been updated.",
            "data":{
                "receipt_rule_id":7,
                "rule_name":"My Rule",
                "match_type":0,
                "action":"EMAIL_FIXED",
                "action_address":"john@doe.com",
                "enabled":1
            }
        }

### Delete a rule [DELETE /automations/sms/receipts/{receipt_rule_id}]

+ Parameters
    + `receipt_rule_id`: 7 (required, number) - Receipt Rule ID.

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Your rule incoming sms receipt has been deleted.",
            "data":[]
        }

## Voice Delivery Receipt Rules [/automations/voice/receipts]

### List rules [GET]

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Your voice receipts.",
            "data":{
                "total":1,
                "per_page":15,
                "current_page":1,
                "last_page":1,
                "next_page_url":null,
                "prev_page_url":null,
                "from":1,
                "to":1,
                "data":[
                    {
                        "receipt_rule_id":2,
                        "rule_name":"My Rule 2",
                        "match_type":3,
                        "action":"URL",
                        "action_address":"http://yourdomain.com",
                        "enabled":1
                    }
                ]
            }
        }

### Get a specific rule [GET /automations/voice/receipts/{receipt_rule_id}]

+ Parameters
    + `receipt_rule_id`: 2 (required, number) - Receipt Rule ID.

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Your rule incoming voice receipt.",
            "data":{
                "receipt_rule_id":2,
                "rule_name":"My Rule 2",
                "match_type":3,
                "action":"URL",
                "action_address":"http://yourdomain.com",
                "enabled":1
            }
        }

### Create a new rule [POST]

+ Request (application/json)

    + Attributes
        + `rule_name`: "My Rule" (required, string) - Rule Name.
        + `match_type`: 1 (required, number) - Match Type. 0=All reports, 1=Only failed, 2=Only successful.
        + action: `EMAIL_FIXED` (required, string) - Action.
        + `action_address`: john@doe.com (required, string) - Action Address.
        + enabled: 1 (required, number) - Enabled.

    + Body

            {
                "rule_name":"My Rule",
                "match_type":3,
                "action":"EMAIL_FIXED",
                "action_address":"john@doe.com",
                "enabled":1
            }

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Your new voice receipt has been added.",
            "data":{
                "receipt_rule_id":3,
                "rule_name":"My Rule",
                "match_type":3,
                "action":"EMAIL_FIXED",
                "action_address":"john@doe.com",
                "enabled":1
            }
        }

### Update a rule [PUT /automations/voice/receipts/{receipt_rule_id}]

+ Parameters
    + `receipt_rule_id`: 2 (required, number) - Receipt Rule ID.

+ Request (application/json)

    + Attributes
        + `rule_name`: "My Rule" (required, string) - Rule Name.
        + `match_type`: 1 (required, number) - Match Type. 0=All reports, 1=Only failed, 2=Only successful.
        + action: `EMAIL_FIXED` (required, string) - Action.
        + `action_address`: john@doe.com (required, string) - Action Address.
        + enabled: 1 (required, number) - Enabled.

    + Body

            {
                "rule_name":"My Rule",
                "match_type":3,
                "action":"EMAIL_FIXED",
                "action_address":"john@doe.com",
                "enabled":1
            }

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Your rule incoming voice receipt.",
            "data":{
                "receipt_rule_id":2,
                "rule_name":"My Rule 2",
                "match_type":3,
                "action":"URL",
                "action_address":"http://yourdomain.com",
                "enabled":1
            }
        }

### Delete a rule [DELETE /automations/voice/receipts/{receipt_rule_id}]

+ Parameters
    + `receipt_rule_id`: 2 (required, number) - Receipt Rule ID.

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Your rule voice receipt has been deleted.",
            "data":[]
        }

## Inbound Fax Rules [/automations/fax/inbound]

### List rules [GET]

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Your inbound fax.",
            "data":{
                "total":20,
                "per_page":15,
                "current_page":1,
                "last_page":2,
                "next_page_url":"https://rest.clicksend.com/v3/automations/fax/inbound?page=2",
                "prev_page_url":null,
                "from":1,
                "to":15,
                "data":[
                    {
                        "inbound_rule_id":1,
                        "dedicated_number":"19",
                        "rule_name":"Email",
                        "user_id":1,
                        "action":"EMAIL_FIXED",
                        "action_address":"test@test.com",
                        "enabled":1
                    },
                    {
                        "inbound_rule_id":2,
                        "dedicated_number":"19",
                        "rule_name":"URL",
                        "user_id":1,
                        "action":"URL",
                        "action_address":"http://yourdomain.com",
                        "enabled":0
                    },
                    {
                        "inbound_rule_id":3,
                        "dedicated_number":"19",
                        "rule_name":"POLL",
                        "user_id":1,
                        "action":"POLL",
                        "action_address":"http://yourdomain.com",
                        "enabled":0
                    },
                    {
                        "inbound_rule_id":4,
                        "dedicated_number":"19",
                        "rule_name":"POLL",
                        "user_id":1,
                        "action":"EMAIL_FIXED",
                        "action_address":"http://yourdomain.com",
                        "enabled":0
                    },
                    {
                        "inbound_rule_id":6,
                        "dedicated_number":"19",
                        "rule_name":"POLL",
                        "user_id":1,
                        "action":"NOTHING",
                        "action_address":"http://yourdomain.com",
                        "enabled":0
                    },
                    {
                        "inbound_rule_id":7,
                        "dedicated_number":"19",
                        "rule_name":"POLL",
                        "user_id":1,
                        "action":"NOTHING",
                        "action_address":"http://yourdomain.com",
                        "enabled":0
                    },
                    {
                        "inbound_rule_id":8,
                        "dedicated_number":"19",
                        "rule_name":"POLL",
                        "user_id":1,
                        "action":"NOTHING",
                        "action_address":"http://yourdomain.com",
                        "enabled":0
                    },
                    {
                        "inbound_rule_id":9,
                        "dedicated_number":"19",
                        "rule_name":"POLL",
                        "user_id":1,
                        "action":"NOTHING",
                        "action_address":"http://yourdomain.com",
                        "enabled":0
                    },
                    {
                        "inbound_rule_id":10,
                        "dedicated_number":"19",
                        "rule_name":"POLL",
                        "user_id":1,
                        "action":"POLL",
                        "action_address":"http://yourdomain.com",
                        "enabled":0
                    },
                    {
                        "inbound_rule_id":12,
                        "dedicated_number":"+61298441484",
                        "rule_name":"Rule Name",
                        "user_id":1,
                        "action":"EMAIL_FIXED",
                        "action_address":"",
                        "enabled":1
                    },
                    {
                        "inbound_rule_id":13,
                        "dedicated_number":"+61298441484",
                        "rule_name":"Rule Name",
                        "user_id":1,
                        "action":"EMAIL_FIXED",
                        "action_address":"",
                        "enabled":1
                    },
                    {
                        "inbound_rule_id":14,
                        "dedicated_number":"+61298441484",
                        "rule_name":"Rule Name",
                        "user_id":1,
                        "action":"EMAIL_FIXED",
                        "action_address":"email@domain.com",
                        "enabled":1
                    },
                    {
                        "inbound_rule_id":15,
                        "dedicated_number":"+61298441484",
                        "rule_name":"Rule Name",
                        "user_id":1,
                        "action":"EMAIL_FIXED",
                        "action_address":"email@domain.com",
                        "enabled":1
                    },
                    {
                        "inbound_rule_id":16,
                        "dedicated_number":"+61298441484",
                        "rule_name":"Rule Name",
                        "user_id":1,
                        "action":"EMAIL_FIXED",
                        "action_address":"email@domain.com",
                        "enabled":1
                    },
                    {
                        "inbound_rule_id":17,
                        "dedicated_number":"+61298441484",
                        "rule_name":"Rule Name",
                        "user_id":1,
                        "action":"EMAIL_FIXED",
                        "action_address":"email@domain.com",
                        "enabled":1
                    }
                ]
            }
        }

### Get a specific rule [GET /automations/fax/inbound/{inbound_rule_id}]

+ Parameters
    + `inbound_rule_id`: 14 (required, number) - Fax inbound rule id

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Your inbound fax.",
            "data":{
                "inbound_rule_id":14,
                "dedicated_number":"+61298441484",
                "rule_name":"Rule Name",
                "user_id":1,
                "action":"EMAIL_FIXED",
                "action_address":"email@domain.com",
                "enabled":1
            }
        }

### Create a new rule [POST]

+ Request (application/json)

    + Attributes (object)
        + `dedicated_number`: `+61298441484` (string, required) - Decicated Number
        + `rule_name`: My Rule (string, required) - Rule Name
        + action: `EMAIL_FIXED` (string, required) - Action
        + `action_address`: `email@domain.com` (string, required) - Action Address
        + enabled: 1 (number, required) - Enable

    + Body

                {
                    "dedicated_number":"+61298441484",
                    "rule_name":"Rule Name",
                    "action":"EMAIL_FIXED",
                    "action_address":"email@domain.com",
                    "enabled":1
                }

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"New rule has been added.",
            "data":{
                "inbound_rule_id":24,
                "dedicated_number":"+61298441484",
                "rule_name":"My Rule",
                "user_id":1,
                "action":"EMAIL_FIXED",
                "action_address":"email@domain.com",
                "enabled":1
            }
        }

### Update a rule [PUT /automations/fax/inbound/{inbound_rule_id}]

+ Parameters
    + `inbound_rule_id`: 14 (required, number) - Fax inbound rule id

+ Request (application/json)

    + Attributes (object)
        + `dedicated_number`: `+61298441484` (string, required) - Decicated Number
        + `rule_name`: My Rule (string, required) - Rule Name
        + action: `EMAIL_FIXED` (string, required) - Action
        + `action_address`: `email@domain.com` (string, required) - Action Address
        + enabled: 1 (number, required) - Enable

    + Body

                {
                    "dedicated_number":"+61298441484",
                    "rule_name":"Rule Name",
                    "action":"EMAIL_FIXED",
                    "action_address":"email@domain.com",
                    "enabled":1
                }

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Your inbound fax.",
            "data":{
                "inbound_rule_id":14,
                "dedicated_number":"+61298441484",
                "rule_name":"Rule Name",
                "user_id":1,
                "action":"EMAIL_FIXED",
                "action_address":"email@domain.com",
                "enabled":1
            }
        }

### Delete a rule [DELETE /automations/fax/inbound/{inbound_rule_id}]

+ Parameters
    + `inbound_rule_id`: 14 (required, number) - Fax inbound rule id

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Your fax inbound rule has been deleted.",
            "data":[]
        }

## Fax Delivery Receipt Rules [/automations/fax/receipts]

### List Rules [GET /automations/fax/receipts]

+ Response 200 (application/json)

            {
                "http_code": 200,
                "response_code": "SUCCESS",
                "response_msg": "Here is your result.",
                "data": {
                    "total": 4,
                    "per_page": 15,
                    "current_page": 1,
                    "last_page": 1,
                    "next_page_url": null,
                    "prev_page_url": null,
                    "from": 1,
                    "to": 4,
                    "data": [
                        {
                            "receipt_rule_id": 1,
                            "rule_name": "Email Test Rule",
                            "match_type": 0,
                            "action": "URL",
                            "action_address": "http://yourdomain.com",
                            "enabled": 1
                        },
                        {
                            "receipt_rule_id": 2,
                            "rule_name": "test",
                            "match_type": 0,
                            "action": "URL",
                            "action_address": "http://yourdomain.com",
                            "enabled": 1
                        },
                        {
                            "receipt_rule_id": 6,
                            "rule_name": "test",
                            "match_type": 0,
                            "action": "URL",
                            "action_address": "http://yourdomain.com",
                            "enabled": 1
                        },
                        {
                            "receipt_rule_id": 7,
                            "rule_name": "test",
                            "match_type": 0,
                            "action": "URL",
                            "action_address": "http://yourdomain.com",
                            "enabled": 1
                        }
                    ]
                }
            }

### Get a Specific Rule [GET /automations/fax/receipts/{rule_id}]

+ Parameters
    + `rule_id`: 4 (required, number) - The rule id you want to access.

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Your rule incoming fax receipt.",
            "data":{
                "receipt_rule_id":4,
                "rule_name":"My Rule",
                "match_type":2,
                "action":"EMAIL_FIXED",
                "action_address":"john@doe.com",
                "enabled":1
            }
        }

### Create a New Rule [POST /automations/fax/receipts]

+ Request (application/json)

    + Attributes (object)
        + `rule_name`: `My Rule` (required, string) - Rule Name.
        + `match_type`: 2 (required, number) - Match Type. 0=All reports.
        + action: `EMAIL_FIXED` (required, string) - Action.
        + `action_address`: `john@doe.com` (required, string) - Action Address.
        + enabled: 1 (required, number) - Enabled.

    + Body

                {
                    "rule_name":"My Rule",
                    "match_type":2,
                    "action":"EMAIL_FIXED",
                    "action_address":"john@doe.com",
                    "enabled":1
                }

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Your new Fax receipt has been added.",
            "data":{
                "receipt_rule_id":4,
                "rule_name":"My Rule",
                "match_type":2,
                "action":"EMAIL_FIXED",
                "action_address":"john@doe.com",
                "enabled":1
            }
        }

### Update a Rule [PUT /automations/fax/receipts/{rule_id}]

+ Parameters
    + `rule_id`: 4 (required, number) - The email receipt rule id you want to access.

+ Request (application/json)

    + Attributes (object)
        + `rule_name`: `My Rule` (optional, string) - Rule Name.
        + `match_type`: 4 (optional, number) - Match Type. 0=All reports.
        + action: `EMAIL_FIXED` (optional, string) - Action.
        + `action_address`: `john@doe.com` (optional, string) - Action Address.
        + enabled: 1 (optional, number) - Enabled.

    + Body

                {
                    "rule_name":"My Rule",
                    "match_type":1,
                    "action":"EMAIL_FIXED",
                    "action_address":"john@doe.com",
                    "enabled":1
                }

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Your rule incoming fax receipt has been updated.",
            "data":{
                "receipt_rule_id":4,
                "rule_name":"My Rule",
                "match_type":1,
                "action":"EMAIL_FIXED",
                "action_address":"john@doe.com",
                "enabled":1
            }
        }

### Delete a Rule [DELETE /automations/fax/receipts/{rule_id}]

+ Parameters
    + `rule_id`: 4 (required, number) - The email receipt rule id you want to delete.

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Your rule incoming fax receipt has been deleted.",
            "data":null
        }

## Email Delivery Receipt Rules [/automations/email/receipts]

### List Rules [GET /automations/email/receipt]

+ Response 200 (application/json)

            {
                "http_code": 200,
                "response_code": "SUCCESS",
                "response_msg": "Here is your result.",
                "data": {
                    "total": 4,
                    "per_page": 15,
                    "current_page": 1,
                    "last_page": 1,
                    "next_page_url": null,
                    "prev_page_url": null,
                    "from": 1,
                    "to": 4,
                    "data": [
                        {
                            "receipt_rule_id": 1,
                            "rule_name": "Email Test Rule",
                            "match_type": 0,
                            "action": "URL",
                            "action_address": "http://yourdomain.com",
                            "enabled": 1
                        },
                        {
                            "receipt_rule_id": 2,
                            "rule_name": "test",
                            "match_type": 0,
                            "action": "URL",
                            "action_address": "http://yourdomain.com",
                            "enabled": 1
                        },
                        {
                            "receipt_rule_id": 6,
                            "rule_name": "test",
                            "match_type": 0,
                            "action": "URL",
                            "action_address": "http://yourdomain.com",
                            "enabled": 1
                        },
                        {
                            "receipt_rule_id": 7,
                            "rule_name": "test",
                            "match_type": 0,
                            "action": "URL",
                            "action_address": "http://yourdomain.com",
                            "enabled": 1
                        }
                    ]
                }
            }

### Get a Specific Rule [GET /automations/email/receipt/{rule_id}]

+ Parameters
    + `rule_id`: 5 (required, number) - The rule id you want to access.

+ Response 200 (application/json)

        {
            "http_code": 200,
            "response_code": "SUCCESS",
            "response_msg": "Here is your result.",
            "data": {
                "receipt_rule_id": 1,
                "rule_name": "Email Test Rule",
                "match_type": 0,
                "action": "URL",
                "action_address": "http://yourdomain.com",
                "enabled": 1
            }
        }

### Create a New Rule [POST /automations/email/receipt]

+ Request (application/json)

    + Attributes (object)
        + `rule_name`: My Rule (required, string) - Rule Name.
        + `match_type`: 1 (required, number) - Match Type. 0=All reports.
        + action: URL (required, string) - Action.
        + `action_address`: http://yourdomain.com (required, string) - Action Address.
        + enabled: 1 (required, number) - Enabled.

    + Body

                {
                    "rule_name":"My Rule",
                    "match_type": 0,
                    "action":"URL",
                    "action_address":"http://yourdomain.com",
                    "enabled":1
                }

+ Response 200 (application/json)

        {
            "http_code": 200,
            "response_code": "SUCCESS",
            "response_msg": "Automation email receipt rule has been created.",
            "data": {
                "receipt_rule_id": 8,
                "rule_name": "My Rule",
                "match_type": 0,
                "action": "URL",
                "action_address": "http://yourdomain.com",
                "enabled": 1
            }
        }

### Update a Rule [PUT /automations/email/receipt/{rule_id}]

+ Parameters
    + `rule_id`: 8 (required, number) - The email receipt rule id you want to access.

+ Request (application/json)

    + Attributes (object)
        + `rule_name`: My Rule (optional, string) - Rule Name.
        + `match_type`: 1 (optional, number) - Match Type. 0=All reports.
        + action: URL (optional, string) - Action.
        + `action_address`: http://yourdomain.com (optional, string) - Action Address.
        + enabled: 1 (optional, number) - Enabled.

    + Body

                {
                    "rule_name":"My Rule",
                    "match_type": 0,
                    "action":"URL",
                    "action_address":"http://yourdomain.com",
                    "enabled":1
                }

+ Response 200 (application/json)

        {
            "http_code": 200,
            "response_code": "SUCCESS",
            "response_msg": "Automation email receipt rule has been updated.",
            "data": {
                "receipt_rule_id": 8,
                "rule_name": "My Rule",
                "match_type": 0,
                "action": "URL",
                "action_address": "http://yourdomain.com",
                "enabled": 1
            }
        }

### Delete a Rule [DELETE /automations/email/receipt/{rule_id}]

+ Parameters
    + `rule_id`: 8 (required, number) - The email receipt rule id you want to delete.

+ Response 200 (application/json)

        {
            "http_code": 200,
            "response_code": "SUCCESS",
            "response_msg": "Automation email receipt rule has been deleted.",
            "data": true
        }

# Group Contact Lists

## Contact List Collection [/lists]

### Get all Contact Lists [GET]

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Here are your data.",
            "data":{
                "total":9,
                "per_page":15,
                "current_page":1,
                "last_page":1,
                "next_page_url":null,
                "prev_page_url":null,
                "from":1,
                "to":9,
                "data":[
                    {
                        "list_id":428,
                        "list_name":"List-reFSsJkvRC",
                        "list_email_id":"GHPAJCCVGMTD9BLA",
                        "_contacts_count":0
                    },
                    {
                        "list_id":429,
                        "list_name":"List6eaG4lGIc9",
                        "list_email_id":"IIEXAR72O9UAZ7WW",
                        "_contacts_count":0
                    },
                    {
                        "list_id":430,
                        "list_name":"ListwM4kJrQ7Db",
                        "list_email_id":"HSA3VWFEFCZIF2WT",
                        "_contacts_count":0
                    },
                    {
                        "list_id":431,
                        "list_name":"ListzH6Qs6Uqh5",
                        "list_email_id":"HSA3VWFEFCZIF2WT",
                        "_contacts_count":0
                    },
                    {
                        "list_id":432,
                        "list_name":"ListJaDZPg7SOy",
                        "list_email_id":"3TCFYRPSW8OXRBK7",
                        "_contacts_count":0
                    },
                    {
                        "list_id":433,
                        "list_name":"ListxseEIVS4d5",
                        "list_email_id":"BCT20YT185AHVVNI",
                        "_contacts_count":0
                    },
                    {
                        "list_id":434,
                        "list_name":"ListqX62zF5kan",
                        "list_email_id":"NODYGVDCEVV9Q0CG",
                        "_contacts_count":0
                    },
                    {
                        "list_id":435,
                        "list_name":"ListklPbrd232Z",
                        "list_email_id":"VCYXAZSXNZCVJIPB",
                        "_contacts_count":0
                    },
                    {
                        "list_id":436,
                        "list_name":"ListFfD3OIiTwJ",
                        "list_email_id":"KCDKIEBYPBIYQXJQ",
                        "_contacts_count":0
                    }
                ]
            }
        }

### Create a new contact list [POST]

+ Request (application/json)

    + Headers

            Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA==

    + Attributes (object)
        + `list_name`: ListCT3QrVL4od (string, required) - Your contact list name.

    + Body

                {
                    "list_name":"ListCT3QrVL4od"
                }

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"New list has been created.",
            "data":{
                "list_id":437,
                "list_name":"ListCT3QrVL4od",
                "list_email_id":"KB0LHD6WXFVHZWTR",
                "_contacts_count":0
            }
        }

## Contact List [/lists/{list_id}]

### Get a specific contact list [GET]

+ Parameters
    + `list_id`: 437 (required, number) - Your contact list id you want to access.

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Here are your data.",
            "data":{
                "list_id":437,
                "list_name":"ListCT3QrVL4od",
                "list_email_id":"KB0LHD6WXFVHZWTR",
                "_contacts_count":0
            }
        }

### Update a specific contact list [PUT]

+ Parameters
    + `list_id`: 439 (required, number) - Your contact list id you want to access.

+ Request (application/json)

    + Headers

            Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA==

    + Attributes (object)
        + `list_name`: ListlPJf33ksjP (string, optional) - Your new contact list name.

    + Body

                {
                    "list_name":"ListlPJf33ksjP"
                }

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"List #439 has been updated.",
            "data":{
                "list_id":439,
                "list_name":"ListlPJf33ksjP",
                "list_email_id":"LINDW2NHNPKHEJB6",
                "_contacts_count":0
            }
        }

### Delete a specific contact list [DELETE]

+ Parameters
    + `list_id`: 442 (required, number) - Your contact list id you want to access.

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"List #442 has been deleted.",
            "data":[]
        }

## Import Contacts [/lists/{list_id}/import]

### Import Contacts to List [POST]

+ Parameters
    + `list_id`: 437 (required, number) - Your contact list id you want to access.

+ Request (application/json)

    + Attributes (object)
        + `file_url`: "http://yourdomain.com/import.csv" (string, required) - Path to your CSV import file.
        + `field_order`: [] (array, required) - Your field order for your contact import file.

    + Body

            {
                "file_url":"http://yourdomain.com/import.csv",
                "field_order":[
                    "phone",
                    "first_name",
                    "last_name",
                    "custom1",
                    "custom2",
                    "custom3",
                    "custom4",
                    "fax_number",
                    "organization_name",
                    "email",
                    "address_line_1",
                    "address_line_2",
                    "address_city",
                    "address_state",
                    "address_postal_code",
                    "address_country"
                ]
            }

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Your file is now queued.",
            "data":{
                "msg":"Messages put on queue.",
                "ids":[
                    "6254358460638066203"
                ],
                "id":"6254358460638066203"
            }
        }

## Export Contacts [/lists/{list_id}/export?filename={filename}]

### Export Contacts List [GET]

+ Parameters
    + filename: `export.csv` (string, required) - Your export filename.

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Download your file here.",
            "data":{
                "url":"https://rest.clicksend.com/files/22D55AF9-6CF0-476D-A8B3-82A998FD2738?filename=export.csv"
            }
        }

## Remove Duplicate Contacts [/lists/{list_id}/remove-duplicates]

### Remove Duplicate Contacts [PUT]

+ Parameters
    + `list_id`: 439 (required, number) - Your contact list id.


+ Request (application/json)

    + Attributes (object)
        + fields: [] (array, required) - List of Contact's fields to be used for checking.

    + Body

            {
                "fields":[
                    "phone_number",
                    "first_name",
                    "last_name",
                    "fax_number",
                    "address_country"
                ]
            }

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Your list duplicate contacts has been deleted.",
            "data":{
                "deleted":6
            }
        }

## Acceptable Import Fields [/lists/{list_id}/import-fields]

### Get List of Acceptable Import Fields [GET]

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"List of acceptable import fields.",
            "data":[
                {
                    "field":"phone",
                    "label":"Phone"
                },
                {
                    "field":"first_name",
                    "label":"First Name"
                },
                {
                    "field":"last_name",
                    "label":"Last Name"
                },
                {
                    "field":"custom1",
                    "label":"Custom String 1"
                },
                {
                    "field":"custom2",
                    "label":"Custom String 2"
                },
                {
                    "field":"custom3",
                    "label":"Custom String 3"
                },
                {
                    "field":"custom4",
                    "label":"Custom String 4"
                },
                {
                    "field":"fax_number",
                    "label":"Fax Number"
                },
                {
                    "field":"organization_name",
                    "label":"Organization Name"
                },
                {
                    "field":"email",
                    "label":"Email"
                },
                {
                    "field":"address_line_1",
                    "label":"Address Line 1"
                },
                {
                    "field":"address_line_2",
                    "label":"Address Line 2"
                },
                {
                    "field":"address_city",
                    "label":"City"
                },
                {
                    "field":"address_state",
                    "label":"State"
                },
                {
                    "field":"address_postal_code",
                    "label":"Postal Code"
                },
                {
                    "field":"address_country",
                    "label":"Country"
                }
            ]
        }

## CSV Import File Preview [/lists/{list_id}/import-csv-preview]

### Show CSV Import File Preview [POST]
Show first row of the csv import file.

+ Parameters
    + `list_id`: 439 (required, number) - Your contact list id.

+ Request (application/json)

    + Attributes (object)
        + `file_url`: "http://yourdomain.com/5485EA6144/79E8/import.csv" (string, required) - Path to your CSV import file.
    + Body

            {
                "file_url":"http://yourdomain.com/5485EA6144/79E8/import.csv"
            }

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Your file preview.",
            "data":{
                "row":[
                    "61298444214",
                    "John",
                    "Doe 1",
                    "Custom A 1",
                    "Custom B 1",
                    "Custom C 1",
                    "Custom D 1",
                    "61298444214",
                    "Organization 1",
                    "johndoe1@gmail.com",
                    "3842",
                    "Worley Avenue",
                    "Altavista",
                    "VA",
                    "24517",
                    "PH"
                ]
            }
        }

# Group Contact Suggestions

## Contact Suggestions [/contact-suggestions]

### List Contact Suggestions [GET]

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Here are your results.",
            "data":[
                {
                    "contact_id":4,
                    "list_id":429,
                    "phone_number":"+61298444214",
                    "first_name":"John",
                    "last_name":"Doe",
                    "custom_1":"Custom A 1",
                    "custom_2":"Custom B 1",
                    "custom_3":"Custom C 1",
                    "custom_4":"Custom D 1",
                    "date_added":"1462856443",
                    "fax_number":"+61298444214",
                    "organization_name":"Organization 1",
                    "email":"johndoe1@gmail.com",
                    "address_line_1":"3842",
                    "address_line_2":"Worley Avenue",
                    "address_city":"Altavista",
                    "address_state":"VA",
                    "address_postal_code":"24517",
                    "address_country":"AU",
                    "_list_name":"List6eaG4lGIc9"
                },
                {
                    "contact_id":5,
                    "list_id":429,
                    "phone_number":"+61298444214",
                    "first_name":"John",
                    "last_name":"Doe",
                    "custom_1":"Custom A 2",
                    "custom_2":"Custom B 1",
                    "custom_3":"Custom C 1",
                    "custom_4":"Custom D 1",
                    "date_added":"1462856443",
                    "fax_number":"+61298444214",
                    "organization_name":"Organization 1",
                    "email":"johndoe1@gmail.com",
                    "address_line_1":"3842",
                    "address_line_2":"Worley Avenue",
                    "address_city":"Altavista",
                    "address_state":"VA",
                    "address_postal_code":"24517",
                    "address_country":"AU",
                    "_list_name":"List6eaG4lGIc9"
                },
                {
                    "contact_id":6,
                    "list_id":429,
                    "phone_number":"+61298444214",
                    "first_name":"John",
                    "last_name":"Doe",
                    "custom_1":"Custom A 3",
                    "custom_2":"Custom B 1",
                    "custom_3":"Custom C 1",
                    "custom_4":"Custom D 1",
                    "date_added":"1462856443",
                    "fax_number":"+61298444214",
                    "organization_name":"Organization 1",
                    "email":"johndoe1@gmail.com",
                    "address_line_1":"3842",
                    "address_line_2":"Worley Avenue",
                    "address_city":"Altavista",
                    "address_state":"VA",
                    "address_postal_code":"24517",
                    "address_country":"AU",
                    "_list_name":"List6eaG4lGIc9"
                },
                {
                    "contact_id":7,
                    "list_id":429,
                    "phone_number":"+61298444214",
                    "first_name":"John",
                    "last_name":"Doe",
                    "custom_1":"Custom A 4",
                    "custom_2":"Custom B 1",
                    "custom_3":"Custom C 1",
                    "custom_4":"Custom D 1",
                    "date_added":"1462856443",
                    "fax_number":"+61298444214",
                    "organization_name":"Organization 1",
                    "email":"johndoe1@gmail.com",
                    "address_line_1":"3842",
                    "address_line_2":"Worley Avenue",
                    "address_city":"Altavista",
                    "address_state":"VA",
                    "address_postal_code":"24517",
                    "address_country":"AU",
                    "_list_name":"List6eaG4lGIc9"
                },
                {
                    "contact_id":8,
                    "list_id":429,
                    "phone_number":"+61298444214",
                    "first_name":"John",
                    "last_name":"Doe",
                    "custom_1":"Custom A 5",
                    "custom_2":"Custom B 1",
                    "custom_3":"Custom C 1",
                    "custom_4":"Custom D 1",
                    "date_added":"1462856443",
                    "fax_number":"+61298444214",
                    "organization_name":"Organization 1",
                    "email":"johndoe1@gmail.com",
                    "address_line_1":"3842",
                    "address_line_2":"Worley Avenue",
                    "address_city":"Altavista",
                    "address_state":"VA",
                    "address_postal_code":"24517",
                    "address_country":"AU",
                    "_list_name":"List6eaG4lGIc9"
                },
                {
                    "contact_id":9,
                    "list_id":429,
                    "phone_number":"+61298444214",
                    "first_name":"John",
                    "last_name":"Doe",
                    "custom_1":"Custom A 6",
                    "custom_2":"Custom B 1",
                    "custom_3":"Custom C 1",
                    "custom_4":"Custom D 1",
                    "date_added":"1462856443",
                    "fax_number":"+61298444214",
                    "organization_name":"Organization 1",
                    "email":"johndoe1@gmail.com",
                    "address_line_1":"3842",
                    "address_line_2":"Worley Avenue",
                    "address_city":"Altavista",
                    "address_state":"VA",
                    "address_postal_code":"24517",
                    "address_country":"AU",
                    "_list_name":"List6eaG4lGIc9"
                },
                {
                    "contact_id":10,
                    "list_id":429,
                    "phone_number":"+61298444214",
                    "first_name":"John",
                    "last_name":"Doe",
                    "custom_1":"Custom A 7",
                    "custom_2":"Custom B 1",
                    "custom_3":"Custom C 1",
                    "custom_4":"Custom D 1",
                    "date_added":"1462856443",
                    "fax_number":"+61298444214",
                    "organization_name":"Organization 1",
                    "email":"johndoe1@gmail.com",
                    "address_line_1":"3842",
                    "address_line_2":"Worley Avenue",
                    "address_city":"Altavista",
                    "address_state":"VA",
                    "address_postal_code":"24517",
                    "address_country":"AU",
                    "_list_name":"List6eaG4lGIc9"
                },
                {
                    "contact_id":11,
                    "list_id":429,
                    "phone_number":"+61298444214",
                    "first_name":"John",
                    "last_name":"Doe",
                    "custom_1":"Custom A 8",
                    "custom_2":"Custom B 1",
                    "custom_3":"Custom C 1",
                    "custom_4":"Custom D 1",
                    "date_added":"1462856443",
                    "fax_number":"+61298444214",
                    "organization_name":"Organization 1",
                    "email":"johndoe1@gmail.com",
                    "address_line_1":"3842",
                    "address_line_2":"Worley Avenue",
                    "address_city":"Altavista",
                    "address_state":"VA",
                    "address_postal_code":"24517",
                    "address_country":"AU",
                    "_list_name":"List6eaG4lGIc9"
                }
            ]
        }

# Group Contacts

## Contact Collection [/lists/{list_id}/contacts]

### Get all Contacts in a List [GET]

+ Parameters
    + `list_id`: 428 (required, number) - Your contact list id where your contacts belong.

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Here are your data.",
            "data":{
                "total":6,
                "per_page":15,
                "current_page":1,
                "last_page":1,
                "next_page_url":null,
                "prev_page_url":null,
                "from":1,
                "to":6,
                "data":[
                    {
                        "contact_id":552786,
                        "list_id":428,
                        "phone_number":"+16783270696",
                        "first_name":"Ellen",
                        "last_name":"Diaz",
                        "custom_1":"",
                        "custom_2":"",
                        "custom_3":"",
                        "custom_4":"",
                        "date_added":"1436157486",
                        "fax_number":null,
                        "organization_name":null,
                        "email":null,
                        "address_line_1":null,
                        "address_line_2":null,
                        "address_city":null,
                        "address_state":null,
                        "address_postal_code":null,
                        "address_country":null,
                        "_list_name": "List6eaG4lGIc9"
                    },
                    {
                        "contact_id":552787,
                        "list_id":428,
                        "phone_number":"+16783270697",
                        "first_name":"Ellen",
                        "last_name":"Diaz",
                        "custom_1":"",
                        "custom_2":"",
                        "custom_3":"",
                        "custom_4":"",
                        "date_added":"1436157925",
                        "fax_number":null,
                        "organization_name":null,
                        "email":null,
                        "address_line_1":null,
                        "address_line_2":null,
                        "address_city":null,
                        "address_state":null,
                        "address_postal_code":null,
                        "address_country":null,
                        "_list_name": "List6eaG4lGIc9"
                    },
                    {
                        "contact_id":552790,
                        "list_id":428,
                        "phone_number":"+16783271811",
                        "first_name":"Ellen",
                        "last_name":"Diaz",
                        "custom_1":"",
                        "custom_2":"",
                        "custom_3":"",
                        "custom_4":"",
                        "date_added":"1436158227",
                        "fax_number":null,
                        "organization_name":null,
                        "email":null,
                        "address_line_1":null,
                        "address_line_2":null,
                        "address_city":null,
                        "address_state":null,
                        "address_postal_code":null,
                        "address_country":null,
                        "_list_name": "List6eaG4lGIc9"
                    },
                    {
                        "contact_id":552791,
                        "list_id":428,
                        "phone_number":"+16783271975",
                        "first_name":"Ellen",
                        "last_name":"Diaz",
                        "custom_1":"",
                        "custom_2":"",
                        "custom_3":"",
                        "custom_4":"",
                        "date_added":"1436158297",
                        "fax_number":null,
                        "organization_name":null,
                        "email":null,
                        "address_line_1":null,
                        "address_line_2":null,
                        "address_city":null,
                        "address_state":null,
                        "address_postal_code":null,
                        "address_country":null,
                        "_list_name": "List6eaG4lGIc9"
                    },
                    {
                        "contact_id":552789,
                        "list_id":428,
                        "phone_number":"+16783272925",
                        "first_name":"Ellen",
                        "last_name":"Diaz",
                        "custom_1":"",
                        "custom_2":"",
                        "custom_3":"",
                        "custom_4":"",
                        "date_added":"1436158143",
                        "fax_number":null,
                        "organization_name":null,
                        "email":null,
                        "address_line_1":null,
                        "address_line_2":null,
                        "address_city":null,
                        "address_state":null,
                        "address_postal_code":null,
                        "address_country":null,
                        "_list_name": "List6eaG4lGIc9"
                    },
                    {
                        "contact_id":552788,
                        "list_id":428,
                        "phone_number":"+16783273589",
                        "first_name":"Ellen",
                        "last_name":"Diaz",
                        "custom_1":"",
                        "custom_2":"",
                        "custom_3":"",
                        "custom_4":"",
                        "date_added":"1436158047",
                        "fax_number":null,
                        "organization_name":null,
                        "email":null,
                        "address_line_1":null,
                        "address_line_2":null,
                        "address_city":null,
                        "address_state":null,
                        "address_postal_code":null,
                        "address_country":null,
                        "_list_name": "List6eaG4lGIc9"
                    }
                ]
            }
        }


### Create a new contact [POST]

Note that the fields `phone_number`, `fax_number` and email` are all optional; however at least one of them must be specified, otherwise the API call will fail.

+ Parameters
    + `list_id`: 428 (required, number) - Your contact list id where your contact be associated.

+ Request (application/json)

    + Headers

            Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA==

    + Attributes (object)
        + `phone_number`: +16783270696 (string, required) - Contact phone number in E.164 format.
        + `first_name`: Ellen (string, optional) - Contact firstname.
        + `last_name`: Diaz (string, optional) - Contact lastname.
        + custom_1: Custom 1 (string, optional) - Contact custom 1 text.
        + custom_2: Custom 2 (string, optional) - Contact custom 2 text.
        + custom_3: Custom 3 (string, optional) - Contact custom 3 text.
        + custom_4: Custom 4 (string, optional) - Contact custom 4 text.
        + `fax_number`: +16783270696 (string, optional) - Contact fax number.
        + `organization_name`: Awesome Organization (string, optional) - Your organization name.
        + email: ellen@diaz.com (string, optional) - Contact email.
        + `address_line_1`: Block 2 (string, optional) - Contact address line 1.
        + `address_line_2`: Cool Bldg. (string, optional) - Contact address line 2.
        + `address_city`: Nevada (string, optional) - Contact city.
        + `address_state`: Las Vegas (string, optional) - Contact state.
        + `address_postal_code`: 36063 (string, optional) - Contact postal code.
        + `address_country`: US (string, optional) - Contact two-letter country code defined in ISO 3166.

    + Body

                {
                    "phone_number":"+16783270696",
                    "first_name":"Ellen",
                    "last_name":"Diaz",
                    "custom_1":"Custom 1",
                    "custom_2":"Custom 2",
                    "custom_3":"Custom 3",
                    "custom_4":"Custom 4",
                    "fax_number":"+16783270696",
                    "organization_name":"Awesome Organization",
                    "email":"ellen@diaz.com",
                    "address_line_1":"Block 2",
                    "address_line_2":"Cool Bldg.",
                    "address_city":"Nevada",
                    "address_state":"Las Vegas",
                    "address_postal_code":"36063",
                    "address_country":"US"
                }

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"New contact has been created.",
            "data":{
                "contact_id":552802,
                "list_id":428,
                "phone_number":"+16783270696",
                "first_name":"Ellen",
                "last_name":"Diaz",
                "custom_1":"Custom 1",
                "custom_2":"Custom 2",
                "custom_3":"Custom 3",
                "custom_4":"Custom 4",
                "date_added":"1436160803",
                "fax_number":"+16783270696",
                "organization_name":"Awesome Organization",
                "email":"ellen@diaz.com",
                "address_line_1":"Block 2",
                "address_line_2":"Cool Bldg.",
                "address_city":"Nevada",
                "address_state":"Las Vegas",
                "address_postal_code":"36063",
                "address_country":"US",
                "_list_name": "List6eaG4lGIc9"
            }
        }

## Contact [/lists/{list_id}/contacts/{contact_id}]

### Get a specific contact [GET]

+ Parameters
    + `list_id`: 428 (required, number) - Your contact list id you want to access.
    + `contact_id`: 552802 (required, number) - Your contact id you want to access.

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Here are your data.",
            "data":{
                "contact_id":552802,
                "list_id":428,
                "phone_number":"+16783270696",
                "first_name":"Ellen",
                "last_name":"Diaz",
                "custom_1":"Custom 1",
                "custom_2":"Custom 2",
                "custom_3":"Custom 3",
                "custom_4":"Custom 4",
                "date_added":"1436160803",
                "fax_number":"+16783270696",
                "organization_name":"Awesome Organization",
                "email":"ellen@diaz.com",
                "address_line_1":"Block 2",
                "address_line_2":"Cool Bldg.",
                "address_city":"Nevada",
                "address_state":"Las Vegas",
                "address_postal_code":"36063",
                "address_country":"US",
                "_list_name": "List6eaG4lGIc9"
            }
        }

### Update a specific contact [PUT]

+ Parameters
    + `list_id`: 428 (required, number) - Contact list id you want to access.
    + `contact_id`: 552802 (required, number) - Contact id you want to access.

+ Request (application/json)

    + Headers

            Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA==

    + Attributes (object)
        + `phone_number`: +16783275492 (string, optional) - Contact phone number in E.164 format.
        + `first_name`: Ellen (string, optional) - Contact firstname.
        + `last_name`: Diaz (string, optional) - Contact lastname.
        + custom_1: Custom S72oJ9Teba (string, optional) - Contact custom 1 text.
        + custom_2: Custom NvrRJrKWeq (string, optional) - Contact custom 2 text.
        + custom_3: Custom 2ws94p1Dop (string, optional) - Contact custom 3 text.
        + custom_4: Custom Ku0AaIS5xb (string, optional) - Contact custom 4 text.
        + `fax_number`: +16783270696 (string, optional) - Contact fax number.
        + `organization_name`: Awesome Organization (string, optional) - Contact organization name.
        + email: ellen@diaz.com (string, optional) - Contact email.
        + `address_line_1`: Block 6 (string, optional) - Contact address line 1.
        + `address_line_2`: Cool Bldg. (string, optional) - Contact address line 2.
        + `address_city`: Nevada (string, optional) - Contact city.
        + `address_state`: Las Vegas (string, optional) - Contact state.
        + `address_postal_code`: 36063 (string, optional) - Contact postal code.
        + `address_country`: US (string, optional) - Contact two-letter country code defined in ISO 3166.

    + Body

            {
                    "phone_number":"+16783275492",
                    "first_name":"Ellen",
                    "last_name":"Diaz",
                    "custom_1":"Custom S72oJ9Teba",
                    "custom_2":"Custom NvrRJrKWeq",
                    "custom_3":"Custom 2ws94p1Dop",
                    "custom_4":"Custom Ku0AaIS5xb",
                    "fax_number":"+16783276356",
                    "organization_name":"Awesome Organization",
                    "email":"ellen@diaz.com",
                    "address_line_1":"Block 6",
                    "address_line_2":"Cool Bldg.",
                    "address_city":"Nevada",
                    "address_state":"Las Vegas",
                    "address_postal_code":"36063",
                    "address_country":"US"
                }

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Contact #552807 has been updated.",
            "data":{
                "contact_id":552807,
                "list_id":428,
                "phone_number":"+16783275492",
                "first_name":"Ellen",
                "last_name":"Diaz",
                "custom_1":"Custom S72oJ9Teba",
                "custom_2":"Custom NvrRJrKWeq",
                "custom_3":"Custom 2ws94p1Dop",
                "custom_4":"Custom Ku0AaIS5xb",
                "date_added":"1436161955",
                "fax_number":"+16783276356",
                "organization_name":"Awesome Organization",
                "email":"ellen@diaz.com",
                "address_line_1":"Block 6",
                "address_line_2":"Cool Bldg.",
                "address_city":"Nevada",
                "address_state":"Las Vegas",
                "address_postal_code":"36063",
                "address_country":"US",
                "_list_name": "List6eaG4lGIc9"
            }
        }

### Delete a specific contact [DELETE]

+ Parameters
    + `list_id`: 428 (required, number) - Your contact list id you want to access.
    + `contact_id`: 552807 (required, number) - Your contact id you want to access.

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Contact #552807 has been deleted.",
            "data":[

            ]
        }

## Remove Opted Out Contacts [/lists/{list_id}/remove-opted-out-contacts/{opt_out_list_id}]

### Remove Opted Out Contacts [PUT]

+ Parameters
    + `list_id`: 439 (required, number) - Your contact list id.
    + `opt_out_list_id`: 512 (required, number) - Your opt out list id.

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Optout contacts has been deleted.",
            "data":{
                "deleted":6
            }
        }

## Transfer Contact [/lists/{from_list_id}/contacts/{contact_id}/{to_list_id}]

### Transfer a Contact [PUT]
Transfers a specific contact to another list.

+ Parameters
    + `from_list_id`: 428 (required, number) - From list id.
    + `contact_id`: 1 (required, number) - Contact ID.
    + `to_list_id`: 429 (required, number) - To list id.

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Contact #1 has been transferred to List #429",
            "data":{
                "contact_id":1,
                "list_id":429,
                "phone_number":"+61477141888",
                "first_name":"John",
                "last_name":"Doe",
                "custom_1":"Custom 1",
                "custom_2":"Custom 2",
                "custom_3":"Custom 3",
                "custom_4":"Custom 4",
                "date_added":"1456721694",
                "fax_number":"+61477141888",
                "organization_name":"Awesome Company",
                "email":"john@doe.com",
                "address_line_1":"1554 Buffalo Creek Road",
                "address_line_2":null,
                "address_city":"Nashville",
                "address_state":"TN",
                "address_postal_code":"37214",
                "address_country":"US",
                "_list_name": "List6eaG4lGIc9"
            }
        }

# Group Countries

## Country Collection [/countries]

### Get all Countries [GET]

+ Response 200 (application/json)

        {
            "http_code": 200,
            "response_code": "SUCCESS",
            "response_msg": "List of Countries.",
            "data": [
                {
                    "code": "AF",
                    "value": "Afghanistan"
                },
                {
                    "code": "AU",
                    "value": "Australia"
                },
                {
                    "code": "FI",
                    "value": "Finland"
                },
                {
                    "code": "FR",
                    "value": "France"
                },
                {
                    "code": "AE",
                    "value": "United Arab Emirates"
                },
                {
                    "code": "GB",
                    "value": "United Kingdom"
                },
                {
                    "code": "US",
                    "value": "United States of America"
                },
                {
                    "code": "ZW",
                    "value": "Zimbabwe"
                }
            ]
        }

# Group Delivery Issues

## Delivery Issues [/delivery-issues]

### Get Delivery Issues [GET /delivery-issues]

+ Response 200 (application/json)

            {
                "http_code": 200,
                "response_code": "SUCCESS",
                "response_msg": "Here is your result.",
                "data": {
                    "total": 5,
                    "per_page": 15,
                    "current_page": 1,
                    "last_page": 1,
                    "next_page_url": null,
                    "prev_page_url": null,
                    "from": 1,
                    "to": 7,
                    "data": [
                        {
                            "issue_id": 1,
                            "user_id": 3820,
                            "message_id": "B388828B-AD46-4366-8AD3-0305FF5E3FE5",
                            "type": "sms",
                            "description": "this is a test.",
                            "client_comments": null,
                            "support_comments": null,
                            "status": null,
                            "date_added": 1481610495,
                            "resolved": 0,
                            "email_address": "test@user.com"
                        },
                        {
                            "issue_id": 2,
                            "user_id": 3820,
                            "message_id": "90396A38-146B-46C4-A455-675F620C2E05",
                            "type": "sms",
                            "description": "this is a test.",
                            "client_comments": null,
                            "support_comments": null,
                            "status": null,
                            "date_added": 1481610523,
                            "resolved": 0,
                            "email_address": "test@user.com"
                        },
                        {
                            "issue_id": 3,
                            "user_id": 3820,
                            "message_id": "4ECFB6CB-0300-45EC-96E1-5AB189432AF5",
                            "type": "sms",
                            "description": "this is a test.",
                            "client_comments": null,
                            "support_comments": null,
                            "status": null,
                            "date_added": 1481611389,
                            "resolved": 0,
                            "email_address": "test@user.com"
                        },
                        {
                            "issue_id": 4,
                            "user_id": 3820,
                            "message_id": "test",
                            "type": "sms",
                            "description": "this is a test.",
                            "client_comments": null,
                            "support_comments": null,
                            "status": null,
                            "date_added": 1481611467,
                            "resolved": 0,
                            "email_address": "test@user.com"
                        },
                        {
                            "issue_id": 5,
                            "user_id": 3820,
                            "message_id": "test",
                            "type": "SMS",
                            "description": "this is a test.",
                            "client_comments": null,
                            "support_comments": null,
                            "status": null,
                            "date_added": 1481614516,
                            "resolved": 0,
                            "email_address": "test@user.com"
                        }
                    ]
                }
            }

### Create Delivery Issue [POST /delivery-issues]

+ Request (application/json)

    + Attributes (object)
        + `message_id`: `B388828B-AD46-4366-8AD3-0305FF5E3FE5` (string, required) - The message id of the message.
        + type: SMS (string, required) - The type of message, must be one of the following values: `SMS`, `MMS`, `VOICE`, `EMAIL_MARKETING`, `EMAIL_TRANSACTIONAL`, `FAX`, `POST`.
        + description: This is a test (string, required) - The description of the message.
        + `client_comments`: test (string, optional) - The user's comments.
        + `email_address`: `john_doe@user.com` (string, required) - The user's email address.

+ Response 200 (application/json)

            {
                "http_code": 200,
                "response_code": "SUCCESS",
                "response_msg": "Delivery issue has been created.",
                "data": {
                    "issue_id": 9,
                    "user_id": 3820,
                    "message_id": "B388828B-AD46-4366-8AD3-0305FF5E3FE5",
                    "type": "SMS",
                    "description": "this is a test.",
                    "date_added": 1481617579,
                    "email_address": "john_doe@user.com"
                }
            }

# Group Email Marketing

## Allowed From Email Addresses [/email/addresses]

### Get All Allowed Email Addresses [GET]

+ Response 200 (application/json)

        {
            "http_code": 200,
            "response_code": "SUCCESS",
            "response_msg": "Here are your email addresses",
            "data": {
                "total": 2,
                "per_page": 15,
                "current_page": 1,
                "last_page": 1,
                "next_page_url": null,
                "prev_page_url": null,
                "from": 1,
                "to": 2,
                "data": [
                    {
                        "email_address_id": 2,
                        "email_address": "test@user.com",
                        "verified": 1,
                        "date_added": "1447736880"
                    },
                    {
                        "email_address_id": 3,
                        "email_address": "test2@user.com",
                        "verified": 0,
                        "date_added": "1449042967"
                    }
                ]
            }
        }

### Create Allowed Email Address [POST]

+ Request (application/json)

    + Attributes (object)
        + `email_address`: johndoe1@user.com (string, required) - Your email.

        + Body
            {
                "email_address" : "test222@user.com"
            }

+ Response 200 (application/json)

            {
                "http_code": 200,
                "response_code": "SUCCESS",
                "response_msg": "Email address has been created.",
                "data": {
                    "email_address_id": 5,
                    "email_address": "test222@user.com",
                    "verified": 0,
                    "date_added": "1458009394"
                }
            }

### Send Verification Token [PUT /email/address-verify/{email_address_id}/send]
+ Parameters

    + `email_address_id`: 1 (required, number) - The email addess id you want to access.

+ Response 200 (application/json)

            {
                "http_code": 200,
                "response_code": "SUCCESS",
                "response_msg": "Verification email has been sent.",
                "data": null
            }

### Verify Allowed Email Address [PUT /email/address-verify/{email_address_id}/verify/{activation_token}]

+ Parameters

    + `email_address_id`: 5 (required, number) - The email address id you want to access.
    + `activation_token`: 3BD73304-6E8B-4FDB-99A7-7ED08DF97BCC (required, string) - Your activation token.

+ Response 200 (application/json)

            {
                "http_code": 200,
                "response_code": "SUCCESS",
                "response_msg": "Email address verified.",
                "data": {
                    "email_address_id": 5,
                    "email_address": "test222@user.com",
                    "verified": 1,
                    "date_added": "1458009394"
                }
            }

### Delete Allowed Email Address [DELETE /email/addresses/{email_address_id}]

+ Parameters

    + `email_address_id`: 5 (required, number) - The email address you want to access.

+ Response 200 (application/json)

            {
                "http_code": 200,
                "response_code": "SUCCESS",
                "response_msg": "Email address deleted.",
                "data": null
            }

### Get Specific Allowed Email Address [GET /email/addresses/{email_address_id}]

+ Parameters

    + `email_address_id`: 4 (required, number) - The email address you want to access.

+ Response 200 (application/json)

             {
                "http_code": 200,
                "response_code": "SUCCESS",
                "response_msg": "Here is your email address.",
                "data": {
                    "email_address_id": 4,
                    "email_address": "test3@user.com",
                    "verified": 0,
                    "date_added": "1449043066"
                }
             }

## Email Campaigns [/email-campaigns]

### Get All Email Campaigns [GET]

+ Response 200 (application/json)

            {
                "http_code": 200,
                "response_code": "SUCCESS",
                "response_msg": "Here are your email campaigns",
                "data": {
                    "total": 5,
                    "per_page": 15,
                    "current_page": 1,
                    "last_page": 1,
                    "next_page_url": null,
                    "prev_page_url": null,
                    "from": 1,
                    "to": 5,
                    "data": [
                        {
                            "email_campaign_id": 64,
                            "name": "test email",
                            "user_id": 1201,
                            "subaccount_id": 1038,
                            "subject": "My test subject",
                            "list_id": 443,
                            "from_email_address_id": 2,
                            "from_name": "Test name",
                            "template_id": 24,
                            "schedule": "",
                            "status": "Sent",
                            "date_added": "1455586793",
                            "custom_string": "",
                            "send_count": 0,
                            "open_count": 5,
                            "click_count": 0,
                            "hard_bounce_count": 0,
                            "soft_bounce_count": 0,
                            "abuse_count": 0,
                            "unsubscribe_count": 0
                        },
                        {
                            "email_campaign_id": 65,
                            "name": "test email",
                            "user_id": 1201,
                            "subaccount_id": 1038,
                            "subject": "My test subject",
                            "list_id": 443,
                            "from_email_address_id": 2,
                            "from_name": "Test name",
                            "template_id": 24,
                            "schedule": "",
                            "status": "Queued",
                            "date_added": "1455586848",
                            "custom_string": "",
                            "send_count": 0,
                            "open_count": 0,
                            "click_count": 0,
                            "hard_bounce_count": 0,
                            "soft_bounce_count": 0,
                            "abuse_count": 0,
                            "unsubscribe_count": 0
                        }
                    ]
                }
            }

### Get Specific Email Campaign [GET /email-campaigns/{email_campaign_id}]

+ Parameters

    + `email_campaign_id`: 1 (required, number) - The email campaign id you want to access.

+ Response 200 (application/json)

            {
                "http_code": 200,
                "response_code": "SUCCESS",
                "response_msg": "Here is your email campaign.",
                "data": {
                    "email_campaign_id": 64,
                    "name": "test email",
                    "user_id": 1201,
                    "subaccount_id": 1038,
                    "subject": "My test subject",
                    "list_id": 443,
                    "from_email_address_id": 2,
                    "from_name": "Test name",
                    "template_id": 24,
                    "schedule": "",
                    "status": "Sent",
                    "date_added": "1455586793",
                    "custom_string": "",
                    "send_count": 0,
                    "open_count": 5,
                    "click_count": 0,
                    "hard_bounce_count": 0,
                    "soft_bounce_count": 0,
                    "abuse_count": 0,
                    "unsubscribe_count": 0,
                    "body": "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" \"http://www.w3.org/TR/REC-html40/loose.dtd\">\n<html><body><p>This is a test</p></body></html>\n",
                    "body_plain_text": "This is a test"
                }
            }

### Create Email Campaign [POST /email-campaigns/send]

+ Request (application/json)

    + Attributes (object)
        + name: John Doe (required, string) - The name of the sender.
        + subject: Test subject (required, string) - The subject of the email campaign.
        + `from_email_address_id`: 1 (required, number) - The allowed email address id.
        + `from_name`: John Doe (required, string) - The name that will appear on the email.
        + `template_id`: 34 (required, number) - The template id you want to use.
        + `list_id`: 456 (required, number) - The list id you want to access.
        + schedule: 1436174254 (number, optional) - Leave blank for immediate delivery. Your schedule time as a [unix timestamp](http://help.clicksend.com/what-is-a-unix-timestamp).

    + Body

            {
              "name" : "John Doe",
              "subject" : "Lorem Ipsum",
              "from_email_address_id" : 2,
              "from_name" : "From name",
              "template_id" : 31,
              "body" : "<p>This is a test</p>",
              "list_id" : 456
            }

+ Response 200 (application/json)

            {
                "http_code": 200,
                "response_code": "SUCCESS",
                "response_msg": "Email campaign has been created.",
                "data": {
                    "total_count": 6,
                    "total_price": "0.0066",
                    "queued_count": 2,
                    "data": {
                        "email_campaign_id": 69,
                        "name": "John Doe",
                        "user_id": 1201,
                        "subaccount_id": 1038,
                        "subject": "Lorem Ipsum",
                        "list_id": 456,
                        "from_email_address_id": 2,
                        "from_name": "From name",
                        "template_id": 31,
                        "schedule": "",
                        "status": "Queued",
                        "date_added": "1458011424",
                        "custom_string": "",
                        "send_count": 0,
                        "open_count": 0,
                        "click_count": 0,
                        "hard_bounce_count": 0,
                        "soft_bounce_count": 0,
                        "abuse_count": 0,
                        "unsubscribe_count": 0,
                        "body": "<p>This is a test</p>",
                        "body_plain_text": "This is a test"
                    },
                    "currency": {
                        "currency_name_short": "AUD",
                        "currency_prefix_d": "$",
                        "currency_prefix_c": "c",
                        "currency_name_long": "Australian Dollars"
                    }
                }
            }

### Update Email Campaign [PUT /email-campaigns/{email_campaign_id}]

+ Parameters

    + `email_campaign_id`: 1 (required, number) - The email campaign id you want to access.

+ Request (application/json)

    + Attributes (object)

        + name: John Doe (optional, string) - The name of the sender.
        + subject: Test subject (optional, string) - The subject of the email campaign.
        + `from_email_address_id`: 1 (optional, number) - The allowed email address id.
        + `from_name`: John Doe (optional, string) - The name that will appear on the email.
        + `template_id`: 34 (optional, number) - The template id you want to use.
        + `list_id`: 456 (optional, number) - The list id you want to access.
        + schedule: 1436174254 (optional, number) - Leave blank for immediate delivery. Will replace existing schedule (even if left blank). Your schedule time as a [unix timestamp](http://help.clicksend.com/what-is-a-unix-timestamp).

    + Body

            {
              "name" : "John Doe",
              "subject" : "Lorem Ipsum",
              "from_email_address_id" : 2,
              "from_name" : "From name",
              "template_id" : 31,
              "body" : "<p>This is a test</p>",
              "list_id" : 456
            }

+ Response 200 (application/json)

            {
                "http_code": 200,
                "response_code": "SUCCESS",
                "response_msg": "Email campaign has been updated.",
                "data": {
                    "email_campaign_id": 69,
                    "name": "John Doe",
                    "user_id": 1201,
                    "subaccount_id": 1038,
                    "subject": "Lorem Ipsum",
                    "list_id": 456,
                    "from_email_address_id": 2,
                    "from_name": "From name",
                    "template_id": 31,
                    "schedule": "13213213212",
                    "status": "Scheduled",
                    "date_added": "1458011424",
                    "custom_string": "",
                    "send_count": 0,
                    "open_count": 0,
                    "click_count": 0,
                    "hard_bounce_count": 0,
                    "soft_bounce_count": 0,
                    "abuse_count": 0,
                    "unsubscribe_count": 0,
                    "body": "<p>This is a test</p>",
                    "body_plain_text": "This is a test"
                }
            }

### Cancel Email Campaign [PUT /email-campaigns/{email_campaign_id}/cancel]

+ Parameters

    + `email_campaign_id`: 1 (required, number) - The email campaign id you want to cancel.

+ Response 200 (application/json)

            {
                "http_code": 200,
                "response_code": "SUCCESS",
                "response_msg": "Email campaign has been cancelled.",
                "data": {
                    "email_campaign_id": 69,
                    "name": "John Doe",
                    "user_id": 1201,
                    "subaccount_id": 1038,
                    "subject": "Lorem Ipsum",
                    "list_id": 456,
                    "from_email_address_id": 2,
                    "from_name": "From name",
                    "template_id": 31,
                    "schedule": "13213213212",
                    "status": "Cancelled",
                    "date_added": "1458011424",
                    "custom_string": "",
                    "send_count": 0,
                    "open_count": 0,
                    "click_count": 0,
                    "hard_bounce_count": 0,
                    "soft_bounce_count": 0,
                    "abuse_count": 0,
                    "unsubscribe_count": 0,
                    "body": "<p>This is a test</p>",
                    "body_plain_text": "This is a test"
                }
            }

### Calculate Price [POST /email-campaigns/price]

+ Request (application/json)

    + Attributes (object)
        + name: John Doe (required, string) - The name of the sender.
        + subject: Test subject (required, string) - The subject of the email campaign.
        + `from_email_address_id`: 1 (required, number) - The allowed email address id.
        + `from_name`: John Doe (required, string) - The name that will appear on the email.
        + `template_id`: 34 (required, number) - The template id you want to use.
        + `list_id`: 456 (required, number) - The list id you want to access.
        + schedule: 1436174254 (optional, number) - Leave blank for immediate delivery. Your schedule time as a [unix timestamp](http://help.clicksend.com/what-is-a-unix-timestamp).

    + Body

            {
              "name" : "John Doe",
              "subject" : "Lorem Ipsum",
              "from_email_address_id" : 2,
              "from_name" : "From name",
              "template_id" : 31,
              "body" : "<p>This is a test</p>",
              "list_id" : 456
            }

+ Response 200 (application/json)

            {
                "http_code": 200,
                "response_code": "SUCCESS",
                "response_msg": "Total price for email campaign.",
                "data": {
                    "total_count": 6,
                    "total_price": "0.0066",
                    "queued_count": 2,
                    "data": {
                        "name": "John Doe",
                        "subject": "Lorem Ipsum",
                        "from_email_address_id": 2,
                        "from_name": "From name",
                        "template_id": 31,
                        "body": "<p>This is a test</p>",
                        "list_id": 456
                    },
                    "currency": {
                        "currency_name_short": "AUD",
                        "currency_prefix_d": "$",
                        "currency_prefix_c": "c",
                        "currency_name_long": "Australian Dollars"
                    }
                }
            }

### Get Specific Email Campaign History [GET /email-campaigns/{campaign_id}/history]

+ Parameters
    + `campaign_id`: 77 (required, number) - The email campaign id you want to access.

+ Response 200 (application/json)

            {
                "http_code": 200,
                "response_code": "SUCCESS",
                "response_msg": "Here is your result.",
                "data": {
                    "total": 3,
                    "per_page": 15,
                    "current_page": 1,
                    "last_page": 1,
                    "next_page_url": null,
                    "prev_page_url": null,
                    "from": 1,
                    "to": 3,
                    "data": [
                        {
                            "email_campaign_id": 77,
                            "from_name": "test name",
                            "from_address": "4",
                            "to_name": "test2@test.com",
                            "to_address": "test2@test.com",
                            "contact_id": 669105,
                            "subject": "tet subject",
                            "message_id": "7CB3227C-7F8C-4A72-A0CB-36283236D99F",
                            "processed_at": null,
                            "status": "SpamReport",
                            "open_count": 0,
                            "click_count": 0,
                            "hard_bounce_count": 13,
                            "soft_bounce_count": 1
                        },
                        {
                            "email_campaign_id": 77,
                            "from_name": "test name",
                            "from_address": "4",
                            "to_name": "test@test.com",
                            "to_address": "test@test.com",
                            "contact_id": 669104,
                            "subject": "tet subject",
                            "message_id": "603C5349-5A24-40B4-89ED-F7619F7CC8A3",
                            "processed_at": null,
                            "status": null,
                            "open_count": 0,
                            "click_count": 0,
                            "hard_bounce_count": 0,
                            "soft_bounce_count": 0
                        },
                        {
                            "email_campaign_id": 77,
                            "from_name": "test name",
                            "from_address": "4",
                            "to_name": "test2@test.com",
                            "to_address": "test2@test.com",
                            "contact_id": 669105,
                            "subject": "tet subject",
                            "message_id": "5C5C0918-B263-42AA-8B5D-9E8ACECC0C64",
                            "processed_at": null,
                            "status": null,
                            "open_count": 0,
                            "click_count": 0,
                            "hard_bounce_count": 0,
                            "soft_bounce_count": 0
                        }
                    ]
                }
            }

## User Email Templates [/email/templates]

These are your templates which can be edited and saved. You can create an email template by cloning from a Master Template.

### Get All Email Templates [GET /email/templates]

+ Response 200 (application/json)

            {
              "http_code": 200,
              "response_code": "SUCCESS",
              "response_msg": "Here are your email templates.",
              "data": {
                "total": 2,
                "per_page": 15,
                "current_page": 1,
                "last_page": 1,
                "next_page_url": null,
                "prev_page_url": null,
                "from": 1,
                "to": 2,
                "data": [
                  {
                    "template_id": 281,
                    "template_name": "Test"
                  },
                  {
                    "template_id": 290,
                    "template_name": "Minions"
                  }
                ]
              }
            }

### Get Specific Email Template [GET /email/templates/{template_id}]

+ Parameters
    + `template_id`: 291 (number, required) - The email template id.

+ Response 200 (application/json)

        {
            "http_code": 200,
            "response_code": "SUCCESS",
            "response_msg": "Here is your email template.",
            "data": {
                "template_id": 281,
                "template_id_master": 11,
                "template_name": "Test",
                "body": "<div id=\"nb_wrapper\"><!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\"> \n<html xmlns:v=\"urn:schemas-microsoft-com:vml\">\n<head>\n\n   <!-- Define Charset -->\n   ..."
            }
        }





### Create New Email Template from Master Template [POST /email/templates]

+ Request (application/json)

    + Attributes (object)
        + `template_name`: Minions (required, string) - The intended name for the new template.
        + `template_id_master`: 57 (required, number) - The ID of the master template you want to base on.



+ Response 200 (application/json)

        {
            "http_code": 200,
            "response_code": "SUCCESS",
            "response_msg": "New email template has been saved.",
            "data": {
                "template_id": 292,
                "template_id_master": 57,
                "template_name": "new minion template!",
                "body": "<div id=\"nb_wrapper\"><!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"..."
            }
        }

### Update an Email Template [PUT /email/templates/{template_id}]

+ Parameters
    + `template_id`: 291 (number, required) - The id of the template to be updated.

+ Request

    + Headers

            Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA==

    + Attributes (object)
        + `template_name`: Minions (required, string) - The intended name for the new template.
        + body: This is a sample content: Sc0KNWgSMG for this template. (string, required) - Your template body.

    + Body

                {
                    "template_name":"Minions",
                    "body":"This is a sample content: Sc0KNWgSMG for this template."
                }

+ Response 200 (application/json)

        {
            "http_code": 200,
            "response_code": "SUCCESS",
            "response_msg": "Your email template has been updated.",
            "data": {
                "template_id": 281,
                "template_id_master": 11,
                "template_name": "NewTemplate",
                "body": "This is the new body of your template"
            }
        }

### Delete Email Template [DELETE /email/templates/{template_id}]

+ Parameters
    + `template_id`: 25 (required, number) - Your template id.

+ Response 200 (application/json)

        {
          "http_code": 200,
          "response_code": "SUCCESS",
          "response_msg": "Your email template has been deleted.",
          "data": []
        }

## Master Templates [/email/master-templates]

Master templates are templates that you can clone to a User Email Template which lets you edit and save it.

### Get All Master Email Templates [GET /email/master-templates]

+ Response 200 (application/json)

        {
          "http_code": 200,
          "response_code": "SUCCESS",
          "response_msg": "List of Email Master Templates",
          "data": [
            {
              "template_id_master": 57,
              "template_name": "Basic 2",
              "date_added": "1458182912",
              "thumbnail": {
                "small": "https://s3-ap-southeast-2.amazonaws.com/clicksend-api-downloads/_email-marketing/_templates-master/basic2/thumb-small.jpg",
                "large": "https://s3-ap-southeast-2.amazonaws.com/clicksend-api-downloads/_email-marketing/_templates-master/basic2/thumb-large.jpg"
              }
        },
        {
              "template_id_master": 1,
              "template_name": "Minty",
              "date_added": "1445848821",
              "thumbnail": {
                "small": "https://s3-ap-southeast-2.amazonaws.com/clicksend-api-downloads/_email-marketing/_templates-master/minty/thumb-small.jpg",
                "large": "https://s3-ap-southeast-2.amazonaws.com/clicksend-api-downloads/_email-marketing/_templates-master/minty/thumb-large.jpg"
              }
            }
          ]
        }

### Get Specific Master Template [GET /email/master-templates/{template_id}]

+ Parameters
    + `template_id`: 25 (string, required) - Your template id.

+ Response 200 (application/json)

        {
          "http_code": 200,
          "response_code": "SUCCESS",
          "response_msg": "Here is your email template",
          "data": {
            "template_id_master": 57,
            "template_name": "Basic 2",
            "date_added": "1458182912",
            "thumbnail": {
              "small": "https://s3-ap-southeast-2.amazonaws.com/clicksend-api-downloads/_email-marketing/_templates-master/basic2/thumb-small.jpg",
              "large": "https://s3-ap-southeast-2.amazonaws.com/clicksend-api-downloads/_email-marketing/_templates-master/basic2/thumb-large.jpg"
            }
          }
        }


## Master Template Categories [/email/master-templates-categories]

### Get All Master Template Categories [GET]

+ Response 200 (application/json)

        {
            "http_code": 200,
            "response_code": "SUCCESS",
            "response_msg": "List of Email Categories",
            "data": [
                {
                    "category_id": 2,
                    "name": "Alerts/Notificartions"
                },
                {
                    "category_id": 3,
                    "name": "Art"
                },
                {
                    "category_id": 4,
                    "name": "Birthday"
                },
                {
                    "category_id": 23,
                    "name": "Blank Template"
                },
                {
                    "category_id": 5,
                    "name": "Coupons"
                },
                {
                    "category_id": 6,
                    "name": "eCommerce"
                },
                {
                    "category_id": 7,
                    "name": "Education"
                },
                {
                    "category_id": 8,
                    "name": "Events/Reminders"
                },
                {
                    "category_id": 1,
                    "name": "Featured"
                },
                {
                    "category_id": 9,
                    "name": "Fitness"
                },
                {
                    "category_id": 11,
                    "name": "Holiday/Travel"
                },
                {
                    "category_id": 12,
                    "name": "Inspirational"
                },
                {
                    "category_id": 13,
                    "name": "Kids"
                },
                {
                    "category_id": 14,
                    "name": "Music"
                },
                {
                    "category_id": 15,
                    "name": "Newsletters"
                },
                {
                    "category_id": 16,
                    "name": "Non-profit"
                },
                {
                    "category_id": 17,
                    "name": "Photography"
                },
                {
                    "category_id": 18,
                    "name": "Real Estate"
                },
                {
                    "category_id": 10,
                    "name": "Restaurant/Food"
                },
                {
                    "category_id": 21,
                    "name": "Sports"
                },
                {
                    "category_id": 22,
                    "name": "Stationery"
                }
            ]
        }

### Get Specific Email Template Category [GET /email/master-templates-categories/{category_id}]

+ Parameters
    + `category_id`: 25 (string, required) - Your category id.

+ Response 200 (application/json)

        {
          "http_code": 200,
          "response_code": "SUCCESS",
          "response_msg": "List of Email Categories",
          "data": {
            "category_id": 4,
            "name": "Birthday"
          }
        }

### Get All Templates For Category [GET /email/master-templates-categories/{category_id}/master-templates]

+ Parameters
    + `category_id`: 1 (string, required) - Your category id.

+ Response 200 (application/json)

        {
          "http_code": 200,
          "response_code": "SUCCESS",
          "response_msg": "List of Email Templates By Category",
          "data": [
            {
              "template_id_master": 1,
              "category_id": 1,
              "template_name": "Minty",
              "body": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" ...\n                     </tr>\n                  </tbody>\n               </table>\n            </td>\n         </tr>\n      </tbody>\n   </table>\n</body>\n</html>",
              "date_added": "1445848821",
              "thumbnail": {
                "small": "https://s3-ap-southeast-2.amazonaws.com/clicksend-api-downloads/_email-marketing/_templates-master/minty/thumb-small.jpg",
                "large": "https://s3-ap-southeast-2.amazonaws.com/clicksend-api-downloads/_email-marketing/_templates-master/minty/thumb-large.jpg"
              }
            }
          ]
        }

## Upload Image [/email/templates-images]

### Upload Image to Specific Template [POST /email/templates-images/{template_id}]

+ Parameters
    + `template_id`: 1 (string, required) - Your template id.

+ Request (application/json)

    + Attributes
        + image: "image.png" (string, optional) - Uploads your selected image file.
        + url: "url" (string, optional) - Uploads the image from the supplied URL.

    + Body

            {
                "image": "image.png",
                "url" : "http://yourdomain.com/image.png"
            }

+ Response 200 (application/json)

        {
          "http_code": 200,
          "response_code": "SUCCESS",
          "response_msg": "Here is your uploaded image.",
          "data": "https://s3-ap-southeast-2.amazonaws.com/clicksend-api-downloads/_email-marketing/_templates-user/BEC51696-E923-4998-9249-C9B49DB7571A/2056F933-9C64-4E57-AB19-01F65EBB7C0A.png"
        }

# Group Email-to-SMS Allowed Address

## Email-to-SMS Allowed Address [/sms/email-sms]

### List of Email-to-SMS Allowed Address [GET]
Get list of allowed email addresses.

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Here are some data.",
            "data":{
                "total":25,
                "per_page":15,
                "current_page":1,
                "last_page":2,
                "next_page_url":"https://rest.clicksend.com/v3/sms/email-sms/?page=2",
                "prev_page_url":null,
                "from":1,
                "to":15,
                "data":[
                    {
                        "email_address_id":84,
                        "email_address":"my@email.com",
                        "from":"+13523944199"
                    },
                    {
                        "email_address_id":85,
                        "email_address":"my@email.com",
                        "from":"+13523944199"
                    },
                    {
                        "email_address_id":86,
                        "email_address":"my@email.com",
                        "from":"+13523944199"
                    },
                    {
                        "email_address_id":87,
                        "email_address":"my@email.com",
                        "from":"+13523944199"
                    },
                    {
                        "email_address_id":88,
                        "email_address":"my@email.com",
                        "from":"+13523944199"
                    },
                    {
                        "email_address_id":89,
                        "email_address":"my@email.com",
                        "from":"+13523944199"
                    },
                    {
                        "email_address_id":90,
                        "email_address":"my@email.com",
                        "from":"+13523944199"
                    },
                    {
                        "email_address_id":91,
                        "email_address":"my@email.com",
                        "from":"+13523944199"
                    },
                    {
                        "email_address_id":92,
                        "email_address":"my@email.com",
                        "from":"+13523944199"
                    },
                    {
                        "email_address_id":93,
                        "email_address":"*@clickssend.com",
                        "from":"+13523944199"
                    },
                    {
                        "email_address_id":94,
                        "email_address":"my@email.com.com",
                        "from":"+13523944199"
                    },
                    {
                        "email_address_id":95,
                        "email_address":"my@email.com",
                        "from":"+17128848693"
                    },
                    {
                        "email_address_id":96,
                        "email_address":"lOWAW@gmail.com",
                        "from":"+17128848252"
                    },
                    {
                        "email_address_id":97,
                        "email_address":"munPM@gmail.com",
                        "from":"+17128848867"
                    },
                    {
                        "email_address_id":98,
                        "email_address":"XZKK9@gmail.com",
                        "from":"+17128847113"
                    }
                ]
            }
        }


### Create Email to SMS Allowed Address [POST]
Create an allowed email address.

+ Request (application/json)

    + Headers

            Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA==

    + Attributes (object)
        + `email_address`: Cv3p0@gmail.com (string, required) - Your email address.
        + from: +61411111111 (string, optional) - Your sender id - [more info](http://help.clicksend.com/SMS/what-is-a-sender-id-or-sender-number).

    + Body

                {
                    "email_address":"Cv3p0@gmail.com",
                    "from":"+17128845887"
                }

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"New data has been saved.",
            "data":{
                "email_address_id":107,
                "email_address":"Cv3p0@gmail.com",
                "from":"+17128845887"
            }
        }

## Email-to-SMS Allowed Address - Object [/sms/email-sms/{email_address_id}]

### Get specific Email-to-SMS Allowed Address [GET]
Get a specific allowed email address.

+ Parameters
    + `email_address_id`: 113 (number, required) - Your email address id.

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Here are some data.",
            "data":{
                "email_address_id":113,
                "email_address":"RXcMn@gmail.com",
                "from":"+17128843729"
            }
        }

### Update Email-to-SMS Allowed Address [PUT]
Update a specific allowed email address.

+ Parameters
    + `email_address_id`: 107 (number, required) - Your email address id.

+ Request (application/json)

    + Headers

            Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA==

    + Attributes (object)
        + `email_address`: pfvRZ@gmail.com (string, required) - Your email address.
        + from: +61411111111 (string, optional) - Your sender id - [more info](http://help.clicksend.com/SMS/what-is-a-sender-id-or-sender-number).

    + Body

                {
                    "email_address":"pfvRZ@gmail.com",
                    "from":"+17128842283"
                }

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Your data has been updated.",
            "data":{
                "email_address_id":107,
                "email_address":"pfvRZ@gmail.com",
                "from":"+17128842283"
            }
        }

### Delete Email-to-SMS Allowed Address [DELETE]
Delete a specific allowed email address.

+ Parameters
    + `email_address_id`: 107 (number, required) - Your email address id.

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Allowed email address was deleted.",
            "data":[]
        }

# Group Email-to-SMS Stripped Strings

## Stripped Strings [/sms/email-sms-stripped-strings]

### List Stripped Strings [GET /sms/email-sms-stripped-strings]

+ Response 200 (application/json)

        {
            "http_code": 200,
            "response_code": "SUCCESS",
            "response_msg": "Here is your result.",
            "data": {
                "total": 2,
                "per_page": 15,
                "current_page": 1,
                "last_page": 1,
                "next_page_url": null,
                "prev_page_url": null,
                "from": 1,
                "to": 2,
                "data": [
                    {
                        "rule_id": 18,
                        "strip_string": "This is a test1."
                    },
                    {
                        "rule_id": 19,
                        "strip_string": "This is a test2."
                    }
                ]
            }
        }

### Find Specific Stripped String [GET /sms/email-sms-stripped-strings/{rule_id}]

+ Parameters
    + `rule_id`: 18 (required, number) - The rule id you want to access.

+ Response 200 (application/json)

        {
            "http_code": 200,
            "response_code": "SUCCESS",
            "response_msg": "Here is your result.",
            "data": {
                "rule_id": 18,
                "strip_string": "You've received a reply from."
            }
        }

### Create Stripped String [POST /sms/email-sms-stripped-strings]

+ Request (application/json)

    + Attributes (object)
        + `strip_string`: ~~~test~~~ (required, string) - The string that you want to strip from the body of email.

    + Body

            {
                "strip_string" : "~~~test~~~"
            }

+ Response 200 (application/json)

            {
                "http_code": 200,
                "response_code": "SUCCESS",
                "response_msg": "Strip string has been created.",
                "data": {
                    "rule_id": 20,
                    "strip_string": "~~~~test~~~~"
                }
            }

### Update Stripped String [PUT /sms/email-sms-stripped-strings/{rule_id}]

+ Parameters
    + `rule_id`: 20 (required, number) - The rule id you want to access.

+ Request (application/json)

    + Attributes (object)
        + `strip_string`: ~~~test~~~ (optional, string) - The string that you want to strip from the body of email.

    + Body

            {
                "strip_string" : "~~~test1~~~"
            }

+ Response 200 (application/json)

            {
                "http_code": 200,
                "response_code": "SUCCESS",
                "response_msg": "Strip string has been updated.",
                "data": {
                    "rule_id": 20,
                    "strip_string": "~~~~test1~~~~"
                }
            }

### Delete Stripped String [DELETE /sms/email-sms-stripped-strings/{rule_id}]

+ Parameters
    + `rule_id`: 20 (required, number) - The rule id you want to access.

+ Response 200 (application/json)

            {
                "http_code": 200,
                "response_code": "SUCCESS",
                "response_msg": "Strip string has been deleted.",
                "data": true
            }

# Group Fax

# Supported File Types

- Supported file types are listed below. If you need to convert a file to a supported format, it can be first passed to our uploads endpoint: `/uploads?convert=fax`
- This will return a URL to the converted pdf file that can be used in the /fax/send endpoint.
- Contact us to add support for any other file type.

## Documents

| File type | Required to be passed to uploads endpoint first? |
|---|---|
| pdf | No |
| docx | Yes |
| doc | Yes |
| rtf | Yes |

## Send Fax [/fax/send]

### Send Fax [POST]

**Letter File Options**

**Use existing URL**

With this option, you can use an existing URL to a PDF document. For example, you might generate the pdf on your server.

**Upload File to Our Server**

With this option, you can use the `/uploads` endpoint to upload the document. The `/uploads` endpoint returns a URL that can be used in the `/fax/send` endpoint.

+ Request (application/json)
    + Attributes
        + `file_url`: http://server.com/file.pdf (string, required) - Your URL to your PDF file.
        + messages: [] (required, array) - Your messages.
        + source: php (string, optional) - Your method of sending e.g. 'wordpress', 'php', 'c#'.
        + to: +17205963005 (string, required) - Recipient number in E.164 format or local format ([more info](https://help.clicksend.com/SMS/what-format-does-the-recipient-phone-number-need-to-be-in)).
        + `list_id`: 428 (number, optional) - Your list ID if sending to a whole list. Can be used instead of 'to'.
        + from: +61811111111 (string, optional) - Your sender id. Must be a valid fax number.
        + schedule: 1436174254 (number, optional) - Leave blank for immediate delivery. Your schedule time as a [unix timestamp](http://help.clicksend.com/what-is-a-unix-timestamp).
        + `custom_string`: Custom kn0ChLhwn6 (string, optional) - Your reference. Will be passed back with all replies and delivery reports.
        + country: US (string, optional) - Recipient country.
        + `from_email`: email@yourdomain.com (string, optional) - An email address where the reply should be emailed to.


    + Body

            {
                "file_url":"https://s3-ap-southeast-2.amazonaws.com/clicksend-api-downloads/_public/_examples/document.pdf",
                "messages":[
                    {
                        "source":"php",
                        "to":"+61261111111",
                        "schedule":"1436874701",
                        "custom_string":"custom_string",
                        "country":"AF",
                        "from_email":"will@smith.com"
                    },
                    {
                        "source":"php",
                        "to":"+61261111122",
                        "schedule":"1436874701",
                        "custom_string":"custom_string",
                        "country":"AF",
                        "from_email":"john@doe.com"
                    }
                ]
            }

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Fax queued for delivery.",
            "data":{
                "total_price":13.2,
                "total_count":2,
                "queued_count":2,
                "messages":[
                    {
                        "user_id":1,
                        "subaccount_id":1,
                        "list_id":null,
                        "message_id":"5106363A-AF38-4FB9-AF0E-B5FD38F62BDC",
                        "to":"+61261111111",
                        "from":"+61298441484",
                        "carrier":"",
                        "country":"AU",
                        "custom_string":"custom_string",
                        "schedule":"1436874701",
                        "message_pages":0,
                        "message_price":"0.0000",
                        "status_code":null,
                        "status_text":null,
                        "date_added":1457504350,
                        "from_email":"will@smith.com",
                        "status":"SUCCESS"
                    },
                    {
                        "user_id":1,
                        "subaccount_id":1,
                        "list_id":null,
                        "message_id":"6BBEB11E-CAA6-4B04-8537-63619F3D6B37",
                        "to":"+61261111122",
                        "from":"+61298441484",
                        "carrier":"",
                        "country":"AU",
                        "custom_string":"custom_string",
                        "schedule":"1436874701",
                        "message_pages":6,
                        "message_price":"13.2000",
                        "status_code":null,
                        "status_text":null,
                        "date_added":1457504350,
                        "from_email":"john@doe.com",
                        "status":"SUCCESS"
                    }
                ],
                "_currency":{
                    "currency_name_short":"AUD",
                    "currency_prefix_d":"$",
                    "currency_prefix_c":"c",
                    "currency_name_long":"Australian Dollars"
                }
            }
        }

### Calculate Price [POST /fax/price]

+ Request (application/json)
    + Attributes
        + `file_url`: http://server.com/file.pdf (string, required) - Your URL to your PDF file.
        + messages: [] (required, array) - Your messages.
        + source: php (string, optional) - Your method of sending e.g. 'wordpress', 'php', 'c#'.
        + to: +17205963005 (string, required) - Recipient number in E.164 format or local format ([more info](https://help.clicksend.com/SMS/what-format-does-the-recipient-phone-number-need-to-be-in)).
        + `list_id`: 428 (number, optional) - Your list ID if sending to a whole list. Can be used instead of 'to'.
        + from: +61811111111 (string, optional) - Your sender id. Must be a valid fax number.
        + schedule: 1436174254 (number, optional) - Leave blank for immediate delivery. Your schedule time as a [unix timestamp](http://help.clicksend.com/what-is-a-unix-timestamp).
        + `custom_string`: Custom kn0ChLhwn6 (string, optional) - Your reference. Will be passed back with all replies and delivery reports.
        + country: US (string, optional) - Recipient country.
        + `from_email`: email@yourdomain.com (string, optional) - An email address where the reply should be emailed to.


    + Body

            {
                "file_url":"https://s3-ap-southeast-2.amazonaws.com/clicksend-api-downloads/_public/_examples/document.pdf",
                "messages":[
                    {
                        "source":"php",
                        "to":"+61261111111",
                        "schedule":"1436874701",
                        "custom_string":"custom_string",
                        "country":"AF",
                        "from_email":"will@smith.com"
                    },
                    {
                        "source":"php",
                        "to":"+61261111122",
                        "schedule":"1436874701",
                        "custom_string":"custom_string",
                        "country":"AF",
                        "from_email":"john@doe.com"
                    }
                ]
            }

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Fax queued for delivery.",
            "data":{
                "total_price":13.2,
                "total_count":2,
                "queued_count":2,
                "messages":[
                    {
                        "user_id":1,
                        "subaccount_id":1,
                        "list_id":null,
                        "message_id":"5106363A-AF38-4FB9-AF0E-B5FD38F62BDC",
                        "to":"+61261111111",
                        "from":"+61298441484",
                        "carrier":"",
                        "country":"AU",
                        "custom_string":"custom_string",
                        "schedule":"1436874701",
                        "message_pages":0,
                        "message_price":"0.0000",
                        "status_code":null,
                        "status_text":null,
                        "date_added":1457504350,
                        "from_email":"will@smith.com",
                        "status":"SUCCESS"
                    },
                    {
                        "user_id":1,
                        "subaccount_id":1,
                        "list_id":null,
                        "message_id":"6BBEB11E-CAA6-4B04-8537-63619F3D6B37",
                        "to":"+61261111122",
                        "from":"+61298441484",
                        "carrier":"",
                        "country":"AU",
                        "custom_string":"custom_string",
                        "schedule":"1436874701",
                        "message_pages":6,
                        "message_price":"13.2000",
                        "status_code":null,
                        "status_text":null,
                        "date_added":1457504350,
                        "from_email":"john@doe.com",
                        "status":"SUCCESS"
                    }
                ],
                "_currency":{
                    "currency_name_short":"AUD",
                    "currency_prefix_d":"$",
                    "currency_prefix_c":"c",
                    "currency_name_long":"Australian Dollars"
                }
            }
        }

## Fax History [/fax/history]

### Get Fax History [GET /fax/history?date_from={date_from}&date_to={date_to}&q={q}&order_by={order_by}]
Get a list of Fax History.

+ Parameters
    + `date_from`: 1457572619 (optional, number) - Customize result by setting from date (timestsamp)
    + `date_to`: 1457573000 (optional, number) - Customize result by setting to date (timestamp)
    + q: `status:Sent,status_code:201` (optional, string) - Custom query
    + `order_by`: `subject:desc` (optional, string) - Order result by

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Here is your history.",
            "data":{
                "total":2,
                "per_page":15,
                "current_page":1,
                "last_page":1,
                "next_page_url":null,
                "prev_page_url":null,
                "from":1,
                "to":2,
                "data":[
                    {
                        "user_id":1,
                        "subaccount_id":1,
                        "list_id":null,
                        "message_id":"2FDA7622-FC6E-4D21-B335-32FF860D7E19",
                        "to":"+61261111115",
                        "from":"+61267132168",
                        "carrier":"",
                        "country":"AU",
                        "custom_string":"custom_string",
                        "schedule":"1436874701",
                        "message_pages":"6.00",
                        "message_price":"13.2000",
                        "status":"Sent",
                        "status_code":"201",
                        "status_text":"Sent",
                        "date_added":1457572619,
                        "from_email":null,
                        "_file_url":"https://s3-ap-southeast-2.amazonaws.com/clicksend-api-downloads/_public/_examples/document.pdf",
                        "date":null,
                        "_api_username":"username"
                    },
                    {
                        "user_id":1,
                        "subaccount_id":1,
                        "list_id":null,
                        "message_id":"A6A20382-8211-46B9-8F09-E7337AE6626D",
                        "to":"+61261111115",
                        "from":"+61267132168",
                        "carrier":"",
                        "country":"AU",
                        "custom_string":"custom_string",
                        "schedule":"1436874701",
                        "message_pages":"6.00",
                        "message_price":"13.2000",
                        "status":"Queued",
                        "status_code":null,
                        "status_text":null,
                        "date_added":1457586514,
                        "from_email":null,
                        "_file_url":"https://s3-ap-southeast-2.amazonaws.com/clicksend-api-downloads/_public/_examples/document.pdf",
                        "date":null,
                        "_api_username":"username"
                    }
                ]
            }
        }

### Export Fax History [GET /fax/history/export?filename={filename}]

+ Parameters
    + filename: `export.csv` (string, required) - Your export filename.

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Download your file here.",
            "data":{
                "url":"https://rest.clicksend.com/files/22D55AF9-6CF0-476D-A8B3-82A998FD2738?filename=export.csv"
            }
        }

## Delivery Receipts [/fax/receipts]

**Push Delivery Receipts**

If you prefer, we can push message replies to your server as they arrive with us.

1. Log into your account.
2. Click on 'Fax' then 'Settings' tab.
3. Click on the 'Fax Delivery Report Settings' menu.
4. Select 'Forward to URL'.
5. Enter the URL and click 'Save'.


The following variables will be posted to the URL specified:

| Variable | Description |
|---|---|
| `timestamp_send` | Timestamp of the original send request in UNIX format. e.g 1439173980
| `timestamp` | Timestamp of delivery report in UNIX format. e.g 1439173981
| `message_id` | Message ID, returned when originally sending the message.
| `status` | Delivered or Undelivered
| `status_code` | Status code. Refer to 'Fax Delivery Status Codes' in docs.
| `status_text` | Status text.
| `error_code` | Error code.
| `error_text` | Error text.
| `custom_string` | A custom string used when sending the original message.
| `user_id` | The user ID of the user who sent the message.
| `subaccount_id` | The subaccount ID of the user who sent the message.
| `message_type` | 'fax' (constant).


**Pull Delivery Receipts**

Receive delivery reports by polling.
You can poll our server and retrieve delivery reports at a time that suits you.

1. Log into your account.
2. Click on 'Fax' then 'Settings' tab.
3. Click on the 'Fax Delivery Report Settings' menu.
4. Select 'Poll our server' and click 'Save'.

### List of Fax Delivery Receipts [GET]

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Here are your delivery receipts.",
            "data":{
                "total":1,
                "per_page":15,
                "current_page":1,
                "last_page":1,
                "next_page_url":null,
                "prev_page_url":null,
                "from":1,
                "to":1,
                "data":[
                    {
                        "timestamp_send":"1450854013",
                        "timestamp":"1451200622",
                        "message_id":"88AB118E-EB1B-478C-98CE-6C73ABA23F67",
                        "status_code":"Completed",
                        "status_text":"",
                        "error_code":"",
                        "error_text":"",
                        "custom_string":"",
                        "subaccount_id":1,
                        "message_type":"fax"
                    }
                ]
            }
        }

### Get a Specific Fax Delivery Receipt [GET /fax/receipts/{message_id}]

+ Parameters
    + `message_id`: "3FAC74F1-D2AF-479B-8955-6395D561DEF4" (required, number) - Message ID.

+ Response 200 (application/json)

         {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Here is your fax receipt.",
            "data":{
                "user_id":1,
                "subaccount_id":1,
                "list_id":null,
                "message_id":"3FAC74F1-D2AF-479B-8955-6395D561DEF4",
                "to":"+61267132168",
                "from":"+61267132168",
                "carrier":"",
                "country":"AU",
                "custom_string":"custom_string",
                "schedule":"1436874701",
                "message_pages":"1.00",
                "message_price":"1.000000",
                "status":"WaitApproval",
                "status_code":null,
                "status_text":null,
                "date_added":1454394659
            }
        }

### Mark Fax Delivery Receipts as read [PUT /fax/receipts-read]

+ Request (application/json)

    + Attributes (object)
        + `date_before`: 1441958441 (number, optional) - An optional [unix timestamp](http://help.clicksend.com/what-is-a-unix-timestamp) - mark all as read before this timestamp. If not given, all receipts will be marked as read.


    + Body

            {
                "date_before": 1441958441
            }

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Receipts has been marked as read.",
            "data":[]
        }

### Add a Test Delivery Receipt [POST /fax/receipts]

+ Request (application/json)

    + Attributes (object)
        + url: http://yourdomain.com (string, required) - Your URL if using the push option or 'poll' if using the pull option.

    + Body

                {
                    "url":"http://yourdomain.com"
                }

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Receipt has been added",
            "data":{
                "timestamp":"1441958441",
                "message_id":"493FFB41-9733-4641-985F-BD79A067B58F",
                "status_code":"201",
                "status_text":"Success: Message received on handset.",
                "error_code":null,
                "error_text":null,
                "custom_string":null
            }
        }

# Group Forgot Account

## Forgot Username [PUT /forgot-username]

+ Request (application/json)

    + Attributes (object)
        + email: john@doe.com (string, optional) - Your email. This is required if phone_number is not present.
        + `phone_number`: 3523944199 (number, optional) - Your phone number. This is required if email is not present.
        + country: US (string, optional) - Your country. Used to format phone number. This is required if phone_number is not in international-format.

    + Body

                {
                    "phone_number": "3108147982",
                    "country": "US"
                }

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"An email notification has been sent.",
            "data":[]
        }

## Forgot Password [PUT /forgot-password]

+ Request (application/json)

    + Attributes (object)
        + username: 0F6pKiiuca (string, required) - Your username.

    + Body

                {
                    "username": "0F6pKiiuca"
                }

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"An email notification has been sent.",
            "data":[]
        }

## Verify Forgot Password [PUT /forgot-password/verify]

+ Request (application/json)

    + Attributes (object)
        + `subaccount_id`: 54 (number, required) - Your subaccount id.
        + `activation_token`: 9C648BAD EB7F 4E7E 96BC B433140C4F1F (string, required) - Your email activation token.
        + password: 0F6pKiiuca (string, required) - Your new password.

    + Body

                {
                    "subaccount_id": 54,
                    "activation_token": "9C648BAD-EB7F-4E7E-96BC-B433140C4F1F",
                    "password": "0F6pKiiuca"
                }

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Your password has been updated.",
            "data":[]
        }

# Group Geolocation

# What is it?
Geolocation allows you to send an SMS to a handset with a URL in the message. When the user taps on the URL, it sends you their location. You will receive the following information:

- Latitude
- Longitude
- Their full address
- A URL to a Google map with the location marked

# How to use it
To use Geolocation, simply insert the placeholder `(Geolocation)` (including the parenthesis) into an SMS or Email message, and that's it. Our system will handle the placeholder and insert the correct information required to allow geolocation tracking via message.

For more information, see our [help article](https://help.clicksend.com/geolocation/how-does-geolocation-work).

# Group MMS

# How many messages can I send?

## Send MMS Endpoint

You can post **up to 1000 messages** with each API call. You can send to a mix of contacts and contact lists, as long as the total number of recipients is up to 1000. The response contains a status and details for each recipient.

Refer to [**Application Status Codes**](#introduction/application-status-codes) for the possible response message status strings.

# How many characters can I send in a message?

## Standard MMS Message

1500 characters

## Unicode MMS Message

500 characters

If a message is longer the allowed number of characters it will be truncated. If a message contains any characters that aren't in the GSM 03.38 character set, the message type will be treated as unicode. (`https://en.wikipedia.org/wiki/GSM_03.38`)

# Maximum File Size

You can send a single attachment with a size of up to 250 kB. Some older devices can only accept attachments with up to 30 kB.

# Supported File Types

- Supported file types are listed below. If you need to convert a file to a supported format, it can be first passed to our uploads endpoint: `/uploads?convert=mms`
- This will return a URL to the converted image file that can be used in the /mms/send endpoint.
- Contact us to add support for any other file type.

## Images

| File type | Required to be passed to uploads endpoint first? |
|---|---|
| jpg | No |
| gif | No |
| jpeg | Yes |
| png | Yes |
| bmp | Yes |

## Send an MMS [/mms/send]

### Send MMS [POST]

+ Request (application/json)

    + Headers

            Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA==

    + Attributes (object)
        + `media_file`: `http://yourdomain.com/tpLaX6A.gif` (string, required) - Media file you want to send.
        + source: php (string, optional) - Your method of sending e.g. 'wordpress', 'php', 'c#'.
        + to: +17205963005 (string, required) - Recipient number in E.164 format or local format ([more info](https://help.clicksend.com/SMS/what-format-does-the-recipient-phone-number-need-to-be-in)).
        + `list_id`: 428 (number, optional) - Your list ID if sending to a whole list. Can be used instead of 'to'.
        + subject: `This is a subject` (string, required) - Subject line. Maximum 20 characters.
        + body: `Biscuit uv3nlCOjRk croissant chocolate lollipop chocolate muffin.` (string, required) - Your message.
        + from: +61411111111 (string, optional) - The number to send from. Either leave blank or use a ClickSend number only.
        + schedule: 1436174254 (number, optional) - Leave blank for immediate delivery. Your schedule time as a [unix timestamp](http://help.clicksend.com/what-is-a-unix-timestamp).
        + `custom_string`: Custom kn0ChLhwn6 (string, optional) - Your reference. Will be passed back with all replies and delivery reports.
        + country: US (string, optional) - Recipient country.
        + `from_email`: email@yourdomain.com (string, optional) - An email address where the reply should be emailed to. If omitted, the reply will be emailed back to the user who sent the outgoing SMS.

    + Body

                {
                    "media_file":"http://yourdomain.com/tpLaX6A.gif",
                    "messages":[
                       {
                         "source" : "php",
                         "subject": "This is a subject",
                         "from" : "test",
                         "body" : "This is a test body with special character: 英",
                         "to": "+61437111222",
                         "country": "AU"
                       }
                    ]
                }

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Messages queued for delivery.",
            "data":{
                "total_price":19.36,
                "total_count":8,
                "queued_count":8,
                "messages":[
                    {
                        "list_id":429,
                        "contact_id":4,
                        "message_id":"D7A79BF1-4806-43F8-8339-6B9F8385D9A4",
                        "to":"+61298444214",
                        "subject":"This is a subject",
                        "from":"+61298444213",
                        "body":"John This is a test message.",
                        "country":"AU",
                        "custom_string":"",
                        "schedule":"",
                        "message_parts":1,
                        "message_price":"2.4200",
                        "_media_file_url":"https://yourdomain.com/tpLaX6A.gif",
                        "status":"SUCCESS"
                    },
                    {
                        "list_id":429,
                        "contact_id":5,
                        "message_id":"73034A6D-4F90-4DE3-9F9B-64F228A30195",
                        "to":"+61298444214",
                        "subject":"This is a subject",
                        "from":"+61298444213",
                        "body":"John This is a test message.",
                        "country":"AU",
                        "custom_string":"",
                        "schedule":"",
                        "message_parts":1,
                        "message_price":"2.4200",
                        "_media_file_url":"http://yourdomain.com/tpLaX6A.gif",
                        "status":"SUCCESS"
                    },
                    {
                        "list_id":429,
                        "contact_id":6,
                        "message_id":"A1E139C1-3CB0-42C8-A8EC-070BE5FE2D06",
                        "to":"+61298444214",
                        "subject":"This is a subject",
                        "from":"+61298444213",
                        "body":"John This is a test message.",
                        "country":"AU",
                        "custom_string":"",
                        "schedule":"",
                        "message_parts":1,
                        "message_price":"2.4200",
                        "_media_file_url":"http://yourdomain.com/tpLaX6A.gif",
                        "status":"SUCCESS"
                    },
                    {
                        "list_id":429,
                        "contact_id":7,
                        "message_id":"D202B823-C4ED-40F8-8F6E-08BF3EAE24D2",
                        "to":"+61298444214",
                        "subject":"This is a subject",
                        "from":"+61298444213",
                        "body":"John This is a test message.",
                        "country":"AU",
                        "custom_string":"",
                        "schedule":"",
                        "message_parts":1,
                        "message_price":"2.4200",
                        "_media_file_url":"http://yourdomain.com/tpLaX6A.gif",
                        "status":"SUCCESS"
                    },
                    {
                        "list_id":429,
                        "contact_id":8,
                        "message_id":"50469507-2C91-4EB0-A628-DEF8A921D53C",
                        "to":"+61298444214",
                        "subject":"This is a subject",
                        "from":"+61298444213",
                        "body":"John This is a test message.",
                        "country":"AU",
                        "custom_string":"",
                        "schedule":"",
                        "message_parts":1,
                        "message_price":"2.4200",
                        "_media_file_url":"http://yourdomain.com/tpLaX6A.gif",
                        "status":"SUCCESS"
                    },
                    {
                        "list_id":429,
                        "contact_id":9,
                        "message_id":"AFF1D0A3-1BDC-4A4F-8290-1A112579AB88",
                        "to":"+61298444214",
                        "subject":"This is a subject",
                        "from":"+61298444213",
                        "body":"John This is a test message.",
                        "country":"AU",
                        "custom_string":"",
                        "schedule":"",
                        "message_parts":1,
                        "message_price":"2.4200",
                        "_media_file_url":"http://yourdomain.com/tpLaX6A.gif",
                        "status":"SUCCESS"
                    },
                    {
                        "list_id":429,
                        "contact_id":10,
                        "message_id":"81C3CB6D-FD6C-44BF-9542-46FACFC423FB",
                        "to":"+61298444214",
                        "subject":"This is a subject",
                        "from":"+61298444213",
                        "body":"John This is a test message.",
                        "country":"AU",
                        "custom_string":"",
                        "schedule":"",
                        "message_parts":1,
                        "message_price":"2.4200",
                        "_media_file_url":"http://yourdomain.com/tpLaX6A.gif",
                        "status":"SUCCESS"
                    },
                    {
                        "list_id":429,
                        "contact_id":11,
                        "message_id":"55B901D2-38BD-4A3F-839C-E647FC0B4BAB",
                        "to":"+61298444214",
                        "subject":"This is a subject",
                        "from":"+61298444213",
                        "body":"John This is a test message.",
                        "country":"AU",
                        "custom_string":"",
                        "schedule":"",
                        "message_parts":1,
                        "message_price":"2.4200",
                        "_media_file_url":"http://yourdomain.com/tpLaX6A.gif",
                        "status":"SUCCESS"
                    }
                ],
                "_currency":{
                    "currency_name_short":"AUD",
                    "currency_prefix_d":"$",
                    "currency_prefix_c":"c",
                    "currency_name_long":"Australian Dollars"
                }
            }
        }

### Get Price [POST /mms/price]

+ Request (application/json)

    + Headers

            Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA==

    + Attributes (object)
        + `media_file`: `http://yourdomain.com/tpLaX6A.gif` (string, required) - Media file you want to send.
        + source: php (string, optional) - Your method of sending e.g. 'wordpress', 'php', 'c#'.
        + to: +17205963005 (string, required) - Recipient number in E.164 format or local format ([more info](https://help.clicksend.com/SMS/what-format-does-the-recipient-phone-number-need-to-be-in)).
        + `list_id`: 428 (number, optional) - Your list ID if sending to a whole list. Can be used instead of 'to'.
        + subject: `This is a subject` (string, required) - Subject line. Maximum 20 characters.
        + body: `Biscuit uv3nlCOjRk croissant chocolate lollipop chocolate muffin.` (string, required) - Your message.
        + from: +61411111111 (string, optional) - Your sender id - [more info](http://help.clicksend.com/SMS/what-is-a-sender-id-or-sender-number).
        + schedule: 1436174254 (number, optional) - Leave blank for immediate delivery. Your schedule time as a [unix timestamp](http://help.clicksend.com/what-is-a-unix-timestamp).
        + `custom_string`: Custom kn0ChLhwn6 (string, optional) - Your reference. Will be passed back with all replies and delivery reports.
        + country: US (string, optional) - Recipient country.
        + `from_email`: email@yourdomain.com (string, optional) - An email address where the reply should be emailed to. If omitted, the reply will be emailed back to the user who sent the outgoing SMS.

    + Body

                {
                    "media_file":"http://yourdomain.com/tpLaX6A.gif",
                    "messages":[
                       {
                         "source" : "php",
                         "subject": "This is a subject",
                         "from" : "test",
                         "body" : "This is a test body with special character: 英",
                         "to": "+61437111222",
                         "country": "AU"
                       }
                    ]
                }

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Messages queued for delivery.",
            "data":{
                "total_price":19.36,
                "total_count":8,
                "queued_count":8,
                "messages":[
                    {
                        "list_id":429,
                        "contact_id":4,
                        "message_id":"2E7EFEC7-70FE-4E29-8F80-31A2F59003E8",
                        "to":"+61298444214",
                        "subject":"This is a subject",
                        "from":"test",
                        "body":"John This is a test message.",
                        "country":"AU",
                        "custom_string":"",
                        "schedule":"",
                        "message_parts":1,
                        "message_price":"2.4200",
                        "_media_file_url":"http://yourdomain.com/_mms/279FDB02-DC5A-449C-869A-AFB5F0E632B4.gif",
                        "status":"SUCCESS"
                    },
                    {
                        "list_id":429,
                        "contact_id":5,
                        "message_id":"773DE8EE-DF60-46F5-ADCB-1E28AF5B1FED",
                        "to":"+61298444214",
                        "subject":"This is a subject",
                        "from":"test",
                        "body":"John This is a test message.",
                        "country":"AU",
                        "custom_string":"",
                        "schedule":"",
                        "message_parts":1,
                        "message_price":"2.4200",
                        "_media_file_url":"http://yourdomain.com/_mms/279FDB02-DC5A-449C-869A-AFB5F0E632B4.gif",
                        "status":"SUCCESS"
                    },
                    {
                        "list_id":429,
                        "contact_id":6,
                        "message_id":"52774EFE-4310-4202-AE19-71FDD0086B15",
                        "to":"+61298444214",
                        "subject":"This is a subject",
                        "from":"test",
                        "body":"John This is a test message.",
                        "country":"AU",
                        "custom_string":"",
                        "schedule":"",
                        "message_parts":1,
                        "message_price":"2.4200",
                        "_media_file_url":"http://yourdomain.com/_mms/279FDB02-DC5A-449C-869A-AFB5F0E632B4.gif",
                        "status":"SUCCESS"
                    },
                    {
                        "list_id":429,
                        "contact_id":7,
                        "message_id":"97E06BA5-C106-40ED-ABD1-7B6CF4673278",
                        "to":"+61298444214",
                        "subject":"This is a subject",
                        "from":"test",
                        "body":"John This is a test message.",
                        "country":"AU",
                        "custom_string":"",
                        "schedule":"",
                        "message_parts":1,
                        "message_price":"2.4200",
                        "_media_file_url":"http://yourdomain.com/_mms/279FDB02-DC5A-449C-869A-AFB5F0E632B4.gif",
                        "status":"SUCCESS"
                    },
                    {
                        "list_id":429,
                        "contact_id":8,
                        "message_id":"5FB49B3E-FE94-4556-B5C2-5F874211A04E",
                        "to":"+61298444214",
                        "subject":"This is a subject",
                        "from":"test",
                        "body":"John This is a test message.",
                        "country":"AU",
                        "custom_string":"",
                        "schedule":"",
                        "message_parts":1,
                        "message_price":"2.4200",
                        "_media_file_url":"http://yourdomain.com/_mms/279FDB02-DC5A-449C-869A-AFB5F0E632B4.gif",
                        "status":"SUCCESS"
                    },
                    {
                        "list_id":429,
                        "contact_id":9,
                        "message_id":"AFAC3FCA-B05F-43E5-967F-9F78E206C2C7",
                        "to":"+61298444214",
                        "subject":"This is a subject",
                        "from":"test",
                        "body":"John This is a test message.",
                        "country":"AU",
                        "custom_string":"",
                        "schedule":"",
                        "message_parts":1,
                        "message_price":"2.4200",
                        "_media_file_url":"http://yourdomain.com/_mms/279FDB02-DC5A-449C-869A-AFB5F0E632B4.gif",
                        "status":"SUCCESS"
                    },
                    {
                        "list_id":429,
                        "contact_id":10,
                        "message_id":"E7C11ECB-FC96-42C1-83F9-3AA106D1A183",
                        "to":"+61298444214",
                        "subject":"This is a subject",
                        "from":"test",
                        "body":"John This is a test message.",
                        "country":"AU",
                        "custom_string":"",
                        "schedule":"",
                        "message_parts":1,
                        "message_price":"2.4200",
                        "_media_file_url":"http://yourdomain.com/_mms/279FDB02-DC5A-449C-869A-AFB5F0E632B4.gif",
                        "status":"SUCCESS"
                    },
                    {
                        "list_id":429,
                        "contact_id":11,
                        "message_id":"D84AD2E9-DE92-46E0-8A9B-14509496E644",
                        "to":"+61298444214",
                        "subject":"This is a subject",
                        "from":"test",
                        "body":"John This is a test message.",
                        "country":"AU",
                        "custom_string":"",
                        "schedule":"",
                        "message_parts":1,
                        "message_price":"2.4200",
                        "_media_file_url":"http://yourdomain.com/_mms/279FDB02-DC5A-449C-869A-AFB5F0E632B4.gif",
                        "status":"SUCCESS"
                    }
                ],
                "_currency":{
                    "currency_name_short":"AUD",
                    "currency_prefix_d":"$",
                    "currency_prefix_c":"c",
                    "currency_name_long":"Australian Dollars"
                }
            }
        }

## MMS History [/mms/history?q={q}&order_by={order_by}&date_from={date_from}&date_to={date_to}]

### Get MMS History [GET /mms/history?q={q}&order_by={order_by}&date_from={date_from}&date_to={date_to}]

+ Parameters
    + q: `list_id:429,direction:out` (string, optional) - A custom query.
    + `order_by`: `subject:desc` (string, optional) - Sort records by.
    + `date_from`: 1443501617 (int, optional) - [Unix timestamp](http://help.clicksend.com/what-is-a-unix-timestamp) (from) used to show records by date.
    + `date_to`: 1443501727 (int, optional) - [Unix timestamp](http://help.clicksend.com/what-is-a-unix-timestamp) (to) used to show records by date.

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Here is your history.",
            "data":{
                "total":31,
                "per_page":15,
                "current_page":1,
                "last_page":3,
                "next_page_url":"/?page=2",
                "prev_page_url":null,
                "from":1,
                "to":15,
                "data":[
                    {
                        "user_id":1,
                        "subaccount_id":1,
                        "list_id":429,
                        "contact_id":7,
                        "message_id":"2453E085-C1F8-47EC-AD35-B793960B1313",
                        "direction":"out",
                        "to":"+61298444214",
                        "subject":"This is a subject",
                        "from":"+61298444213",
                        "body":"John This is a test message.",
                        "carrier":"",
                        "country":"AU",
                        "custom_string":"",
                        "schedule":"1467356623",
                        "from_email":null,
                        "message_parts":"1.00",
                        "message_price":"2.4200",
                        "priority":10,
                        "status":"Failed",
                        "status_code":"301",
                        "status_text":"Unable to process your MMS for sending.",
                        "date_added":1467356623,
                        "_media_file_url":"http://yourdomain.com/_mms/2D789145-3E66-4038-9BA5-EF3DEEE82386.gif",
                        "_api_username":"my_api_username"
                    },
                    {
                        "user_id":1,
                        "subaccount_id":1,
                        "list_id":429,
                        "contact_id":8,
                        "message_id":"54889DC7-A840-4A21-A977-EBE8C51FC2F8",
                        "direction":"out",
                        "to":"+61298444214",
                        "subject":"This is a subject",
                        "from":"+61298444213",
                        "body":"John This is a test message.",
                        "carrier":"",
                        "country":"AU",
                        "custom_string":"",
                        "schedule":"1467356623",
                        "from_email":null,
                        "message_parts":"1.00",
                        "message_price":"2.4200",
                        "priority":10,
                        "status":"Queued:WaitSend",
                        "status_code":null,
                        "status_text":null,
                        "date_added":1467356623,
                        "_media_file_url":"http://yourdomain.com/_mms/2D789145-3E66-4038-9BA5-EF3DEEE82386.gif",
                        "_api_username":"my_api_username"
                    },
                    {
                        "user_id":1,
                        "subaccount_id":1,
                        "list_id":429,
                        "contact_id":9,
                        "message_id":"F2E75443-35A4-4300-9D12-E67682E762DB",
                        "direction":"out",
                        "to":"+61298444214",
                        "subject":"This is a subject",
                        "from":"+61298444213",
                        "body":"John This is a test message.",
                        "carrier":"",
                        "country":"AU",
                        "custom_string":"",
                        "schedule":"1467356623",
                        "from_email":null,
                        "message_parts":"1.00",
                        "message_price":"2.4200",
                        "priority":10,
                        "status":"Queued:WaitSend",
                        "status_code":null,
                        "status_text":null,
                        "date_added":1467356623,
                        "_media_file_url":"http://yourdomain.com/_mms/2D789145-3E66-4038-9BA5-EF3DEEE82386.gif",
                        "_api_username":"my_api_username"
                    },
                    {
                        "user_id":1,
                        "subaccount_id":1,
                        "list_id":429,
                        "contact_id":10,
                        "message_id":"26B77CD6-5C98-46C7-A6DF-F76F29B7E09F",
                        "direction":"out",
                        "to":"+61298444214",
                        "subject":"This is a subject",
                        "from":"+61298444213",
                        "body":"John This is a test message.",
                        "carrier":"",
                        "country":"AU",
                        "custom_string":"",
                        "schedule":"1467356623",
                        "from_email":null,
                        "message_parts":"1.00",
                        "message_price":"2.4200",
                        "priority":10,
                        "status":"Queued:WaitSend",
                        "status_code":null,
                        "status_text":null,
                        "date_added":1467356623,
                        "_media_file_url":"http://yourdomain.com/_mms/2D789145-3E66-4038-9BA5-EF3DEEE82386.gif",
                        "_api_username":"my_api_username"
                    },
                    {
                        "user_id":1,
                        "subaccount_id":1,
                        "list_id":429,
                        "contact_id":11,
                        "message_id":"70BAB69D-8EA5-417C-A8EA-7F0D843E30F3",
                        "direction":"out",
                        "to":"+61298444214",
                        "subject":"This is a subject",
                        "from":"+61298444213",
                        "body":"John This is a test message.",
                        "carrier":"",
                        "country":"AU",
                        "custom_string":"",
                        "schedule":"1467356623",
                        "from_email":null,
                        "message_parts":"1.00",
                        "message_price":"2.4200",
                        "priority":10,
                        "status":"Sent",
                        "status_code":"200",
                        "status_text":"Sent",
                        "date_added":1467356623,
                        "_media_file_url":"http://yourdomain.com/_mms/2D789145-3E66-4038-9BA5-EF3DEEE82386.gif",
                        "_api_username":"my_api_username"
                    },
                    {
                        "user_id":1,
                        "subaccount_id":1,
                        "list_id":429,
                        "contact_id":4,
                        "message_id":"42E3C025-FD9D-4C9F-B374-C7DF5337F6AF",
                        "direction":"out",
                        "to":"+61298444214",
                        "subject":"This is a subject",
                        "from":"+61298444213",
                        "body":"John This is a test message.",
                        "carrier":"",
                        "country":"AU",
                        "custom_string":"",
                        "schedule":"1467358732",
                        "from_email":null,
                        "message_parts":"1.00",
                        "message_price":"2.4200",
                        "priority":10,
                        "status":"Queued",
                        "status_code":null,
                        "status_text":null,
                        "date_added":1467358732,
                        "_media_file_url":"http://yourdomain.com/_mms/601D3E45-49FD-4653-B8F7-ED70B5CB9A43.gif",
                        "_api_username":"my_api_username"
                    },
                    {
                        "user_id":1,
                        "subaccount_id":1,
                        "list_id":429,
                        "contact_id":5,
                        "message_id":"218D5034-89A0-4C6C-B8F9-006BEF50B92B",
                        "direction":"out",
                        "to":"+61298444214",
                        "subject":"This is a subject",
                        "from":"+61298444213",
                        "body":"John This is a test message.",
                        "carrier":"",
                        "country":"AU",
                        "custom_string":"",
                        "schedule":"1467358732",
                        "from_email":null,
                        "message_parts":"1.00",
                        "message_price":"2.4200",
                        "priority":10,
                        "status":"Queued",
                        "status_code":null,
                        "status_text":null,
                        "date_added":1467358732,
                        "_media_file_url":"http://yourdomain.com/_mms/601D3E45-49FD-4653-B8F7-ED70B5CB9A43.gif",
                        "_api_username":"my_api_username"
                    },
                    {
                        "user_id":1,
                        "subaccount_id":1,
                        "list_id":429,
                        "contact_id":6,
                        "message_id":"EFCF9FAA-1BCA-4C58-884A-257C0D87124E",
                        "direction":"out",
                        "to":"+61298444214",
                        "subject":"This is a subject",
                        "from":"+61298444213",
                        "body":"John This is a test message.",
                        "carrier":"",
                        "country":"AU",
                        "custom_string":"",
                        "schedule":"1467358732",
                        "from_email":null,
                        "message_parts":"1.00",
                        "message_price":"2.4200",
                        "priority":10,
                        "status":"Queued",
                        "status_code":null,
                        "status_text":null,
                        "date_added":1467358732,
                        "_media_file_url":"http://yourdomain.com/_mms/601D3E45-49FD-4653-B8F7-ED70B5CB9A43.gif",
                        "_api_username":"my_api_username"
                    },
                    {
                        "user_id":1,
                        "subaccount_id":1,
                        "list_id":429,
                        "contact_id":7,
                        "message_id":"3E0DC217-7D0F-4C20-A3F2-E3362B938CAF",
                        "direction":"out",
                        "to":"+61298444214",
                        "subject":"This is a subject",
                        "from":"+61298444213",
                        "body":"John This is a test message.",
                        "carrier":"",
                        "country":"AU",
                        "custom_string":"",
                        "schedule":"1467358732",
                        "from_email":null,
                        "message_parts":"1.00",
                        "message_price":"2.4200",
                        "priority":10,
                        "status":"Queued",
                        "status_code":null,
                        "status_text":null,
                        "date_added":1467358732,
                        "_media_file_url":"http://yourdomain.com/_mms/601D3E45-49FD-4653-B8F7-ED70B5CB9A43.gif",
                        "_api_username":"my_api_username"
                    },
                    {
                        "user_id":1,
                        "subaccount_id":1,
                        "list_id":429,
                        "contact_id":8,
                        "message_id":"7827223E-0D73-49A1-95D0-8B85C3F5CC71",
                        "direction":"out",
                        "to":"+61298444214",
                        "subject":"This is a subject",
                        "from":"+61298444213",
                        "body":"John This is a test message.",
                        "carrier":"",
                        "country":"AU",
                        "custom_string":"",
                        "schedule":"1467358732",
                        "from_email":null,
                        "message_parts":"1.00",
                        "message_price":"2.4200",
                        "priority":10,
                        "status":"Queued",
                        "status_code":null,
                        "status_text":null,
                        "date_added":1467358732,
                        "_media_file_url":"http://yourdomain.com/_mms/601D3E45-49FD-4653-B8F7-ED70B5CB9A43.gif",
                        "_api_username":"my_api_username"
                    },
                    {
                        "user_id":1,
                        "subaccount_id":1,
                        "list_id":429,
                        "contact_id":9,
                        "message_id":"0D902342-3873-4EE9-A86A-CA1B0B755BBA",
                        "direction":"out",
                        "to":"+61298444214",
                        "subject":"This is a subject",
                        "from":"+61298444213",
                        "body":"John This is a test message.",
                        "carrier":"",
                        "country":"AU",
                        "custom_string":"",
                        "schedule":"1467358732",
                        "from_email":null,
                        "message_parts":"1.00",
                        "message_price":"2.4200",
                        "priority":10,
                        "status":"Queued",
                        "status_code":null,
                        "status_text":null,
                        "date_added":1467358732,
                        "_media_file_url":"http://yourdomain.com/_mms/601D3E45-49FD-4653-B8F7-ED70B5CB9A43.gif",
                        "_api_username":"my_api_username"
                    },
                    {
                        "user_id":1,
                        "subaccount_id":1,
                        "list_id":429,
                        "contact_id":10,
                        "message_id":"0549ADFD-9D70-4B1A-B62F-875A05B481D9",
                        "direction":"out",
                        "to":"+61298444214",
                        "subject":"This is a subject",
                        "from":"+61298444213",
                        "body":"John This is a test message.",
                        "carrier":"",
                        "country":"AU",
                        "custom_string":"",
                        "schedule":"1467358732",
                        "from_email":null,
                        "message_parts":"1.00",
                        "message_price":"2.4200",
                        "priority":10,
                        "status":"Queued",
                        "status_code":null,
                        "status_text":null,
                        "date_added":1467358732,
                        "_media_file_url":"http://yourdomain.com/_mms/601D3E45-49FD-4653-B8F7-ED70B5CB9A43.gif",
                        "_api_username":"my_api_username"
                    },
                    {
                        "user_id":1,
                        "subaccount_id":1,
                        "list_id":429,
                        "contact_id":11,
                        "message_id":"1327677D-D2EF-4442-A0F3-B480C7E94359",
                        "direction":"out",
                        "to":"+61298444214",
                        "subject":"This is a subject",
                        "from":"+61298444213",
                        "body":"John This is a test message.",
                        "carrier":"",
                        "country":"AU",
                        "custom_string":"",
                        "schedule":"1467358732",
                        "from_email":null,
                        "message_parts":"1.00",
                        "message_price":"2.4200",
                        "priority":10,
                        "status":"Queued",
                        "status_code":null,
                        "status_text":null,
                        "date_added":1467358732,
                        "_media_file_url":"http://yourdomain.com/_mms/601D3E45-49FD-4653-B8F7-ED70B5CB9A43.gif",
                        "_api_username":"my_api_username"
                    },
                    {
                        "user_id":1,
                        "subaccount_id":1,
                        "list_id":null,
                        "contact_id":null,
                        "message_id":"42ABDB50-3DAE-41B5-8F48-6F227F38DB2E",
                        "direction":"out",
                        "to":"+61437887633",
                        "subject":"This is a subject",
                        "from":"",
                        "body":"This is a test message.",
                        "carrier":"Telstra",
                        "country":"AU",
                        "custom_string":"",
                        "schedule":"1467363093",
                        "from_email":null,
                        "message_parts":"1.00",
                        "message_price":"2.4200",
                        "priority":10,
                        "status":"Queued",
                        "status_code":null,
                        "status_text":null,
                        "date_added":1467363093,
                        "_media_file_url":"http://yourdomain.com/_mms/C755FD73-AD7A-4EB8-A521-FC10BB37F3B7.gif",
                        "_api_username":"my_api_username"
                    },
                    {
                        "user_id":1,
                        "subaccount_id":1,
                        "list_id":null,
                        "contact_id":null,
                        "message_id":"53271F40-EEB2-4DE9-A525-F0620211A4C9",
                        "direction":"out",
                        "to":"+61437887633",
                        "subject":"This is a subject",
                        "from":"",
                        "body":"This is a test message.",
                        "carrier":"Telstra",
                        "country":"AU",
                        "custom_string":"",
                        "schedule":"1467363210",
                        "from_email":null,
                        "message_parts":"1.00",
                        "message_price":"2.4200",
                        "priority":10,
                        "status":"Queued",
                        "status_code":null,
                        "status_text":null,
                        "date_added":1467363210,
                        "_media_file_url":"http://yourdomain.com/_mms/2289C892-7518-4FBB-9A1C-7C34A93F6328.gif",
                        "_api_username":"my_api_username"
                    }
                ]
            }
        }

### Export MMS History [GET /mms/history/export?filename={filename}]

+ Parameters
    + filename: `export.csv` (string, required) - Your export filename.

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Download your file here.",
            "data":{
                "url":"https://rest.clicksend.com/files/22D55AF9-6CF0-476D-A8B3-82A998FD2738?filename=export.csv"
            }
        }

## Cancel Scheduled Messages [/mms/{message_id}/cancel]

### Cancel MMS [PUT]

+ Parameters
    + `message_id`: `52E3C025-FD9D-4C9F-B374-C7DF5337F6AF` (string, required) - Message ID.

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"MMS has been cancelled.",
            "data":null
        }

### Cancel All MMS [PUT /mms/cancel-all]

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"2 MMS have been cancelled.",
            "data":{
                "count":2
            }
        }

## Delivery Receipts [/mms/receipts]

### Get all Delivery Receipts [GET]

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Here are your delivery receipts.",
            "data":{
                "total":3,
                "per_page":15,
                "current_page":1,
                "last_page":1,
                "next_page_url":null,
                "prev_page_url":null,
                "from":1,
                "to":3,
                "data":[
                    {
                        "timestamp_send":"1450854013",
                        "timestamp":"1451200622",
                        "message_id":"88AB118E-EB1B-478C-98CE-6C73ABA23F67",
                        "status_code":"Completed",
                        "status_text":"",
                        "error_code":"",
                        "error_text":"",
                        "custom_string":"",
                        "subaccount_id":1,
                        "message_type":"mms"
                    },
                    {
                        "timestamp_send":"1450854013",
                        "timestamp":"1451200622",
                        "message_id":"88AB118E-EB1B-478C-98CE-6C73ABA23F67",
                        "status_code":"Completed",
                        "status_text":"",
                        "error_code":"",
                        "error_text":"",
                        "custom_string":"",
                        "subaccount_id":1,
                        "message_type":"mms"
                    },
                    {
                        "timestamp_send":"1450854013",
                        "timestamp":"1451200622",
                        "message_id":"88AB118E-EB1B-478C-98CE-6C73ABA23F67",
                        "status_code":"Completed",
                        "status_text":"",
                        "error_code":"",
                        "error_text":"",
                        "custom_string":"",
                        "subaccount_id":1,
                        "message_type":"mms"
                    }
                ]
            }
        }

### Get Delivery Receipt [GET /mms/receipts/{message_id}]

+ Parameters
    + `message_id`: `3E0DC217-7D0F-4C20-A3F2-E3362B938CAF` (string, required) - Message ID.

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Here is your MMS receipt.",
            "data":{
                "user_id":1,
                "subaccount_id":1,
                "list_id":429,
                "contact_id":7,
                "message_id":"3E0DC217-7D0F-4C20-A3F2-E3362B938CAF",
                "direction":"out",
                "to":"+61298444214",
                "subject":"This is a subject",
                "from":"+61298444213",
                "body":"John This is a test message.",
                "carrier":"",
                "country":"AU",
                "custom_string":"",
                "schedule":"1467358732",
                "from_email":null,
                "message_parts":"1.00",
                "message_price":"2.420000",
                "priority":10,
                "status":"Queued",
                "status_code":null,
                "status_text":null,
                "date_added":1467358732,
                "_media_file_url":"http://yourdomain.com/_mms/601D3E45-49FD-4653-B8F7-ED70B5CB9A43.gif"
            }
        }

### Mark Receipts As Read [PUT /mms/receipts-read]

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Receipts has been marked as read.",
            "data":null
        }

# Inbound MMS [/mms/inbound]

Inbound MMS shares the same rules/settings/endpoints as SMS. Any attachments will be converted to a URL.

**Push Inbound SMS**

If you prefer, we can push message replies to your server as they arrive with us.

Refer to SMS->Inbound SMS in the docs.

**Pull Inbound SMS**

Receive SMS by polling your Inbox.

Refer to SMS->Inbound SMS in the docs.

### Get all Inbound SMS - Pull [GET /sms/inbound]

+ Response 200 (application/json)

        {
        }

# Group Numbers

### Get all Dedicated Numbers [GET /numbers]

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Here are you dedicated numbers.",
            "data":{
                "total":22,
                "per_page":15,
                "current_page":1,
                "last_page":2,
                "next_page_url":"https://rest.clicksend.com/v3/numbers/?page=2",
                "prev_page_url":null,
                "from":1,
                "to":15,
                "data":[
                    {
                        "dedicated_number":"+61481070206",
                        "country":"AU",
                        "price":"18.59",
                        "_country_name":"Australia"
                    },
                    {
                        "dedicated_number":"+61437887639",
                        "country":"AU",
                        "price":"18.59",
                        "_country_name":"Australia"
                    },
                    {
                        "dedicated_number":"+61481070206",
                        "country":"AU",
                        "price":"18.59",
                        "_country_name":"Australia"
                    },
                    {
                        "dedicated_number":"+61287265298",
                        "country":"AU",
                        "price":"18.59",
                        "_country_name":"Australia"
                    },
                    {
                        "dedicated_number":"+19403944918",
                        "country":"US",
                        "price":"26.94",
                        "_country_name":"United States of America"
                    },
                    {
                        "dedicated_number":"+61287265842",
                        "country":"AU",
                        "price":"26.94",
                        "_country_name":"Australia"
                    },
                    {
                        "dedicated_number":"+61287265371",
                        "country":"AU",
                        "price":"26.94",
                        "_country_name":"Australia"
                    },
                    {
                        "dedicated_number":"+61287265372",
                        "country":"AU",
                        "price":"26.94",
                        "_country_name":"Australia"
                    },
                    {
                        "dedicated_number":"+16062191029",
                        "country":"US",
                        "price":"26.94",
                        "_country_name":"United States of America"
                    },
                    {
                        "dedicated_number":"+12282060588",
                        "country":"US",
                        "price":"26.94",
                        "_country_name":"United States of America"
                    },
                    {
                        "dedicated_number":"+12282060587",
                        "country":"US",
                        "price":"26.94",
                        "_country_name":"United States of America"
                    },
                    {
                        "dedicated_number":"+12282060586",
                        "country":"US",
                        "price":"26.94",
                        "_country_name":"United States of America"
                    },
                    {
                        "dedicated_number":"+12282060585",
                        "country":"US",
                        "price":"26.94",
                        "_country_name":"United States of America"
                    },
                    {
                        "dedicated_number":"+12282060584",
                        "country":"US",
                        "price":"26.94",
                        "_country_name":"United States of America"
                    },
                    {
                        "dedicated_number":"+12282060583",
                        "country":"US",
                        "price":"26.94",
                        "_country_name":"United States of America"
                    }
                ],
                "_currency":{
                    "currency_name_short":"USD",
                    "currency_prefix_d":"$",
                    "currency_prefix_c":"¢",
                    "currency_name_long":"US Dollars"
                }
            }
        }

### Buy dedicated number [POST /numbers/buy/{dedicated_number}]

+ Parameters
    + `dedicated_number`: +12282060576 - Your phone number in E.164 format.

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Here is your new number.",
            "data":{
                "dedicated_number":"+12282060576",
                "country":"US",
                "price_total":"8.98",
                "_price_setup":"22.22",
                "_price_monthly":"11.11",
                "_currency":{
                    "currency_name_short":"USD",
                    "currency_prefix_d":"$",
                    "currency_prefix_c":"¢",
                    "currency_name_long":"US Dollars"
                }
            }
        }

### Search Dedicated Numbers by Country [GET /numbers/search/{country}?{search}=1&{search_type}=2]

+ Parameters
    + country: US (string, required) - Your preferred country.
    + search: 88 (string, optional) - Your search pattern or query.
    + `search_type`: 1 (number, optional) - Your strategy for searching, 0 = starts with, 1 = anywhere, 2 = ends with.

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Here are your data.",
            "data":{
                "total":22346,
                "per_page":15,
                "current_page":1,
                "last_page":1490,
                "next_page_url":"/?page=2",
                "prev_page_url":null,
                "from":1,
                "to":15,
                "data":[
                    {
                        "country":"US",
                        "country_name":"United States of America",
                        "dedicated_number":"+12132633745",
                        "price":"26.94",
                        "currency":"USD"
                    },
                    {
                        "country":"US",
                        "country_name":"United States of America",
                        "dedicated_number":"+12134657532",
                        "price":"26.94",
                        "currency":"USD"
                    },
                    {
                        "country":"US",
                        "country_name":"United States of America",
                        "dedicated_number":"+12134657538",
                        "price":"26.94",
                        "currency":"USD"
                    },
                    {
                        "country":"US",
                        "country_name":"United States of America",
                        "dedicated_number":"+13235777962",
                        "price":"26.94",
                        "currency":"USD"
                    },
                    {
                        "country":"US",
                        "country_name":"United States of America",
                        "dedicated_number":"+13235777963",
                        "price":"26.94",
                        "currency":"USD"
                    },
                    {
                        "country":"US",
                        "country_name":"United States of America",
                        "dedicated_number":"+13235777965",
                        "price":"26.94",
                        "currency":"USD"
                    },
                    {
                        "country":"US",
                        "country_name":"United States of America",
                        "dedicated_number":"+13235777967",
                        "price":"26.94",
                        "currency":"USD"
                    },
                    {
                        "country":"US",
                        "country_name":"United States of America",
                        "dedicated_number":"+13235777968",
                        "price":"26.94",
                        "currency":"USD"
                    },
                    {
                        "country":"US",
                        "country_name":"United States of America",
                        "dedicated_number":"+13235777971",
                        "price":"26.94",
                        "currency":"USD"
                    },
                    {
                        "country":"US",
                        "country_name":"United States of America",
                        "dedicated_number":"+13235777973",
                        "price":"26.94",
                        "currency":"USD"
                    },
                    {
                        "country":"US",
                        "country_name":"United States of America",
                        "dedicated_number":"+13235777974",
                        "price":"26.94",
                        "currency":"USD"
                    },
                    {
                        "country":"US",
                        "country_name":"United States of America",
                        "dedicated_number":"+13235777975",
                        "price":"26.94",
                        "currency":"USD"
                    },
                    {
                        "country":"US",
                        "country_name":"United States of America",
                        "dedicated_number":"+13235777976",
                        "price":"26.94",
                        "currency":"USD"
                    },
                    {
                        "country":"US",
                        "country_name":"United States of America",
                        "dedicated_number":"+13235777978",
                        "price":"26.94",
                        "currency":"USD"
                    },
                    {
                        "country":"US",
                        "country_name":"United States of America",
                        "dedicated_number":"+13235777979",
                        "price":"26.94",
                        "currency":"USD"
                    }
                ]
            }
        }

# Group Pricing

### Get Country Pricing [GET /pricing/{country}?currency={currency}]

+ Parameters
    + country: AU (string, required) - Two-letter representation of the country.
    + currency: AUD (string, optional) - Three-letter representation of the currency.

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Price Lists.",
            "data":{
                "country":"AU",
                "sms":{
                    "price_rate_0":"0.0700",
                    "price_rate_1":"0.0650",
                    "price_rate_2":"0.0600",
                    "price_rate_3":"0.0550",
                    "dedicated_number_monthly":"19.0000",
                    "dedicated_number_setup":"20.0000",
                    "dedicated_number_shortcode_monthly":"0.0000",
                    "dedicated_number_shortcode_setup":"0.0000"
                },
                "voice":{
                    "price_landline":"0.0530",
                    "price_mobile":"0.1730"
                },
                "fax":{
                    "price_fax":"0.2000",
                    "dedicated_number_monthly":"30.0000",
                    "dedicated_number_setup":"40.0000"
                },
                "post":{
                    "price_letter_black":"1.2700",
                    "price_letter_colour":"1.4700",
                    "price_letter_page_black":"0.1000",
                    "price_letter_page_colour":"0.2400",
                    "price_letter_large_surcharge":"1.5000",
                    "price_letter_large_surcharge_sheet":"0.0400",
                    "price_direct_mail_dl":"0.1200",
                    "price_direct_mail_a5":"0.1200",
                    "direct_mail_min_quantity":5000
                },
                "email":{
                    "price_rate_0":"0.0100",
                    "price_rate_1":"0.0080",
                    "price_rate_2":"0.0040",
                    "price_rate_3":"0.0010"
                },
                "mms":{
                    "price_mms":"0.4500",
                    "dedicated_number_monthly":"10.0000",
                    "dedicated_number_setup":"20.0000"
                },
                "postcard":{
                    "price_postcard":"10.0000"
                },
                "_currency":{
                    "currency_name_short":"AUD",
                    "currency_prefix_d":"$",
                    "currency_prefix_c":"c",
                    "currency_name_long":"Australian Dollars"
                }
            }
        }


# Group Post Address Detection

## Detect Address [POST /post/letters/detect-address]

The `detect-address` endpoint accepts either a letter in PDF format or an address string and attempts to convert it to a standard address format. Note that the PDF should be in standard address format, having the recipient's name and address listed at the top.

The endpoint accepts two types of data:
1. A PDF file in `base64` encoding. In this case, submit the `base64`-encoded PDF file contents in the `content` field of the request body.
2. An address string. In this case, submit the address in a string using the `address` field of the request body.

+ Request (application/json)

    + Attributes
        + content: `Y29udGVudA==` (required, string) - Your file contents encoded in `base64`.

    + Body

            {
                "content": "Q29udGVudHMgb2YgZmlsZQ=="
            }

+ Response 200 (application/json)

        {
            "http_code": 200,
            "response_code": "SUCCESS",
            "response_msg": "Here is your result.",
            "data": {
                "address_name": "John Doe",
                "address_line_1": "123 Main Street",
                "address_line_2": "",
                "address_city": "Perth",
                "address_state": "WA",
                "address_postal_code": "6000",
                "address_country": "AU"
            }
        }

+ Request (application/json)

    + Attributes
        + address: `John Doe, 123 Main Street, Perth WA 6000` (required, string) - Your file contents encoded in `base64`.

    + Body

            {
                "address": "John Doe, 123 Main Street, Perth WA 6000"
            }

+ Response 200 (application/json)

        {
            "http_code": 200,
            "response_code": "SUCCESS",
            "response_msg": "Here is your result.",
            "data": {
                "address_name": "John Doe",
                "address_line_1": "123 Main Street",
                "address_line_2": "",
                "address_city": "Perth",
                "address_state": "WA",
                "address_postal_code": "6000",
                "address_country": "AU"
            }
        }

# Group Post Direct Mail

## Post Code Search [/post/direct-mail/locations/search/{country}/?q={query}]

### Search Locations [GET]

+ Parameters
    + country: `AD` (required, string) - Country code.
    + query: `AD100` (required, string) - A postal code or place name.

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Here's your result.",
            "data":{
                "total":1,
                "per_page":15,
                "current_page":1,
                "last_page":1,
                "next_page_url":null,
                "prev_page_url":null,
                "from":1,
                "to":1,
                "data":[
                    {
                        "location_id":1,
                        "country_code":"AD",
                        "postal_code":"AD100",
                        "place_name":"Canillo",
                        "admin_name1":"",
                        "admin_code1":"",
                        "admin_name2":"",
                        "admin_code2":"",
                        "admin_name3":"",
                        "admin_code3":"",
                        "latitude":"42.583300",
                        "longitude":"1.666700",
                        "accuracy":6
                    }
                ]
            }
        }

## Direct Mail Campaign [/post/direct-mail/campaigns/send]

## File URLs

For `file_urls` field. You can attach at least 1 and max of 2 PDF file urls.

- Supply a single pdf with 2 pages (front and back)
- Supply 2 urls to seperate PDFs

### Create New Campaign [POST]

Create new direct mail campaign.

+ Request (application/json)

    + Attributes (object)
        + name: `My Campaign` (string, required) - Campaign name.
        + schedule: 1477032023 (number, optional) - Leave blank for immediate delivery. Your schedule time as a [unix timestamp](http://help.clicksend.com/what-is-a-unix-timestamp).
        + source: `wordpress` (string, optional) - Your method of sending e.g. 'wordpress', 'php', 'c#'.
        + size: `A5` (string, required) - Campaign file size. It can be A5 or DL.
        + `file_urls`: [] (array, required) - Campaign file urls. You can submit max 2 file urls.
        + areas: array (array, optional) - List of location where you want to send your campaign, and the quantity per location.

    + Body

            {
                "name":"My Campaign",
                "schedule":1477032023,
                "source":"wordpress",
                "size":"A5",
                "file_urls":[
                    "https://s3-ap-southeast-2.amazonaws.com/clicksend-api-downloads/_public/_examples/a5_front.pdf",
                    "https://s3-ap-southeast-2.amazonaws.com/clicksend-api-downloads/_public/_examples/a5_back.pdf"
                ],
                "areas":[
                    {
                        "location_id":1,
                        "quantity":100
                    },
                    {
                        "location_id":2,
                        "quantity":100
                    },
                    {
                        "location_id":3,
                        "quantity":50
                    }
                ]
            }

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"New direct mail campaign created.",
            "data":{
                "total_price":266.4,
                "total_quantity":30,
                "data":{
                    "campaign_id":80,
                    "user_id":1,
                    "name":"My Campaign",
                    "status":"Scheduled",
                    "date_added":1477291825,
                    "schedule":1477384503,
                    "custom_string":"Custom String",
                    "_areas":[
                        {
                            "campaign_id":80,
                            "location_id":22,
                            "status":"Scheduled",
                            "price":"222.00"
                        },
                        {
                            "campaign_id":80,
                            "location_id":21,
                            "status":"Scheduled",
                            "price":"22.20"
                        },
                        {
                            "campaign_id":80,
                            "location_id":21,
                            "status":"Scheduled",
                            "price":"22.20"
                        }
                    ]
                },
                "currency":{
                    "currency_name_short":"GBP",
                    "currency_prefix_d":"Â£",
                    "currency_prefix_c":"p",
                    "currency_name_long":"British Pounds"
                }
            }
        }

### Calculate Direct Mail Campaign Price [POST /post/direct-mail/campaigns/price]

Calculate direct mail campaign price.

+ Request (application/json)

    + Attributes (object)
        + name: `My Campaign` (string, required) - Campaign name.
        + schedule: 1477032023 (number, optional) - Leave blank for immediate delivery. Your schedule time as a [unix timestamp](http://help.clicksend.com/what-is-a-unix-timestamp).
        + source: `wordpress` (string, optional) - Your method of sending e.g. 'wordpress', 'php', 'c#'.
        + size: `A5` (string, required) - Campaign file size. It can be A5 or DL.
        + `file_urls`: [] (array, required) - Campaign file urls. You can submit max 2 file urls.
        + areas: array (array, optional) - List of location where you want to send your campaign, and the quantity per location.

    + Body

            {
                "name":"My Campaign",
                "schedule":1477384503,
                "source":"My Source",
                "size":"A5",
                "custom_string":"Custom String",
                "file_urls":[
                    "https://s3-ap-southeast-2.amazonaws.com/clicksend-api-downloads/_public/_examples/a5_front.pdf",
                    "https://rest.clicksend.com/files/F3CA1167-381B-47FE-A146-3DF87BE7EEC2.pdf"
                ],
                "areas":[
                    {
                        "location_id":22,
                        "quantity":12
                    },
                    {
                        "location_id":21,
                        "quantity":10
                    },
                    {
                        "location_id":21,
                        "quantity":10
                    }
                ]
            }

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"New direct mail campaign created.",
            "data":{
                "total_price":155.4,
                "total_quantity":32,
                "data":{
                    "user_id":1,
                    "name":"My Campaign",
                    "status":"Queued",
                    "file_name":"79483D26-D9E3-4051-93BB-2B9AFC612F52.pdf",
                    "size":"A5",
                    "date_added":1478141522,
                    "schedule":1478141522,
                    "source":"My Source.rest.v3",
                    "custom_string":"Custom String",
                    "message_id":"C45638E1-62A9-4A31-AABF-E30957151BC5",
                    "_areas":[
                        {
                            "campaign_id":null,
                            "location_id":22,
                            "quantity":12,
                            "status":"Queued",
                            "price":133.2,
                            "place_name":"AUSTRALIA",
                            "country_name":"Australia",
                            "country_code":"AU",
                            "postal_code":"1234"
                        },
                        {
                            "campaign_id":null,
                            "location_id":21,
                            "quantity":10,
                            "status":"Queued",
                            "price":11.1,
                            "place_name":"CANDELARIA",
                            "country_name":"United Kingdom",
                            "country_code":"GB",
                            "postal_code":"1234"
                        },
                        {
                            "campaign_id":null,
                            "location_id":21,
                            "quantity":10,
                            "status":"Queued",
                            "price":11.1,
                            "place_name":"CANDELARIA",
                            "country_name":"United Kingdom",
                            "country_code":"GB",
                            "postal_code":"1234"
                        }
                    ]
                },
                "currency":{
                    "currency_name_short":"GBP",
                    "currency_prefix_d":"Â£",
                    "currency_prefix_c":"p",
                    "currency_name_long":"British Pounds"
                }
            }
        }

### List Direct Mail Campaigns [GET /post/direct-mail/campaigns]

Get list of direct mail campaigns.

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Here are your results.",
            "data":{
                "total":69,
                "per_page":15,
                "current_page":3,
                "last_page":5,
                "next_page_url":"https://rest.clicksend.com/v3/post/direct-mail/campaigns?page=4",
                "prev_page_url":"https://rest.clicksend.com/v3/post/direct-mail/campaigns?page=2",
                "from":31,
                "to":45,
                "data":[
                    {
                        "campaign_id":34,
                        "user_id":1,
                        "name":"My Campaign",
                        "status":null,
                        "date_added":1477040355,
                        "schedule":1477032023,
                        "custom_string":null,
                        "message_id":null,
                        "_total_quantity":"250",
                        "_areas":[
                            {
                                "campaign_id":34,
                                "location_id":1,
                                "quantity":100,
                                "status":null,
                                "price":null
                            },
                            {
                                "campaign_id":34,
                                "location_id":2,
                                "quantity":100,
                                "status":null,
                                "price":null
                            },
                            {
                                "campaign_id":34,
                                "location_id":3,
                                "quantity":50,
                                "status":null,
                                "price":null
                            }
                        ]
                    },
                    {
                        "campaign_id":35,
                        "user_id":1,
                        "name":"My Campaign",
                        "status":null,
                        "date_added":1477040625,
                        "schedule":1477032023,
                        "custom_string":null,
                        "message_id":null,
                        "_total_quantity":"250",
                        "_areas":[
                            {
                                "campaign_id":35,
                                "location_id":1,
                                "quantity":100,
                                "status":null,
                                "price":null
                            },
                            {
                                "campaign_id":35,
                                "location_id":2,
                                "quantity":100,
                                "status":null,
                                "price":null
                            },
                            {
                                "campaign_id":35,
                                "location_id":3,
                                "quantity":50,
                                "status":null,
                                "price":null
                            }
                        ]
                    },
                    {
                        "campaign_id":37,
                        "user_id":1,
                        "name":"My Campaign",
                        "status":null,
                        "date_added":1477040829,
                        "schedule":1477032023,
                        "custom_string":null,
                        "message_id":null,
                        "_total_quantity":0,
                        "_areas":[

                        ]
                    },
                    {
                        "campaign_id":38,
                        "user_id":1,
                        "name":"My Campaign",
                        "status":null,
                        "date_added":1477040843,
                        "schedule":1477032023,
                        "custom_string":null,
                        "message_id":null,
                        "_total_quantity":"250",
                        "_areas":[
                            {
                                "campaign_id":38,
                                "location_id":1,
                                "quantity":100,
                                "status":null,
                                "price":null
                            },
                            {
                                "campaign_id":38,
                                "location_id":2,
                                "quantity":100,
                                "status":null,
                                "price":null
                            },
                            {
                                "campaign_id":38,
                                "location_id":3,
                                "quantity":50,
                                "status":null,
                                "price":null
                            }
                        ]
                    },
                    {
                        "campaign_id":39,
                        "user_id":1,
                        "name":"My Campaign",
                        "status":null,
                        "date_added":1477275714,
                        "schedule":1477032023,
                        "custom_string":null,
                        "message_id":null,
                        "_total_quantity":"250",
                        "_areas":[
                            {
                                "campaign_id":39,
                                "location_id":1,
                                "quantity":100,
                                "status":null,
                                "price":null
                            },
                            {
                                "campaign_id":39,
                                "location_id":2,
                                "quantity":100,
                                "status":null,
                                "price":null
                            },
                            {
                                "campaign_id":39,
                                "location_id":3,
                                "quantity":50,
                                "status":null,
                                "price":null
                            }
                        ]
                    },
                    {
                        "campaign_id":40,
                        "user_id":1,
                        "name":"My Campaign",
                        "status":null,
                        "date_added":1477275760,
                        "schedule":1477032023,
                        "custom_string":"Custom String",
                        "message_id":null,
                        "_total_quantity":"250",
                        "_areas":[
                            {
                                "campaign_id":40,
                                "location_id":1,
                                "quantity":100,
                                "status":null,
                                "price":null
                            },
                            {
                                "campaign_id":40,
                                "location_id":2,
                                "quantity":100,
                                "status":null,
                                "price":null
                            },
                            {
                                "campaign_id":40,
                                "location_id":3,
                                "quantity":50,
                                "status":null,
                                "price":null
                            }
                        ]
                    },
                    {
                        "campaign_id":42,
                        "user_id":1,
                        "name":"My Campaign",
                        "status":null,
                        "date_added":1477276756,
                        "schedule":1477032023,
                        "custom_string":"Custom String",
                        "message_id":null,
                        "_total_quantity":"250",
                        "_areas":[
                            {
                                "campaign_id":42,
                                "location_id":1,
                                "quantity":100,
                                "status":null,
                                "price":null
                            },
                            {
                                "campaign_id":42,
                                "location_id":2,
                                "quantity":100,
                                "status":null,
                                "price":null
                            },
                            {
                                "campaign_id":42,
                                "location_id":3,
                                "quantity":50,
                                "status":null,
                                "price":null
                            }
                        ]
                    },
                    {
                        "campaign_id":43,
                        "user_id":1,
                        "name":"My Campaign",
                        "status":null,
                        "date_added":1477276830,
                        "schedule":1477032023,
                        "custom_string":"Custom String",
                        "message_id":null,
                        "_total_quantity":"250",
                        "_areas":[
                            {
                                "campaign_id":43,
                                "location_id":1,
                                "quantity":100,
                                "status":null,
                                "price":null
                            },
                            {
                                "campaign_id":43,
                                "location_id":2,
                                "quantity":100,
                                "status":null,
                                "price":null
                            },
                            {
                                "campaign_id":43,
                                "location_id":3,
                                "quantity":50,
                                "status":null,
                                "price":null
                            }
                        ]
                    },
                    {
                        "campaign_id":49,
                        "user_id":1,
                        "name":"My Campaign",
                        "status":null,
                        "date_added":1477279662,
                        "schedule":1477032023,
                        "custom_string":"Custom String",
                        "message_id":null,
                        "_total_quantity":"250",
                        "_areas":[
                            {
                                "campaign_id":49,
                                "location_id":1,
                                "quantity":100,
                                "status":null,
                                "price":null
                            },
                            {
                                "campaign_id":49,
                                "location_id":2,
                                "quantity":100,
                                "status":null,
                                "price":null
                            },
                            {
                                "campaign_id":49,
                                "location_id":3,
                                "quantity":50,
                                "status":null,
                                "price":null
                            }
                        ]
                    },
                    {
                        "campaign_id":51,
                        "user_id":1,
                        "name":"My Campaign",
                        "status":null,
                        "date_added":1477279949,
                        "schedule":1477032023,
                        "custom_string":"Custom String",
                        "message_id":null,
                        "_total_quantity":"250",
                        "_areas":[
                            {
                                "campaign_id":51,
                                "location_id":1,
                                "quantity":100,
                                "status":null,
                                "price":null
                            },
                            {
                                "campaign_id":51,
                                "location_id":2,
                                "quantity":100,
                                "status":null,
                                "price":null
                            },
                            {
                                "campaign_id":51,
                                "location_id":3,
                                "quantity":50,
                                "status":null,
                                "price":null
                            }
                        ]
                    },
                    {
                        "campaign_id":52,
                        "user_id":1,
                        "name":"My Campaign",
                        "status":null,
                        "date_added":1477280021,
                        "schedule":1477032023,
                        "custom_string":"Custom String",
                        "message_id":null,
                        "_total_quantity":"250",
                        "_areas":[
                            {
                                "campaign_id":52,
                                "location_id":1,
                                "quantity":100,
                                "status":null,
                                "price":null
                            },
                            {
                                "campaign_id":52,
                                "location_id":2,
                                "quantity":100,
                                "status":null,
                                "price":null
                            },
                            {
                                "campaign_id":52,
                                "location_id":3,
                                "quantity":50,
                                "status":null,
                                "price":null
                            }
                        ]
                    },
                    {
                        "campaign_id":53,
                        "user_id":1,
                        "name":"My Campaign",
                        "status":null,
                        "date_added":1477280780,
                        "schedule":1477032023,
                        "custom_string":"Custom String",
                        "message_id":null,
                        "_total_quantity":"250",
                        "_areas":[
                            {
                                "campaign_id":53,
                                "location_id":1,
                                "quantity":100,
                                "status":null,
                                "price":"222.00"
                            },
                            {
                                "campaign_id":53,
                                "location_id":2,
                                "quantity":100,
                                "status":null,
                                "price":"222.00"
                            },
                            {
                                "campaign_id":53,
                                "location_id":3,
                                "quantity":50,
                                "status":null,
                                "price":"111.00"
                            }
                        ]
                    },
                    {
                        "campaign_id":54,
                        "user_id":1,
                        "name":"My Campaign",
                        "status":null,
                        "date_added":1477281977,
                        "schedule":1477032023,
                        "custom_string":"Custom String",
                        "message_id":null,
                        "_total_quantity":"250",
                        "_areas":[
                            {
                                "campaign_id":54,
                                "location_id":1,
                                "quantity":100,
                                "status":null,
                                "price":"222.00"
                            },
                            {
                                "campaign_id":54,
                                "location_id":2,
                                "quantity":100,
                                "status":null,
                                "price":"222.00"
                            },
                            {
                                "campaign_id":54,
                                "location_id":3,
                                "quantity":50,
                                "status":null,
                                "price":"111.00"
                            }
                        ]
                    },
                    {
                        "campaign_id":55,
                        "user_id":1,
                        "name":"My Campaign",
                        "status":"Queued",
                        "date_added":1477284216,
                        "schedule":1477032023,
                        "custom_string":"Custom String",
                        "message_id":null,
                        "_total_quantity":"250",
                        "_areas":[
                            {
                                "campaign_id":55,
                                "location_id":1,
                                "quantity":100,
                                "status":"Queued",
                                "price":"222.00"
                            },
                            {
                                "campaign_id":55,
                                "location_id":2,
                                "quantity":100,
                                "status":"Queued",
                                "price":"222.00"
                            },
                            {
                                "campaign_id":55,
                                "location_id":3,
                                "quantity":50,
                                "status":"Queued",
                                "price":"111.00"
                            }
                        ]
                    },
                    {
                        "campaign_id":56,
                        "user_id":1,
                        "name":"My Campaign",
                        "status":"Scheduled",
                        "date_added":1477284517,
                        "schedule":1477384503,
                        "custom_string":"Custom String",
                        "message_id":null,
                        "_total_quantity":"250",
                        "_areas":[
                            {
                                "campaign_id":56,
                                "location_id":1,
                                "quantity":100,
                                "status":"Scheduled",
                                "price":"222.00"
                            },
                            {
                                "campaign_id":56,
                                "location_id":2,
                                "quantity":100,
                                "status":"Scheduled",
                                "price":"222.00"
                            },
                            {
                                "campaign_id":56,
                                "location_id":3,
                                "quantity":50,
                                "status":"Scheduled",
                                "price":"111.00"
                            }
                        ]
                    }
                ]
            }
        }

# Group Post Letter

### Send Post Letter [POST /post/letters/send]

**Supported File Types**
We support `pdf`, `docx` and `doc` files. Contact us to add support for any other file type. If you're using `docx` or `doc` files, you'll need to convert the file first using our uploads endpoint with the querystring parameter `convert=post` e.g. `POST /uploads?convert=post`. This will return a URL to the converted pdf file that can be used in the `/post/letters/send` endpoint.

**Letter File Options**

**Use existing URL**

With this option, you can use an existing URL to a `pdf` document. For example, you might generate the `pdf` on your server.

**Upload File to Our Server**

With this option, you can use the `/uploads` endpoint to upload the document. The `/uploads` endpoint returns a URL that can be used in the `/post/letters/send` endpoint.

+ Request (application/json)
    + Attributes
        + `file_url`: http://yourdomain.com/file.pdf (string, required) - Your URL to your PDF file.
        + `template_used`: 1 (number, optional) - Whether you used our template or not ([More Info](http://help.clicksend.com/13996-Post/post-letter-template)).
        + colour: 1 (number, optional) - Is it in colour? 0 = Black and White, 1 = Colour.
        + duplex: 0 (number, optional) - Is it in duplex? 0 = Simplex, 1 = Duplex.
        + priority_post: 0 (number, optional) - Is it priority? 0 = Not Priority, 1 = Priority.
        + recipients (array) - Your recipients.
            + (object)
                + `address_name`: `My Home Address` (string, required) - Address
                + `address_line_1`: `Address 1` (string) - Address line 1
                + `address_line_2`: `Address 2` (string) - Address line 2
                + `address_city`: CITY (string, required) - Address City
                + `address_state`: State (string, optional) - Address State
                + `address_postal_code`: 123456 (number, required) - Post Code
                + `address_country`: AU (string, required) - Two-letter country code defined in ISO 3166
                + `return_address_id`: 1 (number, required) - Return Address ID
                + `custom_string`: Custom kn0ChLhwn6 (string, optional) - Your reference. Will be passed back with all delivery reports.
                + schedule: 1449573604 (number, optional) - Leave blank for immediate delivery. Your schedule time as a [unix timestamp](http://help.clicksend.com/what-is-a-unix-timestamp).

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Letters queued for delivery.",
            "data":{
                "total_price":13.42,
                "total_count":1,
                "queued_count":1,
                "recipients":[
                    {
                        "user_id":1,
                        "subaccount_id":1,
                        "message_id":"A00A1066-BBAE-432B-9B2D-E88969B12C46",
                        "address_name":"John Smith",
                        "address_line_1":"Address 1",
                        "address_line_2":"",
                        "address_city":"CITY",
                        "address_state":"State",
                        "address_postal_code":"123456",
                        "address_country":"AU",
                        "return_address_id":1,
                        "custom_string":"kn0ChLhwn6",
                        "schedule":1449573604,
                        "source":".rest.v3",
                        "colour":1,
                        "duplex":0,
                        "post_pages":7,
                        "post_price":"13.4200",
                        "priority_post": 0,
                        "date_added":1459131623,
                        "status":"SUCCESS",
                        "_file_url":"http://yourdomain.com/file.pdf",
                        "_return_address":{
                            "return_address_id":1,
                            "user_id":1,
                            "address_name":"John Smith",
                            "address_line_1":"Maritime Avenue",
                            "address_line_2":"",
                            "address_city":"Flynn",
                            "address_state":"WA",
                            "address_postal_code":"6302",
                            "address_country":"AU"
                        },
                        "_api_username":"my_api_username"
                    }
                ],
                "_currency":{
                    "currency_name_short":"AUD",
                    "currency_prefix_d":"$",
                    "currency_prefix_c":"c",
                    "currency_name_long":"Australian Dollars"
                }
            }
        }

### Calculate Price [POST /post/letters/price]

+ Request (application/json)
    + Attributes
        + `file_url`: http://yourdomain.com/file.pdf (string, required) - Your URL to your PDF file.
        + `template_used`: 1 (number, optional) - Whether you used our template or not ([More Info](http://help.clicksend.com/13996-Post/post-letter-template)).
        + colour: 1 (number, optional) - Is it in colored?
        + duplex: 0 (number, optional) - Is it in duplex?
        + priority_post: 0 (number, optional) - Is it priority? 0 = Not Priority, 1 = Priority.
        + recipients (array) - Your recipients.
            + (object)
                + `address_name`: `My Home Address` (string, required) - Address
                + `address_line_1`: `Address 1` (string) - Address line 1
                + `address_line_2`: `Address 2` (string) - Address line 2
                + `address_city`: CITY (string, required) - Address City
                + `address_state`: State (string, optional) - Address State
                + `address_postal_code`: 123456 (number, required) - Post Code
                + `address_country`: AU (string, required) - Two-letter country code defined in ISO 3166
                + `return_address_id`: 1 (number, required) - Return Address ID
                + `custom_string`: Custom kn0ChLhwn6 (string, optional) - Your reference. Will be passed back with all delivery reports.
                + schedule: 1449573604 (number, optional) - Leave blank for immediate delivery. Your schedule time as a [unix timestamp](http://help.clicksend.com/what-is-a-unix-timestamp).

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Here are some results.",
            "data":{
                "total_price":1.87,
                "total_cost":1,
                "recipients":[
                    {
                        "user_id":1,
                        "subaccount_id":1,
                        "message_id":"06FAD39C-78FD-4D2F-B606-9846D1979F35",
                        "address_name":"John Smith",
                        "address_line_1":"131",
                        "address_line_2":"Scheuvront Drive",
                        "address_city":"DENVER",
                        "address_state":"CO",
                        "address_postal_code":"80202",
                        "address_country":"AU",
                        "return_address_id":1,
                        "schedule":1449573604,
                        "post_pages":3,
                        "post_price":"1.8700",
                        "priority_post": 0,
                        "date_added":1449662203,
                        "status":"SUCCESS"
                    }
                ]
            }
        }

### Get Post Letter History [GET /post/letters/history]

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Here is your history.",
            "data":{
                "total":6,
                "per_page":15,
                "current_page":1,
                "last_page":1,
                "next_page_url":null,
                "prev_page_url":null,
                "from":1,
                "to":6,
                "data":[
                    {
                        "user_id":1,
                        "subaccount_id":1,
                        "list_id":null,
                        "message_id":"7C0CF79F-F6E0-471D-8CC8-D7AB34A4D423",
                        "address_name":"John Smith",
                        "address_line_1":"130 Scheuvront Drive",
                        "address_line_2":null,
                        "address_city":"DENVER",
                        "address_state":"CO",
                        "address_postal_code":"80202",
                        "address_country":"AU",
                        "return_address_id":4,
                        "custom_string":null,
                        "schedule":null,
                        "source":null,
                        "colour":0,
                        "duplex":0,
                        "post_pages":1,
                        "post_price":"1.100000",
                        "status":"Queued:Stamped",
                        "status_code":"",
                        "status_text":"",
                        "date_added":1447642486
                    },
                    {
                        "user_id":1,
                        "subaccount_id":1,
                        "list_id":null,
                        "message_id":"D7E64413-EE22-4E75-9D7D-1653AE5625CB",
                        "address_name":"John Smith",
                        "address_line_1":"130 Scheuvront Drive",
                        "address_line_2":null,
                        "address_city":"DENVER",
                        "address_state":"CO",
                        "address_postal_code":"80202",
                        "address_country":"AU",
                        "return_address_id":4,
                        "custom_string":null,
                        "schedule":null,
                        "source":null,
                        "colour":0,
                        "duplex":0,
                        "post_pages":1,
                        "post_price":"1.100000",
                        "status":"Queued:Stamped",
                        "status_code":"",
                        "status_text":"",
                        "date_added":1447645676
                    },
                    {
                        "user_id":1,
                        "subaccount_id":1,
                        "list_id":null,
                        "message_id":"0AE161A5-8054-4E4C-B4CC-82E1CAE25D92",
                        "address_name":"John Smith",
                        "address_line_1":"130 Scheuvront Drive",
                        "address_line_2":null,
                        "address_city":"DENVER",
                        "address_state":"CO",
                        "address_postal_code":"80202",
                        "address_country":"AU",
                        "return_address_id":4,
                        "custom_string":null,
                        "schedule":null,
                        "source":null,
                        "colour":0,
                        "duplex":0,
                        "post_pages":1,
                        "post_price":"1.100000",
                        "status":"Queued",
                        "status_code":null,
                        "status_text":null,
                        "date_added":1447742914
                    },
                    {
                        "user_id":1,
                        "subaccount_id":1,
                        "list_id":null,
                        "message_id":"F18B4ECD-7508-4694-814C-BC87028A8AAE",
                        "address_name":"John Smith",
                        "address_line_1":"130 Scheuvront Drive",
                        "address_line_2":null,
                        "address_city":"DENVER",
                        "address_state":"CO",
                        "address_postal_code":"80202",
                        "address_country":"AU",
                        "return_address_id":4,
                        "custom_string":null,
                        "schedule":null,
                        "source":null,
                        "colour":0,
                        "duplex":0,
                        "post_pages":1,
                        "post_price":"1.100000",
                        "status":"Queued",
                        "status_code":null,
                        "status_text":null,
                        "date_added":1447745108
                    },
                    {
                        "user_id":1,
                        "subaccount_id":1,
                        "list_id":null,
                        "message_id":"8849F629-F9DB-499E-B084-5088399A51E9",
                        "address_name":"John Smith",
                        "address_line_1":"130 Scheuvront Drive",
                        "address_line_2":null,
                        "address_city":"DENVER",
                        "address_state":"CO",
                        "address_postal_code":"80202",
                        "address_country":"AU",
                        "return_address_id":4,
                        "custom_string":null,
                        "schedule":null,
                        "source":null,
                        "colour":0,
                        "duplex":0,
                        "post_pages":1,
                        "post_price":"1.100000",
                        "status":"Queued",
                        "status_code":null,
                        "status_text":null,
                        "date_added":1447745144
                    },
                    {
                        "user_id":1,
                        "subaccount_id":1,
                        "list_id":null,
                        "message_id":"3095F46F-8ED2-49A2-B4CC-DC20786A6209",
                        "address_name":"John Smith",
                        "address_line_1":"130 Scheuvront Drive",
                        "address_line_2":null,
                        "address_city":"DENVER",
                        "address_state":"CO",
                        "address_postal_code":"80202",
                        "address_country":"AU",
                        "return_address_id":4,
                        "custom_string":null,
                        "schedule":null,
                        "source":null,
                        "colour":0,
                        "duplex":0,
                        "post_pages":1,
                        "post_price":"1.100000",
                        "status":"Queued",
                        "status_code":null,
                        "status_text":null,
                        "date_added":1447745652
                    }
                ]
            }
        }

### Export Post Letter History [GET /post/letters/history/export?filename={filename}]

+ Parameters
    + filename: `export.csv` (string, required) - Your export filename.

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Download your file here.",
            "data":{
                "url":"https://rest.clicksend.com/files/22D55AF9-6CF0-476D-A8B3-82A998FD2738?filename=export.csv"
            }
        }

## Post Return Address [/post/return-addresses]

### Create a Post Return Address [POST]

+ Request (application/json)

    + Attributes
        + `address_name`: "John Smith" (required, string) - Your address name.
        + `address_line_1`: "Maritime Avenue" (required, string) - Your address line 1.
        + `address_line_2`: "" (optional, string) - Your address line 2.
        + `address_city`: Flynn (required, string) - Your address city.
        + `address_state`: WA (required, string) - Your address state.
        + `address_postal_code`: 6302 (required, number) - Your address postal code.
        + `address_country`: "AU" (required, string) - Two-letter country code defined in ISO 3166.

    + Body

            {
                "address_name":"John Smith",
                "address_line_1":"Maritime Avenue",
                "address_line_2":"",
                "address_city":"Flynn",
                "address_state":"WA",
                "address_postal_code":6302,
                "address_country":"AU"
            }

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"New return address has been added.",
            "data":{
                "return_address_id":14,
                "user_id":1,
                "address_name":"John Smith",
                "address_line_1":"Maritime Avenue",
                "address_line_2":"",
                "address_city":"Flynn",
                "address_state":"WA",
                "address_postal_code":"6302",
                "address_country":"AU"
            }
        }

### Get List of Post Return Addresses [GET]

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Here are your records.",
            "data":{
                "total":10,
                "per_page":15,
                "current_page":1,
                "last_page":1,
                "next_page_url":null,
                "prev_page_url":null,
                "from":1,
                "to":10,
                "data":[
                    {
                        "return_address_id":4,
                        "user_id":1,
                        "address_name":"My Address",
                        "address_line_1":"Maritime Avenue",
                        "address_line_2":"",
                        "address_city":"Flynn",
                        "address_state":"WA",
                        "address_postal_code":"6302",
                        "address_country":"AU"
                    },
                    {
                        "return_address_id":5,
                        "user_id":1,
                        "address_name":"My Address",
                        "address_line_1":"Maritime Avenue",
                        "address_line_2":"",
                        "address_city":"Flynn",
                        "address_state":"WA",
                        "address_postal_code":"6302",
                        "address_country":"AU"
                    },
                    {
                        "return_address_id":6,
                        "user_id":1,
                        "address_name":"My Address",
                        "address_line_1":"Maritime Avenue",
                        "address_line_2":"",
                        "address_city":"Flynn",
                        "address_state":"WA",
                        "address_postal_code":"6302",
                        "address_country":"AU"
                    },
                    {
                        "return_address_id":7,
                        "user_id":1,
                        "address_name":"My Address",
                        "address_line_1":"Maritime Avenue",
                        "address_line_2":"",
                        "address_city":"Flynn",
                        "address_state":"WA",
                        "address_postal_code":"6302",
                        "address_country":"AU"
                    },
                    {
                        "return_address_id":8,
                        "user_id":1,
                        "address_name":"My Address",
                        "address_line_1":"Maritime Avenue",
                        "address_line_2":"",
                        "address_city":"Flynn",
                        "address_state":"WA",
                        "address_postal_code":"6302",
                        "address_country":"AU"
                    },
                    {
                        "return_address_id":9,
                        "user_id":1,
                        "address_name":"My Address",
                        "address_line_1":"Maritime Avenue",
                        "address_line_2":"",
                        "address_city":"Flynn",
                        "address_state":"WA",
                        "address_postal_code":"6302",
                        "address_country":"AU"
                    },
                    {
                        "return_address_id":10,
                        "user_id":1,
                        "address_name":"My Address",
                        "address_line_1":"Maritime Avenue",
                        "address_line_2":"",
                        "address_city":"Flynn",
                        "address_state":"WA",
                        "address_postal_code":"6302",
                        "address_country":"AU"
                    },
                    {
                        "return_address_id":11,
                        "user_id":1,
                        "address_name":"My Address",
                        "address_line_1":"Maritime Avenue",
                        "address_line_2":"",
                        "address_city":"Flynn",
                        "address_state":"WA",
                        "address_postal_code":"6302",
                        "address_country":"AU"
                    },
                    {
                        "return_address_id":12,
                        "user_id":1,
                        "address_name":"My Address",
                        "address_line_1":"Maritime Avenue",
                        "address_line_2":"",
                        "address_city":"Flynn",
                        "address_state":"WA",
                        "address_postal_code":"6302",
                        "address_country":"AU"
                    },
                    {
                        "return_address_id":14,
                        "user_id":1,
                        "address_name":"John Smith",
                        "address_line_1":"Maritime Avenue",
                        "address_line_2":"",
                        "address_city":"Flynn",
                        "address_state":"WA",
                        "address_postal_code":"6302",
                        "address_country":"AU"
                    }
                ]
            }
        }

### Get Post Return Address [GET /post/return-addresses/{return_address_id}]

+ Parameters
    + `return_address_id`: 14 (required, number) - Your return address id.

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Here is your data.",
            "data":{
                "return_address_id":14,
                "user_id":1,
                "address_name":"John Smith",
                "address_line_1":"Maritime Avenue",
                "address_line_2":"",
                "address_city":"Flynn",
                "address_state":"WA",
                "address_postal_code":"6302",
                "address_country":"AU"
            }
        }

### Update Post Return Address [PUT /post/return-addresses/{return_address_id}]

+ Parameters
    + `return_address_id`: 14 (required, number) - Your return address id.

+ Request (application/json)

    + Attributes
        + `address_name`: "John Smith" (required, string) - Your address name.
        + `address_line_1`: "Maritime Avenue" (required, string) - Your address line 1.
        + `address_line_2`: "" (optional, string) - Your address line 2.
        + `address_city`: Flynn (required, string) - Your address city.
        + `address_state`: WA (required, string) - Your address state.
        + `address_postal_code`: 6302 (required, number) - Your address postal code.
        + `address_country`: "AU" (required, string) - Two-letter country code defined in ISO 3166.

    + Body

            {
                "address_name":"John Smith",
                "address_line_1":"Maritime Avenue",
                "address_line_2":"",
                "address_city":"Flynn",
                "address_state":"WA",
                "address_postal_code":6302,
                "address_country":"AU"
            }

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Your return address has been updated.",
            "data":{
                "return_address_id":14,
                "user_id":1,
                "address_name":"John Smith",
                "address_line_1":"Maritime Avenue",
                "address_line_2":"",
                "address_city":"Flynn",
                "address_state":"WA",
                "address_postal_code":6302,
                "address_country":"AU"
            }
        }

### Delete Post Return Address [DELETE /post/return-addresses/{return_address_id}]

+ Parameters
    + `return_address_id`: 12 (required, number) - Your return address id.

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Your return address has been deleted.",
            "data":[

            ]
        }

# Group Postcards

## Send Postcard [POST /post/postcards/send]

**Supported File Types**
We support PDF, docx and doc. Contact us to add support for any other file type. If you're using docx or doc files, you'll need to convert the file first using our uploads endpoint with the querystring parameter ?convert=post. e.g. POST /uploads?convert=post. This will return a URL to the converted pdf file that can be used in the /post/postcards/send endpoint.

**Postcard File Options**

**Use existing URL**

With this option, you can use an existing URL to a PDF document. For example, you might generate the pdf on your server.

For `file_urls` field. You can attach at least 1 and max of 2 PDF file urls.

- Supply a single pdf with 2 pages (front and back)
- Supply 2 urls to seperate PDFs

**Upload File to Our Server**

With this option, you can use the `/uploads` endpoint to upload the document. The `/uploads` endpoint returns a URL that can be used in the `/post/postcards/send` endpoint.


+ Request (application/json)

    + Attributes
        + `file_urls`: [] (array, required) - Postcard file urls. You can submit max 2 file urls.
        + recipients (array, required) - Your recipients.
            + (object)
                + `address_name`: `My Home Address` (string, required) - Address
                + `address_line_1`: `Address 1` (string, required) - Address line 1
                + `address_line_2`: `Address 2` (string, required) - Address line 2
                + `address_city`: CITY (string, required) - Address City
                + `address_state`: State (string, optional) - Address State
                + `address_postal_code`: 123456 (number, required) - Post Code
                + `address_country`: AU (string, required) - Two-letter country code defined in ISO 3166
                + `return_address_id`: 1 (number, required) - Return Address ID
                + `list_id`: 1 (number, optional) - Your list ID if sending to a whole list. Can be used instead of all address fields.
                + `custom_string`: Custom abc123 (string, optional) - Your reference. Will be passed back with all delivery reports.
                + schedule: 1449573604 (number, optional) - Leave blank for immediate delivery. Your schedule time as a [unix timestamp](http://help.clicksend.com/what-is-a-unix-timestamp).

    + Body

            {
                "file_urls":[
                     "https://s3-ap-southeast-2.amazonaws.com/clicksend-api-downloads/_public/_examples/a5_front.pdf",
                     "https://s3-ap-southeast-2.amazonaws.com/clicksend-api-downloads/_public/_examples/a5_back.pdf"
                ],
                "recipients":[
                    {
                        "address_name":"John Smith",
                        "address_line_1":"Address 1",
                        "address_line_2":"",
                        "address_city":"City",
                        "address_state":"State",
                        "address_postal_code":"123456",
                        "address_country":"AU",
                        "return_address_id":1,
                        "custom_string": "Custom abc123"
                    }
                ]
            }

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Postcard queued for delivery.",
            "data":{
                "total_price":11,
                "total_count":1,
                "queued_count":1,
                "recipients":[
                    {
                        "user_id":1,
                        "subaccount_id":13,
                        "message_id":"C8CAA97A-905A-4A31-99CB-A92C7BA05A97",
                        "address_name":"John Smith",
                        "address_line_1":"Address 1",
                        "address_line_2":"",
                        "address_city":"CITY",
                        "address_state":"State",
                        "address_postal_code":"123456",
                        "address_country":"AU",
                        "return_address_id":1,
                        "letter_file_name":"6A559A74-486D-4012-84D7-F3FE11904CB1.pdf",
                        "schedule":1482473172,
                        "ip_address":"127.0.0.1",
                        "source":".rest.v3",
                        "post_price":11,
                        "priority":32,
                        "status":"SUCCESS",
                        "date_added":1482473172,
                        "_file_url":"https://rest.clicksend.com/files/6A559A74-486D-4012-84D7-F3FE11904CB1.pdf",
                        "_return_address":{
                            "return_address_id":1,
                            "user_id":1,
                            "address_name":"John Doe",
                            "address_line_1":"123 Test St",
                            "address_line_2":"",
                            "address_city":"Perth",
                            "address_state":"WA",
                            "address_postal_code":"6000",
                            "address_country":"AU"
                        },
                        "_api_username":"johndoe"
                    }
                ],
                "_currency":{
                    "currency_name_short":"AUD",
                    "currency_prefix_d":"$",
                    "currency_prefix_c":"c",
                    "currency_name_long":"Australian Dollars"
                }
            }
        }

## Calculate Pricing [POST /post/postcards/price]

For `file_urls` field. You can attach at least 1 and max of 2 PDF file urls.

- Supply a single pdf with 2 pages (front and back)
- Supply 2 urls to seperate PDFs

+ Request (application/json)

    + Attributes
        + `file_urls`: [] (array, required) - Postcard file urls. You can submit max 2 file urls.
        + recipients (array, required) - Your recipients.
            + (object)
                + `address_name`: `My Home Address` (string, required) - Address
                + `address_line_1`: `Address 1` (string, required) - Address line 1
                + `address_line_2`: `Address 2` (string, required) - Address line 2
                + `address_city`: CITY (string, required) - Address City
                + `address_state`: State (string, optional) - Address State
                + `address_postal_code`: 123456 (number, required) - Post Code
                + `address_country`: AU (string, required) - Two-letter country code defined in ISO 3166
                + `return_address_id`: 1 (number, required) - Return Address ID
                + `list_id`: 1 (number, optional) - Your list ID if sending to a whole list. Can be used instead of all address fields.
                + `custom_string`: Custom abc123 (string, optional) - Your reference. Will be passed back with all delivery reports.
                + schedule: 1449573604 (number, optional) - Leave blank for immediate delivery. Your schedule time as a [unix timestamp](http://help.clicksend.com/what-is-a-unix-timestamp).

    + Body

            {
                "file_urls":[
                    "https://s3-ap-southeast-2.amazonaws.com/clicksend-api-downloads/_public/_examples/a5_front.pdf",
                    "https://s3-ap-southeast-2.amazonaws.com/clicksend-api-downloads/_public/_examples/a5_back.pdf"
                ],
                "recipients":[
                    {
                        "address_name":"John Smith",
                        "address_line_1":"Address 1",
                        "address_line_2":"",
                        "address_city":"City",
                        "address_state":"State",
                        "address_postal_code":"123456",
                        "address_country":"AU",
                        "custom_string":"Custom abc123",
                        "return_address_id":1
                    }
                ]
            }

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Postcard queued for delivery.",
            "data":{
                "total_price":11,
                "total_count":1,
                "queued_count":1,
                "recipients":[
                    {
                        "user_id":1,
                        "subaccount_id":13,
                        "message_id":"C8CAA97A-905A-4A31-99CB-A92C7BA05A97",
                        "address_name":"John Smith",
                        "address_line_1":"Address 1",
                        "address_line_2":"",
                        "address_city":"CITY",
                        "address_state":"State",
                        "address_postal_code":"123456",
                        "address_country":"AU",
                        "return_address_id":1,
                        "letter_file_name":"6A559A74-486D-4012-84D7-F3FE11904CB1.pdf",
                        "schedule":1482473172,
                        "ip_address":"127.0.0.1",
                        "source":".rest.v3",
                        "post_price":11,
                        "priority":32,
                        "status":"SUCCESS",
                        "date_added":1482473172,
                        "_file_url":"https://rest.clicksend.com/files/6A559A74-486D-4012-84D7-F3FE11904CB1.pdf",
                        "_return_address":{
                            "return_address_id":1,
                            "user_id":1,
                            "address_name":"John Doe",
                            "address_line_1":"123 Test St",
                            "address_line_2":"",
                            "address_city":"Perth",
                            "address_state":"WA",
                            "address_postal_code":"6000",
                            "address_country":"AU"
                        },
                        "_api_username":"johndoe"
                    }
                ],
                "_currency":{
                    "currency_name_short":"AUD",
                    "currency_prefix_d":"$",
                    "currency_prefix_c":"c",
                    "currency_name_long":"Australian Dollars"
                }
            }
        }

## Get Postcard History [GET /post/postcards/history]

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Here is your history.",
            "data":{
                "total":32,
                "per_page":15,
                "current_page":1,
                "last_page":3,
                "next_page_url":"https://rest.clicksend.com/v3/post/postcards/history?page=2",
                "prev_page_url":null,
                "from":1,
                "to":15,
                "data":[
                    {
                        "user_id":1,
                        "subaccount_id":13,
                        "list_id":null,
                        "message_id":"909D6F4F-FC88-4BB8-AD96-D2F4B3139301",
                        "message_id_supplier":"2RXWRVFFG3G8D6TB6V6P6VX7RHR7",
                        "address_name":"John Smith",
                        "address_line_1":"Address 1",
                        "address_line_2":"",
                        "address_city":"CITY",
                        "address_state":"State",
                        "address_postal_code":"123456",
                        "address_country":"AU",
                        "return_address_id":1,
                        "letter_file_name":"65889986-E306-4309-B229-FD9215EE1013A.pdf",
                        "custom_string":null,
                        "schedule":"1482308357",
                        "ip_address":"127.0.0.1",
                        "source":".rest.v3",
                        "post_price":"1.710000",
                        "post_price_supplier":"0.000000",
                        "priority":32,
                        "status":"Sent",
                        "date_added":1482308357,
                        "_file_url":"https://rest.clicksend.com/files/65889986-E306-4309-B229-FD9215EE1013A.pdf",
                        "_return_address":{
                            "return_address_id":1,
                            "user_id":1,
                            "address_name":"John Doe",
                            "address_line_1":"123 Test St",
                            "address_line_2":"",
                            "address_city":"Perth",
                            "address_state":"WA",
                            "address_postal_code":"6000",
                            "address_country":"AU"
                        },
                        "_api_username":"johndoe"
                    },
                    {
                        "user_id":1,
                        "subaccount_id":13,
                        "list_id":null,
                        "message_id":"E4FBBB5F-9E05-45D8-93AF-2C1A3BFD5284",
                        "message_id_supplier":"3HKQX79D2CT6DXDRQVRHPW7GDTM6",
                        "address_name":"John Smith",
                        "address_line_1":"Address 1",
                        "address_line_2":"",
                        "address_city":"CITY",
                        "address_state":"State",
                        "address_postal_code":"123456",
                        "address_country":"AU",
                        "return_address_id":1,
                        "letter_file_name":"2B306DC3-FD44-488B-92B2-D895934289FCA.pdf",
                        "custom_string":null,
                        "schedule":"1482308357",
                        "ip_address":"127.0.0.1",
                        "source":".rest.v3",
                        "post_price":"1.710000",
                        "post_price_supplier":"0.000000",
                        "priority":32,
                        "status":"Sent",
                        "date_added":1482308357,
                        "_file_url":"https://rest.clicksend.com/files/2B306DC3-FD44-488B-92B2-D895934289FCA.pdf",
                        "_return_address":{
                            "return_address_id":1,
                            "user_id":1,
                            "address_name":"John Doe",
                            "address_line_1":"123 Test St",
                            "address_line_2":"",
                            "address_city":"Perth",
                            "address_state":"WA",
                            "address_postal_code":"6000",
                            "address_country":"AU"
                        },
                        "_api_username":"johndoe"
                    },
                    {
                        "user_id":1,
                        "subaccount_id":13,
                        "list_id":null,
                        "message_id":"550CB11B-2D75-4851-8E2C-798F67A0BF9D",
                        "message_id_supplier":"B3YCJJRHQ2WD3CJFXKWB4BTFVYW8",
                        "address_name":"John Smith",
                        "address_line_1":"Address 1",
                        "address_line_2":"",
                        "address_city":"CITY",
                        "address_state":"State",
                        "address_postal_code":"123456",
                        "address_country":"AU",
                        "return_address_id":1,
                        "letter_file_name":"81D66A74-E41A-4C9B-AD51-CC932051F486A.pdf",
                        "custom_string":null,
                        "schedule":"1482308357",
                        "ip_address":"127.0.0.1",
                        "source":".rest.v3",
                        "post_price":"1.710000",
                        "post_price_supplier":"0.000000",
                        "priority":32,
                        "status":"Sent",
                        "date_added":1482308357,
                        "_file_url":"https://rest.clicksend.com/files/81D66A74-E41A-4C9B-AD51-CC932051F486A.pdf",
                        "_return_address":{
                            "return_address_id":1,
                            "user_id":1,
                            "address_name":"John Doe",
                            "address_line_1":"123 Test St",
                            "address_line_2":"",
                            "address_city":"Perth",
                            "address_state":"WA",
                            "address_postal_code":"6000",
                            "address_country":"AU"
                        },
                        "_api_username":"johndoe"
                    },
                    {
                        "user_id":1,
                        "subaccount_id":13,
                        "list_id":null,
                        "message_id":"65C65D93-C327-45BD-BD6D-3C9682C88533",
                        "message_id_supplier":"R8CR92RVJH2Y8JC9JJCGT8RWH8B2",
                        "address_name":"John Smith",
                        "address_line_1":"Address 1",
                        "address_line_2":"",
                        "address_city":"CITY",
                        "address_state":"State",
                        "address_postal_code":"123456",
                        "address_country":"AU",
                        "return_address_id":2,
                        "letter_file_name":"80686068-68A5-42C6-8CD3-DE2FF5914D81A.pdf",
                        "custom_string":null,
                        "schedule":"1482308357",
                        "ip_address":"127.0.0.1",
                        "source":".rest.v3",
                        "post_price":"1.710000",
                        "post_price_supplier":"0.000000",
                        "priority":32,
                        "status":"Sent",
                        "date_added":1482308357,
                        "_file_url":"https://rest.clicksend.com/files/80686068-68A5-42C6-8CD3-DE2FF5914D81A.pdf",
                        "_return_address":{
                            "return_address_id":2,
                            "user_id":1,
                            "address_name":"John Smith",
                            "address_line_1":"Maritime Avenue",
                            "address_line_2":"",
                            "address_city":"Flynn",
                            "address_state":"WA",
                            "address_postal_code":"6302",
                            "address_country":"AU"
                        },
                        "_api_username":"johndoe"
                    },
                    {
                        "user_id":1,
                        "subaccount_id":13,
                        "list_id":null,
                        "message_id":"B4E256A5-1D25-45D7-9DB5-EEC17761372A",
                        "message_id_supplier":"V88MF93C9TVG2VF83T6K2GQVD6DJ",
                        "address_name":"John Smith",
                        "address_line_1":"Address 1",
                        "address_line_2":"",
                        "address_city":"CITY",
                        "address_state":"State",
                        "address_postal_code":"123456",
                        "address_country":"AU",
                        "return_address_id":2,
                        "letter_file_name":"DD750F79-A44F-4729-AC35-9267FE5AB2EFA.pdf",
                        "custom_string":null,
                        "schedule":"1482308357",
                        "ip_address":"127.0.0.1",
                        "source":".rest.v3",
                        "post_price":"1.710000",
                        "post_price_supplier":"0.000000",
                        "priority":32,
                        "status":"Sent",
                        "date_added":1482308357,
                        "_file_url":"https://rest.clicksend.com/files/DD750F79-A44F-4729-AC35-9267FE5AB2EFA.pdf",
                        "_return_address":{
                            "return_address_id":2,
                            "user_id":1,
                            "address_name":"John Smith",
                            "address_line_1":"Maritime Avenue",
                            "address_line_2":"",
                            "address_city":"Flynn",
                            "address_state":"WA",
                            "address_postal_code":"6302",
                            "address_country":"AU"
                        },
                        "_api_username":"johndoe"
                    },
                    {
                        "user_id":1,
                        "subaccount_id":13,
                        "list_id":null,
                        "message_id":"4BF01D93-8BE5-42E4-AEAF-C9D1B27DCA23",
                        "message_id_supplier":"CQK8KTHP3J2B2WG2DW86C2DDH6WW",
                        "address_name":"John Smith",
                        "address_line_1":"Address 1",
                        "address_line_2":"",
                        "address_city":"CITY",
                        "address_state":"State",
                        "address_postal_code":"123456",
                        "address_country":"AU",
                        "return_address_id":1,
                        "letter_file_name":"BB141DB5-57DF-4FA5-A9E4-A13E5AC716E7A.pdf",
                        "custom_string":null,
                        "schedule":"1482311889",
                        "ip_address":"127.0.0.1",
                        "source":".rest.v3",
                        "post_price":"1.370000",
                        "post_price_supplier":"0.000000",
                        "priority":32,
                        "status":"Sent",
                        "date_added":1482311889,
                        "_file_url":"https://rest.clicksend.com/files/BB141DB5-57DF-4FA5-A9E4-A13E5AC716E7A.pdf",
                        "_return_address":{
                            "return_address_id":1,
                            "user_id":1,
                            "address_name":"John Doe",
                            "address_line_1":"123 Test St",
                            "address_line_2":"",
                            "address_city":"Perth",
                            "address_state":"WA",
                            "address_postal_code":"6000",
                            "address_country":"AU"
                        },
                        "_api_username":"johndoe"
                    },
                    {
                        "user_id":1,
                        "subaccount_id":13,
                        "list_id":null,
                        "message_id":"BBA4C1F0-5C7C-4A58-9B93-C48FAB2DA649",
                        "message_id_supplier":"X9FBM27WHPJJW9JWT2XVJTYXVDY2",
                        "address_name":"John Smith",
                        "address_line_1":"Address 1",
                        "address_line_2":"",
                        "address_city":"CITY",
                        "address_state":"State",
                        "address_postal_code":"123456",
                        "address_country":"AU",
                        "return_address_id":1,
                        "letter_file_name":"BF430552-0581-42DD-BA00-B2228E7FE34BA.pdf",
                        "custom_string":null,
                        "schedule":"1482311889",
                        "ip_address":"127.0.0.1",
                        "source":".rest.v3",
                        "post_price":"1.370000",
                        "post_price_supplier":"0.000000",
                        "priority":32,
                        "status":"Sent",
                        "date_added":1482311889,
                        "_file_url":"https://rest.clicksend.com/files/BF430552-0581-42DD-BA00-B2228E7FE34BA.pdf",
                        "_return_address":{
                            "return_address_id":1,
                            "user_id":1,
                            "address_name":"John Doe",
                            "address_line_1":"123 Test St",
                            "address_line_2":"",
                            "address_city":"Perth",
                            "address_state":"WA",
                            "address_postal_code":"6000",
                            "address_country":"AU"
                        },
                        "_api_username":"johndoe"
                    },
                    {
                        "user_id":1,
                        "subaccount_id":13,
                        "list_id":null,
                        "message_id":"5BC692D1-EC43-4C4F-9E83-8543B52F8B7B",
                        "message_id_supplier":"7VW44YDFPJB7WWDRTXPKK9F7Q4RJ",
                        "address_name":"John Smith",
                        "address_line_1":"Address 1",
                        "address_line_2":"",
                        "address_city":"CITY",
                        "address_state":"State",
                        "address_postal_code":"123456",
                        "address_country":"AU",
                        "return_address_id":1,
                        "letter_file_name":"13BB1876-E421-4B5A-8017-81E7F9598FE5A.pdf",
                        "custom_string":null,
                        "schedule":"1482311889",
                        "ip_address":"127.0.0.1",
                        "source":".rest.v3",
                        "post_price":"1.370000",
                        "post_price_supplier":"0.000000",
                        "priority":32,
                        "status":"Sent",
                        "date_added":1482311889,
                        "_file_url":"https://rest.clicksend.com/files/13BB1876-E421-4B5A-8017-81E7F9598FE5AA.pdf",
                        "_return_address":{
                            "return_address_id":1,
                            "user_id":1,
                            "address_name":"John Doe",
                            "address_line_1":"123 Test St",
                            "address_line_2":"",
                            "address_city":"Perth",
                            "address_state":"WA",
                            "address_postal_code":"6000",
                            "address_country":"AU"
                        },
                        "_api_username":"johndoe"
                    },
                    {
                        "user_id":1,
                        "subaccount_id":13,
                        "list_id":null,
                        "message_id":"CD2C87AA-D352-4998-BE7F-5EBDF089AF61",
                        "message_id_supplier":"GQ8MJ4DBRGQFPQ9K9M239CBVKDP2",
                        "address_name":"John Smith",
                        "address_line_1":"Address 1",
                        "address_line_2":"",
                        "address_city":"CITY",
                        "address_state":"State",
                        "address_postal_code":"123456",
                        "address_country":"AU",
                        "return_address_id":2,
                        "letter_file_name":"77A18FEA-8935-430E-B14A-7EBF5E1E19C8AA.pdf",
                        "custom_string":null,
                        "schedule":"1482311889",
                        "ip_address":"127.0.0.1",
                        "source":".rest.v3",
                        "post_price":"1.370000",
                        "post_price_supplier":"0.000000",
                        "priority":32,
                        "status":"Sent",
                        "date_added":1482311889,
                        "_file_url":"https://rest.clicksend.com/files/77A18FEA-8935-430E-B14A-7EBF5E1E19C8AA.pdf",
                        "_return_address":{
                            "return_address_id":2,
                            "user_id":1,
                            "address_name":"John Smith",
                            "address_line_1":"Maritime Avenue",
                            "address_line_2":"",
                            "address_city":"Flynn",
                            "address_state":"WA",
                            "address_postal_code":"6302",
                            "address_country":"AU"
                        },
                        "_api_username":"johndoe"
                    },
                    {
                        "user_id":1,
                        "subaccount_id":13,
                        "list_id":null,
                        "message_id":"17CD0519-4E91-4EC0-B9AF-F1BE3BC7A485",
                        "message_id_supplier":"GFJKTT8CJBCYR3DFFMPPBDQJQP32",
                        "address_name":"John Smith",
                        "address_line_1":"Address 1",
                        "address_line_2":"",
                        "address_city":"CITY",
                        "address_state":"State",
                        "address_postal_code":"123456",
                        "address_country":"AU",
                        "return_address_id":2,
                        "letter_file_name":"21837EDA-1167-4104-A4D3-4A22FA0585E4AA.pdf",
                        "custom_string":null,
                        "schedule":"1482311889",
                        "ip_address":"127.0.0.1",
                        "source":".rest.v3",
                        "post_price":"1.370000",
                        "post_price_supplier":"0.000000",
                        "priority":32,
                        "status":"Sent",
                        "date_added":1482311889,
                        "_file_url":"https://rest.clicksend.com/files/21837EDA-1167-4104-A4D3-4A22FA0585E4A.pdf",
                        "_return_address":{
                            "return_address_id":2,
                            "user_id":1,
                            "address_name":"John Smith",
                            "address_line_1":"Maritime Avenue",
                            "address_line_2":"",
                            "address_city":"Flynn",
                            "address_state":"WA",
                            "address_postal_code":"6302",
                            "address_country":"AU"
                        },
                        "_api_username":"johndoe"
                    },
                    {
                        "user_id":1,
                        "subaccount_id":13,
                        "list_id":null,
                        "message_id":"8A2DAFE7-130F-4F9A-820B-85D79F874E05",
                        "message_id_supplier":"4F2JH87CP3PX22WRRYWVK8JJKXR2",
                        "address_name":"John Smith",
                        "address_line_1":"Address 1",
                        "address_line_2":"",
                        "address_city":"CITY",
                        "address_state":"State",
                        "address_postal_code":"123456",
                        "address_country":"AU",
                        "return_address_id":1,
                        "letter_file_name":"C738FB89-750F-45E4-9E0A-EBD19A8B2884A.pdf",
                        "custom_string":null,
                        "schedule":"1482313126",
                        "ip_address":"127.0.0.1",
                        "source":".rest.v3",
                        "post_price":"1.370000",
                        "post_price_supplier":"0.000000",
                        "priority":32,
                        "status":"Sent",
                        "date_added":1482313126,
                        "_file_url":"https://rest.clicksend.com/files/C738FB89-750F-45E4-9E0A-EBD19A8B2884A.pdf",
                        "_return_address":{
                            "return_address_id":1,
                            "user_id":1,
                            "address_name":"John Doe",
                            "address_line_1":"123 Test St",
                            "address_line_2":"",
                            "address_city":"Perth",
                            "address_state":"WA",
                            "address_postal_code":"6000",
                            "address_country":"AU"
                        },
                        "_api_username":"johndoe"
                    },
                    {
                        "user_id":1,
                        "subaccount_id":13,
                        "list_id":null,
                        "message_id":"047CDB95-6C9D-4485-962F-EA28FFD7C0D9",
                        "message_id_supplier":"MHPDXPKFJFR9H677TQM8PH4YDMHP",
                        "address_name":"John Smith",
                        "address_line_1":"Address 1",
                        "address_line_2":"",
                        "address_city":"CITY",
                        "address_state":"State",
                        "address_postal_code":"123456",
                        "address_country":"AU",
                        "return_address_id":1,
                        "letter_file_name":"5089F9FC-0179-44E8-AC5E-225932FE9500A.pdf",
                        "custom_string":null,
                        "schedule":"1482313126",
                        "ip_address":"127.0.0.1",
                        "source":".rest.v3",
                        "post_price":"1.370000",
                        "post_price_supplier":"0.000000",
                        "priority":32,
                        "status":"Sent",
                        "date_added":1482313126,
                        "_file_url":"https://rest.clicksend.com/files/5089F9FC-0179-44E8-AC5E-225932FE9500A.pdf",
                        "_return_address":{
                            "return_address_id":1,
                            "user_id":1,
                            "address_name":"John Doe",
                            "address_line_1":"123 Test St",
                            "address_line_2":"",
                            "address_city":"Perth",
                            "address_state":"WA",
                            "address_postal_code":"6000",
                            "address_country":"AU"
                        },
                        "_api_username":"johndoe"
                    },
                    {
                        "user_id":1,
                        "subaccount_id":13,
                        "list_id":null,
                        "message_id":"653C5ED0-5AAD-4946-8E72-8152E23A6AA5",
                        "message_id_supplier":"JYPVGC83PH68XX64QYBHQXRD4V2G",
                        "address_name":"John Smith",
                        "address_line_1":"Address 1",
                        "address_line_2":"",
                        "address_city":"CITY",
                        "address_state":"State",
                        "address_postal_code":"123456",
                        "address_country":"AU",
                        "return_address_id":1,
                        "letter_file_name":"E17C7CE6-C2C9-476D-8886-E2B8CA6C30E3A.pdf",
                        "custom_string":null,
                        "schedule":"1482313126",
                        "ip_address":"127.0.0.1",
                        "source":".rest.v3",
                        "post_price":"1.370000",
                        "post_price_supplier":"0.000000",
                        "priority":32,
                        "status":"Sent",
                        "date_added":1482313126,
                        "_file_url":"https://rest.clicksend.com/files/E17C7CE6-C2C9-476D-8886-E2B8CA6C30E3A.pdf",
                        "_return_address":{
                            "return_address_id":1,
                            "user_id":1,
                            "address_name":"John Doe",
                            "address_line_1":"123 Test St",
                            "address_line_2":"",
                            "address_city":"Perth",
                            "address_state":"WA",
                            "address_postal_code":"6000",
                            "address_country":"AU"
                        },
                        "_api_username":"johndoe"
                    },
                    {
                        "user_id":1,
                        "subaccount_id":13,
                        "list_id":null,
                        "message_id":"EF4177A7-AE6D-4035-9052-10B2C9DF4564",
                        "message_id_supplier":"68TC768BG42TK6Q83VBFVKY87D99",
                        "address_name":"John Smith",
                        "address_line_1":"Address 1",
                        "address_line_2":"",
                        "address_city":"CITY",
                        "address_state":"State",
                        "address_postal_code":"123456",
                        "address_country":"AU",
                        "return_address_id":2,
                        "letter_file_name":"252678EE-C597-4D20-B1DE-F21629E77831A.pdf",
                        "custom_string":null,
                        "schedule":"1482313126",
                        "ip_address":"127.0.0.1",
                        "source":".rest.v3",
                        "post_price":"1.370000",
                        "post_price_supplier":"0.000000",
                        "priority":32,
                        "status":"Sent",
                        "date_added":1482313126,
                        "_file_url":"https://rest.clicksend.com/files/252678EE-C597-4D20-B1DE-F21629E77831A.pdf",
                        "_return_address":{
                            "return_address_id":2,
                            "user_id":1,
                            "address_name":"John Smith",
                            "address_line_1":"Maritime Avenue",
                            "address_line_2":"",
                            "address_city":"Flynn",
                            "address_state":"WA",
                            "address_postal_code":"6302",
                            "address_country":"AU"
                        },
                        "_api_username":"johndoe"
                    },
                    {
                        "user_id":1,
                        "subaccount_id":13,
                        "list_id":null,
                        "message_id":"E196E8B4-1233-4EF4-8689-C296D55B9DAE",
                        "message_id_supplier":"8BF2H8CCDJMHCMCKR3THJ6XDDJ9K",
                        "address_name":"John Smith",
                        "address_line_1":"Address 1",
                        "address_line_2":"",
                        "address_city":"CITY",
                        "address_state":"State",
                        "address_postal_code":"123456",
                        "address_country":"AU",
                        "return_address_id":2,
                        "letter_file_name":"8B2A85E1-D092-47DC-B70B-983B10AD83D6A.pdf",
                        "custom_string":null,
                        "schedule":"1482313126",
                        "ip_address":"127.0.0.1",
                        "source":".rest.v3",
                        "post_price":"1.370000",
                        "post_price_supplier":"0.000000",
                        "priority":32,
                        "status":"Sent",
                        "date_added":1482313126,
                        "_file_url":"https://rest.clicksend.com/files/8B2A85E1-D092-47DC-B70B-983B10AD83D6A.pdf",
                        "_return_address":{
                            "return_address_id":2,
                            "user_id":1,
                            "address_name":"John Smith",
                            "address_line_1":"Maritime Avenue",
                            "address_line_2":"",
                            "address_city":"Flynn",
                            "address_state":"WA",
                            "address_postal_code":"6302",
                            "address_country":"AU"
                        },
                        "_api_username":"johndoe"
                    }
                ]
            }
        }

## Export Postcard History [GET /post/postcards/export?filename={filename}]

+ Parameters
    + filename: myexport.csv (required, string) - Filename for the export file.

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Download your file here.",
            "data":{
                "url":"https://rest.clicksend.com/files/705F80D0-D044-4F85-8617-081988B398E5?filename=myexport.csv"
            }
        }

# Group Referral Accounts

## Referral Accounts [/referral/accounts]

### Get List of Referral Accounts [GET]

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Here are your referrals.",
            "data":{
                "total":5,
                "per_page":15,
                "current_page":1,
                "last_page":1,
                "next_page_url":null,
                "prev_page_url":null,
                "from":1,
                "to":5,
                "data":[
                    {
                        "referral_rule_id":1,
                        "refered_user_id":24,
                        "date_referred":1438260940,
                        "percentage_referral":5
                    },
                    {
                        "referral_rule_id":2,
                        "refered_user_id":25,
                        "date_referred":1438260989,
                        "percentage_referral":5
                    },
                    {
                        "referral_rule_id":3,
                        "refered_user_id":26,
                        "date_referred":1438260992,
                        "percentage_referral":5
                    },
                    {
                        "referral_rule_id":4,
                        "refered_user_id":27,
                        "date_referred":1438260994,
                        "percentage_referral":5
                    },
                    {
                        "referral_rule_id":5,
                        "refered_user_id":28,
                        "date_referred":1438260997,
                        "percentage_referral":5
                    }
                ]
            }
        }

# Group Reseller

## Reseller [/reseller]

### Get Reseller Setting [GET]
Get reseller setting.

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Your result.",
            "data":[
                {
                    "reseller_user_id":1,
                    "allow_public_signups":1,
                    "default_margin":10,
                    "default_margin_numbers":20,
                    "trial_balance":"500.00",
                    "subdomain":"subdomain",
                    "colour_navigation":"#9999FF",
                    "logo_url":"http://yourdomain.com"
                }
            ]
        }

### Update Reseller Setting [PUT]
Update a specific reseller setting.

+ Request (application/json)

    + Attributes (object)
        + `allow_public_signups`: 1 (number, required) - Allow public signups.
        + `default_margin`: 100 (number, required) - Default margin.
        + `default_margin_numbers`: 150 (number, required) - Default margin numbers.
        + `trial_balance`: 50 (number, required) - Trial balance.
        + subdomain: subdomain (string, required) - Subdomain.
        + `colour_navigation`: `#9999FF` (string, required) - Colour navigation.
        + `logo_url_light`: `http://yourdomain.com/light` (string, required) - Logo URL (light)
        + `logo_url_dark`: `http://yourdomain.com/dark` (string, required) - Logo URL (dark)
        + `company_name`: MyCompany (string, required) - Company name.
    + Body

                {
                    "allow_public_signups":1,
                    "default_margin":100,
                    "default_margin_numbers":150,
                    "trial_balance":50,
                    "subdomain":"subdomain",
                    "colour_navigation":"#9999FF",
                    "logo_url_light":"http://yourdomain.com/light",
                    "logo_url_dark":"http://yourdomain.com/dark",
                    "company_name":"MyCompany"
                }

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Your setting has been updated.",
            "data":{
                "reseller_user_id":1,
                "allow_public_signups":1,
                "default_margin":100,
                "default_margin_numbers":150,
                "trial_balance":50,
                "subdomain":"subdomain",
                "colour_navigation":"#9999FF",
                "logo_url_light":"http://yourdomain.com/light",
                "logo_url_dark":"http://yourdomain.com/dark",
                "company_name":"MyCompany"
            }
        }

## Reseller Subdomain [/reseller/{subdomain}]

### Reseller By Subdomain [GET]
Get reseller setting by subdomin.

+ Parameters
    + subdomain: mysubdomain (string, required) - Subdomain

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Here's your result.",
            "data":{
                "reseller_user_id":1,
                "allow_public_signups":1,
                "colour_navigation":"#9999FF",
                "logo_url_light":"http://yourdomain.com/light",
                "logo_url_dark":"http://yourdomain.com/dark",
                "company_name":"MyCompany"
            }
        }

# Group Reseller Accounts

## Reseller Accounts [/reseller/accounts]

### List of Reseller Accounts [GET]
Get list of Reseller Accounts

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Here are you data.",
            "data":{
                "total":11,
                "per_page":15,
                "current_page":1,
                "last_page":1,
                "next_page_url":null,
                "prev_page_url":null,
                "from":1,
                "to":11,
                "data":[
                    {
                        "user_id":24,
                        "username":"username75897",
                        "user_email":"email86363@gmail.com",
                        "active":1,
                        "banned":0,
                        "balance":"115.000000",
                        "user_phone":"+61261063776",
                        "reply_to":"originalemail",
                        "delivery_to":"+61261086832",
                        "user_first_name":"Firstname30529",
                        "user_last_name":"Lastname83402",
                        "account":0,
                        "account_name":"Johnn99YH",
                        "account_billing_email":"AIYkwXgB2c@CzrJB.com",
                        "account_billing_mobile":"+61353787961",
                        "country":"AU",
                        "default_country_sms":"AU",
                        "unsubscribe_mail":1,
                        "auto_recharge":0,
                        "auto_recharge_amount":"20.00",
                        "low_credit_amount":"1.50",
                        "setting_unicode_sms":1,
                        "setting_beta":1,
                        "setting_email_sms_subject":0,
                        "setting_fix_sender_id":26979,
                        "setting_sms_message_char_limit":140,
                        "_currency":{
                            "currency_name_short":"AUD",
                            "currency_prefix_d":"$",
                            "currency_prefix_c":"c",
                            "currency_name_long":"Australian Dollars"
                        },
                        "_subaccount":{
                            "subaccount_id":54,
                            "api_username":"Y3c5zm7z97",
                            "email":"oNEDu5ffl8@BP8lY.com",
                            "phone_number":"+61353787526",
                            "first_name":"JohnNyZWy",
                            "last_name":"Doe8ozHX",
                            "api_key":"D683D2C1-8AAE-881A-78FF-E8577D7BED2D",
                            "access_users":1,
                            "access_billing":1,
                            "access_reporting":1,
                            "access_contacts":0,
                            "access_settings":1,
                            "access_sms":1,
                            "access_email":0,
                            "access_voice":0,
                            "access_fax":0,
                            "access_post":0,
                            "access_reseller":0
                        }
                    },
                    {
                        "user_id":60,
                        "username":"FHJatAkKXD",
                        "user_email":"MEynjL6C3A@2YtIn.com",
                        "active":0,
                        "banned":0,
                        "balance":"2273.435000",
                        "user_phone":"+61353787971",
                        "reply_to":"originalemail",
                        "delivery_to":"I1hq9xrvmcNO24sf",
                        "user_first_name":"JohnjRk3I",
                        "user_last_name":"Doe1uWR5",
                        "account":0,
                        "account_name":"JohnkMJLv",
                        "account_billing_email":"fZpbUQfzE0@NQ9Nt.com",
                        "account_billing_mobile":"+61353787898",
                        "country":"AU",
                        "default_country_sms":"AU",
                        "unsubscribe_mail":0,
                        "auto_recharge":0,
                        "auto_recharge_amount":"20.00",
                        "low_credit_amount":"1.50",
                        "setting_unicode_sms":0,
                        "setting_beta":0,
                        "setting_email_sms_subject":0,
                        "setting_fix_sender_id":0,
                        "setting_sms_message_char_limit":140,
                        "_currency":{
                            "currency_name_short":"AUD",
                            "currency_prefix_d":"$",
                            "currency_prefix_c":"c",
                            "currency_name_long":"Australian Dollars"
                        },
                        "_subaccount":{
                            "subaccount_id":70,
                            "api_username":"a4CQgqG4lS",
                            "email":"fZpbUQfzE0@NQ9Nt.com",
                            "phone_number":"+61353787898",
                            "first_name":"John19k46",
                            "last_name":"DoexkI6a",
                            "api_key":"C9B4AFBA-BDBA-E343-950B-2C63BF6E7901",
                            "access_users":1,
                            "access_billing":1,
                            "access_reporting":1,
                            "access_contacts":0,
                            "access_settings":1,
                            "access_sms":0,
                            "access_email":0,
                            "access_voice":0,
                            "access_fax":0,
                            "access_post":0,
                            "access_reseller":0
                        }
                    },
                    {
                        "user_id":61,
                        "username":"e10GrL9GUw",
                        "user_email":"eThbkhkjwi@El2xE.com",
                        "active":0,
                        "banned":0,
                        "balance":"115.000000",
                        "user_phone":"+61353787600",
                        "reply_to":"originalemail",
                        "delivery_to":"iBX9lNMRLM1Dp5QN",
                        "user_first_name":"JohnTW9sV",
                        "user_last_name":"DoeBQhRS",
                        "account":0,
                        "account_name":"JohnwjvLq",
                        "account_billing_email":"alKdHhfzXI@MvAvZ.com",
                        "account_billing_mobile":"+61353787282",
                        "country":"AU",
                        "default_country_sms":"AU",
                        "unsubscribe_mail":0,
                        "auto_recharge":0,
                        "auto_recharge_amount":"20.00",
                        "low_credit_amount":"1.50",
                        "setting_unicode_sms":0,
                        "setting_beta":0,
                        "setting_email_sms_subject":0,
                        "setting_fix_sender_id":0,
                        "setting_sms_message_char_limit":140,
                        "_currency":{
                            "currency_name_short":"AUD",
                            "currency_prefix_d":"$",
                            "currency_prefix_c":"c",
                            "currency_name_long":"Australian Dollars"
                        },
                        "_subaccount":{
                            "subaccount_id":71,
                            "api_username":"zOgiEZ1TK7",
                            "email":"alKdHhfzXI@MvAvZ.com",
                            "phone_number":"+61353787282",
                            "first_name":"JohnufkdZ",
                            "last_name":"DoevmQ93",
                            "api_key":"2E829F76-FB67-D2D6-637E-7DB511D98A85",
                            "access_users":1,
                            "access_billing":1,
                            "access_reporting":1,
                            "access_contacts":0,
                            "access_settings":1,
                            "access_sms":0,
                            "access_email":0,
                            "access_voice":0,
                            "access_fax":0,
                            "access_post":0,
                            "access_reseller":0
                        }
                    },
                    {
                        "user_id":62,
                        "username":"FYuLNmYf8K",
                        "user_email":"J6tOUnclVo@vmAV6.com",
                        "active":0,
                        "banned":0,
                        "balance":"115.000000",
                        "user_phone":"+61353787970",
                        "reply_to":"originalemail",
                        "delivery_to":"WrDhMU4CAwsGvoBn",
                        "user_first_name":"JohnsIbLF",
                        "user_last_name":"DoeWhrkh",
                        "account":0,
                        "account_name":"JohnCEUiT",
                        "account_billing_email":"Y6Q8mpg5PM@DxhTZ.com",
                        "account_billing_mobile":"+61353787685",
                        "country":"AU",
                        "default_country_sms":"AU",
                        "unsubscribe_mail":0,
                        "auto_recharge":0,
                        "auto_recharge_amount":"20.00",
                        "low_credit_amount":"1.50",
                        "setting_unicode_sms":0,
                        "setting_beta":0,
                        "setting_email_sms_subject":0,
                        "setting_fix_sender_id":8,
                        "setting_sms_message_char_limit":140,
                        "_currency":{
                            "currency_name_short":"AUD",
                            "currency_prefix_d":"$",
                            "currency_prefix_c":"c",
                            "currency_name_long":"Australian Dollars"
                        },
                        "_subaccount":{
                            "subaccount_id":72,
                            "api_username":"lDcRBjpvzc",
                            "email":"Y6Q8mpg5PM@DxhTZ.com",
                            "phone_number":"+61353787685",
                            "first_name":"JohnpIh23",
                            "last_name":"Doen7y2c",
                            "api_key":"E0D3BF7C-F51A-95BF-F80C-A90C546A3AF7",
                            "access_users":1,
                            "access_billing":1,
                            "access_reporting":1,
                            "access_contacts":0,
                            "access_settings":1,
                            "access_sms":0,
                            "access_email":0,
                            "access_voice":0,
                            "access_fax":0,
                            "access_post":0,
                            "access_reseller":0
                        }
                    },
                    {
                        "user_id":70,
                        "username":"username_62220",
                        "user_email":"email_96752@gmail.com",
                        "active":0,
                        "banned":0,
                        "balance":"115.000000",
                        "user_phone":"+61261061361",
                        "reply_to":"originalemail",
                        "delivery_to":null,
                        "user_first_name":"Firstname6663",
                        "user_last_name":"Lastname95048",
                        "account":0,
                        "account_name":"Company 99550",
                        "account_billing_email":"email_96752@gmail.com",
                        "account_billing_mobile":"+61261061361",
                        "country":"AU",
                        "default_country_sms":"AU",
                        "unsubscribe_mail":0,
                        "auto_recharge":0,
                        "auto_recharge_amount":"20.00",
                        "low_credit_amount":"1.50",
                        "setting_unicode_sms":0,
                        "setting_beta":0,
                        "setting_email_sms_subject":0,
                        "setting_fix_sender_id":2147483647,
                        "setting_sms_message_char_limit":140,
                        "_currency":{
                            "currency_name_short":"AUD",
                            "currency_prefix_d":"$",
                            "currency_prefix_c":"c",
                            "currency_name_long":"Australian Dollars"
                        },
                        "_subaccount":{
                            "subaccount_id":80,
                            "api_username":"username_62220",
                            "email":"email_96752@gmail.com",
                            "phone_number":"+61261061361",
                            "first_name":"Firstname6663",
                            "last_name":"Lastname95048",
                            "api_key":"DD87E68D-73B9-91AF-8EEE-F1D3C8FA40F5",
                            "access_users":1,
                            "access_billing":1,
                            "access_reporting":1,
                            "access_contacts":0,
                            "access_settings":1,
                            "access_sms":0,
                            "access_email":0,
                            "access_voice":0,
                            "access_fax":0,
                            "access_post":0,
                            "access_reseller":0
                        }
                    },
                    {
                        "user_id":71,
                        "username":"username_38270",
                        "user_email":"email_66764@gmail.com",
                        "active":0,
                        "banned":0,
                        "balance":"115.000000",
                        "user_phone":"+61261063404",
                        "reply_to":"originalemail",
                        "delivery_to":"+61261089282",
                        "user_first_name":"Firstname1371",
                        "user_last_name":"Lastname50417",
                        "account":0,
                        "account_name":"Company 50249",
                        "account_billing_email":"email_66764@gmail.com",
                        "account_billing_mobile":"+61261063404",
                        "country":"AU",
                        "default_country_sms":"AU",
                        "unsubscribe_mail":0,
                        "auto_recharge":0,
                        "auto_recharge_amount":"20.00",
                        "low_credit_amount":"1.50",
                        "setting_unicode_sms":1,
                        "setting_beta":1,
                        "setting_email_sms_subject":0,
                        "setting_fix_sender_id":2147483647,
                        "setting_sms_message_char_limit":140,
                        "_currency":{
                            "currency_name_short":"AUD",
                            "currency_prefix_d":"$",
                            "currency_prefix_c":"c",
                            "currency_name_long":"Australian Dollars"
                        },
                        "_subaccount":{
                            "subaccount_id":81,
                            "api_username":"username_38270",
                            "email":"email_66764@gmail.com",
                            "phone_number":"+61261063404",
                            "first_name":"Firstname1371",
                            "last_name":"Lastname50417",
                            "api_key":"1219277F-5111-C884-DEE1-7C16681A3655",
                            "access_users":1,
                            "access_billing":1,
                            "access_reporting":1,
                            "access_contacts":0,
                            "access_settings":1,
                            "access_sms":0,
                            "access_email":0,
                            "access_voice":0,
                            "access_fax":0,
                            "access_post":0,
                            "access_reseller":0
                        }
                    },
                    {
                        "user_id":72,
                        "username":"username_39016",
                        "user_email":"email_67772@gmail.com",
                        "active":1,
                        "banned":0,
                        "balance":"115.000000",
                        "user_phone":"+61261061316",
                        "reply_to":"originalemail",
                        "delivery_to":"+61261087712",
                        "user_first_name":"Firstname26535",
                        "user_last_name":"Lastname36882",
                        "account":0,
                        "account_name":"Company 26794",
                        "account_billing_email":"email_67772@gmail.com",
                        "account_billing_mobile":"+61261061316",
                        "country":"AU",
                        "default_country_sms":"AU",
                        "unsubscribe_mail":0,
                        "auto_recharge":0,
                        "auto_recharge_amount":"20.00",
                        "low_credit_amount":"1.50",
                        "setting_unicode_sms":0,
                        "setting_beta":0,
                        "setting_email_sms_subject":1,
                        "setting_fix_sender_id":87404,
                        "setting_sms_message_char_limit":140,
                        "_currency":{
                            "currency_name_short":"AUD",
                            "currency_prefix_d":"$",
                            "currency_prefix_c":"c",
                            "currency_name_long":"Australian Dollars"
                        },
                        "_subaccount":{
                            "subaccount_id":82,
                            "api_username":"username_39016",
                            "email":"email_67772@gmail.com",
                            "phone_number":"+61261061316",
                            "first_name":"Firstname26535",
                            "last_name":"Lastname36882",
                            "api_key":"631D0E3C-CA0A-E224-BF1B-0070FDACF775",
                            "access_users":1,
                            "access_billing":1,
                            "access_reporting":1,
                            "access_contacts":0,
                            "access_settings":1,
                            "access_sms":0,
                            "access_email":0,
                            "access_voice":0,
                            "access_fax":0,
                            "access_post":0,
                            "access_reseller":0
                        }
                    },
                    {
                        "user_id":73,
                        "username":"username_10832",
                        "user_email":"email_28172@gmail.com",
                        "active":1,
                        "banned":0,
                        "balance":"115.000000",
                        "user_phone":"+61261064026",
                        "reply_to":"originalemail",
                        "delivery_to":"+61261088320",
                        "user_first_name":"Firstname10383",
                        "user_last_name":"Lastname11110",
                        "account":0,
                        "account_name":"Company 28247",
                        "account_billing_email":"email_28172@gmail.com",
                        "account_billing_mobile":"+61261064026",
                        "country":"AU",
                        "default_country_sms":"AU",
                        "unsubscribe_mail":0,
                        "auto_recharge":0,
                        "auto_recharge_amount":"20.00",
                        "low_credit_amount":"1.50",
                        "setting_unicode_sms":1,
                        "setting_beta":0,
                        "setting_email_sms_subject":1,
                        "setting_fix_sender_id":67684,
                        "setting_sms_message_char_limit":140,
                        "_currency":{
                            "currency_name_short":"AUD",
                            "currency_prefix_d":"$",
                            "currency_prefix_c":"c",
                            "currency_name_long":"Australian Dollars"
                        },
                        "_subaccount":{
                            "subaccount_id":83,
                            "api_username":"username_10832",
                            "email":"email_28172@gmail.com",
                            "phone_number":"+61261064026",
                            "first_name":"Firstname10383",
                            "last_name":"Lastname11110",
                            "api_key":"E236FDFF-4730-F719-85B9-2AC0D4D192F5",
                            "access_users":1,
                            "access_billing":1,
                            "access_reporting":1,
                            "access_contacts":0,
                            "access_settings":1,
                            "access_sms":0,
                            "access_email":0,
                            "access_voice":0,
                            "access_fax":0,
                            "access_post":0,
                            "access_reseller":0
                        }
                    },
                    {
                        "user_id":74,
                        "username":"username65302",
                        "user_email":"email1024@gmail.com",
                        "active":1,
                        "banned":0,
                        "balance":"115.000000",
                        "user_phone":"+61261067753",
                        "reply_to":"originalemail",
                        "delivery_to":"+61261087647",
                        "user_first_name":"Firstname42348",
                        "user_last_name":"Lastname45055",
                        "account":0,
                        "account_name":"Company88867",
                        "account_billing_email":"email1024@gmail.com",
                        "account_billing_mobile":"+61261067753",
                        "country":"AU",
                        "default_country_sms":"AU",
                        "unsubscribe_mail":1,
                        "auto_recharge":0,
                        "auto_recharge_amount":"20.00",
                        "low_credit_amount":"1.50",
                        "setting_unicode_sms":1,
                        "setting_beta":0,
                        "setting_email_sms_subject":1,
                        "setting_fix_sender_id":93951,
                        "setting_sms_message_char_limit":140,
                        "_currency":{
                            "currency_name_short":"AUD",
                            "currency_prefix_d":"$",
                            "currency_prefix_c":"c",
                            "currency_name_long":"Australian Dollars"
                        },
                        "_subaccount":{
                            "subaccount_id":84,
                            "api_username":"username65302",
                            "email":"email1024@gmail.com",
                            "phone_number":"+61261067753",
                            "first_name":"Firstname42348",
                            "last_name":"Lastname45055",
                            "api_key":"98AE5B58-141B-1310-AC66-45D34D56CA4C",
                            "access_users":1,
                            "access_billing":1,
                            "access_reporting":1,
                            "access_contacts":0,
                            "access_settings":1,
                            "access_sms":0,
                            "access_email":0,
                            "access_voice":0,
                            "access_fax":0,
                            "access_post":0,
                            "access_reseller":0
                        }
                    },
                    {
                        "user_id":75,
                        "username":"username67428",
                        "user_email":"email13820@gmail.com",
                        "active":0,
                        "banned":0,
                        "balance":"115.000000",
                        "user_phone":"+61261062260",
                        "reply_to":"originalemail",
                        "delivery_to":"+61261088951",
                        "user_first_name":"Firstname70051",
                        "user_last_name":"Lastname35293",
                        "account":0,
                        "account_name":"Company13805",
                        "account_billing_email":"email13820@gmail.com",
                        "account_billing_mobile":"+61261062260",
                        "country":"AU",
                        "default_country_sms":"AU",
                        "unsubscribe_mail":1,
                        "auto_recharge":0,
                        "auto_recharge_amount":"20.00",
                        "low_credit_amount":"1.50",
                        "setting_unicode_sms":0,
                        "setting_beta":0,
                        "setting_email_sms_subject":0,
                        "setting_fix_sender_id":35625,
                        "setting_sms_message_char_limit":140,
                        "_currency":{
                            "currency_name_short":"AUD",
                            "currency_prefix_d":"$",
                            "currency_prefix_c":"c",
                            "currency_name_long":"Australian Dollars"
                        },
                        "_subaccount":{
                            "subaccount_id":85,
                            "api_username":"username67428",
                            "email":"email13820@gmail.com",
                            "phone_number":"+61261062260",
                            "first_name":"Firstname70051",
                            "last_name":"Lastname35293",
                            "api_key":"C9E22A8E-88B2-0077-3445-F95A5D501FEA",
                            "access_users":1,
                            "access_billing":1,
                            "access_reporting":1,
                            "access_contacts":0,
                            "access_settings":1,
                            "access_sms":0,
                            "access_email":0,
                            "access_voice":0,
                            "access_fax":0,
                            "access_post":0,
                            "access_reseller":0
                        }
                    },
                    {
                        "user_id":76,
                        "username":"username59",
                        "user_email":"email52313@gmail.com",
                        "active":0,
                        "banned":0,
                        "balance":"115.000000",
                        "user_phone":"+61261069962",
                        "reply_to":"originalemail",
                        "delivery_to":"+61261083784",
                        "user_first_name":"Firstname49996",
                        "user_last_name":"Lastname22152",
                        "account":0,
                        "account_name":"Company23060",
                        "account_billing_email":"email52313@gmail.com",
                        "account_billing_mobile":"+61261069962",
                        "country":"AU",
                        "default_country_sms":"AU",
                        "unsubscribe_mail":1,
                        "auto_recharge":0,
                        "auto_recharge_amount":"20.00",
                        "low_credit_amount":"1.50",
                        "setting_unicode_sms":1,
                        "setting_beta":0,
                        "setting_email_sms_subject":0,
                        "setting_fix_sender_id":44842,
                        "setting_sms_message_char_limit":140,
                        "_currency":{
                            "currency_name_short":"AUD",
                            "currency_prefix_d":"$",
                            "currency_prefix_c":"c",
                            "currency_name_long":"Australian Dollars"
                        },
                        "_subaccount":{
                            "subaccount_id":86,
                            "api_username":"username59",
                            "email":"email52313@gmail.com",
                            "phone_number":"+61261069962",
                            "first_name":"Firstname49996",
                            "last_name":"Lastname22152",
                            "api_key":"BBD918C1-DD00-FFFB-CF53-4C3AB9E15F5C",
                            "access_users":1,
                            "access_billing":1,
                            "access_reporting":1,
                            "access_contacts":0,
                            "access_settings":1,
                            "access_sms":0,
                            "access_email":0,
                            "access_voice":0,
                            "access_fax":0,
                            "access_post":0,
                            "access_reseller":0
                        }
                    }
                ]
            }
        }

## Reseller Account [/reseller/accounts/{client_user_id}]

### Get Reseller Account [GET]
Get a specific reseller account.

+ Parameters
    + `client_user_id`: 24 (required, number) - The client user id.

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Here are your data.",
            "data":{
                "user_id":24,
                "username":"username75897",
                "user_email":"email86363@gmail.com",
                "active":1,
                "banned":0,
                "balance":"115.000000",
                "user_phone":"+61261063776",
                "reply_to":"originalemail",
                "delivery_to":"+61261086832",
                "user_first_name":"Firstname30529",
                "user_last_name":"Lastname83402",
                "account":0,
                "account_name":"Johnn99YH",
                "account_billing_email":"AIYkwXgB2c@CzrJB.com",
                "account_billing_mobile":"+61353787961",
                "country":"AU",
                "default_country_sms":"AU",
                "unsubscribe_mail":1,
                "auto_recharge":0,
                "auto_recharge_amount":"20.00",
                "low_credit_amount":"1.50",
                "setting_unicode_sms":1,
                "setting_beta":1,
                "setting_email_sms_subject":0,
                "setting_fix_sender_id":26979,
                "setting_sms_message_char_limit":140,
                "_currency":{
                    "currency_name_short":"AUD",
                    "currency_prefix_d":"$",
                    "currency_prefix_c":"c",
                    "currency_name_long":"Australian Dollars"
                },
                "_subaccount":{
                    "subaccount_id":54,
                    "api_username":"Y3c5zm7z97",
                    "email":"oNEDu5ffl8@BP8lY.com",
                    "phone_number":"+61353787526",
                    "first_name":"JohnNyZWy",
                    "last_name":"Doe8ozHX",
                    "api_key":"D683D2C1-8AAE-881A-78FF-E8577D7BED2D",
                    "access_users":1,
                    "access_billing":1,
                    "access_reporting":1,
                    "access_contacts":0,
                    "access_settings":1,
                    "access_sms":1,
                    "access_email":0,
                    "access_voice":0,
                    "access_fax":0,
                    "access_post":0,
                    "access_reseller":0
                }
            }
        }

## Create Reseller Account [POST /reseller/accounts]

+ Request (application/json)

    + Attributes (object)
        + username: johndoe2 (string, required) - Your username.
        + password: pass (string, required) - Your password.
        + `user_email`: johndoe2@awesome.com (string, required) - Your email.
        + `user_phone`: `518-481-1002` (string, required) - Your phone number in E.164 format.
        + `user_first_name`: John (string, required) - Your first name.
        + `user_last_name`: Doe (string, required) - Your last name.
        + `account_name`: The Awesome Company (string, required) - Your delivery to value.
        + country: US (string, required) - Client country.
    + Body

                {
                    "username":"johndoe2",
                    "user_email":"johndoe2@awesome.com",
                    "user_phone":"518-481-1002",
                    "user_first_name":"John",
                    "user_last_name":"Doe",
                    "country":"US",
                    "password":"pass",
                    "account_name":"The Awesome Company"
                }

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"New reseller has been added.",
            "data":{
                "user_id":117,
                "username":"johndoe2",
                "user_email":"johndoe2@awesome.com",
                "active":0,
                "banned":0,
                "balance":"0.000000",
                "user_phone":"+15184811002",
                "reply_to":"originalemail",
                "delivery_to":null,
                "user_first_name":"John",
                "user_last_name":"Doe",
                "account":0,
                "account_name":"The Awesome Company",
                "account_billing_email":"johndoe2@awesome.com",
                "account_billing_mobile":"+15184811002",
                "country":"US",
                "default_country_sms":"US",
                "auto_recharge":0,
                "auto_recharge_amount":"20.00",
                "low_credit_amount":"0.00",
                "setting_unicode_sms":0,
                "setting_email_sms_subject":0,
                "setting_fix_sender_id":0,
                "setting_sms_message_char_limit":6,
                "old_dashboard":0,
                "balance_commission": "0.299954",
                "timezone": "Australia/Melbourne",
                "_currency":{
                    "currency_name_short":"USD",
                    "currency_prefix_d":"$",
                    "currency_prefix_c":"¢",
                    "currency_name_long":"US Dollars"
                },
                "_subaccount":{
                    "subaccount_id":127,
                    "api_username":"johndoe2",
                    "email":"johndoe2@awesome.com",
                    "phone_number":"+15184811002",
                    "first_name":"John",
                    "last_name":"Doe",
                    "api_key":"A724C6A4-1D1A-93E8-5FB8-62DC1D153CE4",
                    "access_users":1,
                    "access_billing":1,
                    "access_reporting":1,
                    "access_contacts":0,
                    "access_settings":1,
                    "access_sms":0,
                    "access_email":0,
                    "access_voice":0,
                    "access_fax":0,
                    "access_post":0,
                    "access_reseller":0
                }
            }
        }

## Create Reseller Account - Public [POST /reseller/accounts-public]

+ Request (application/json)

    + Attributes (object)
        + `reseller_user_id`: 1 (number, required) - Reseller User ID.
        + username: `john_awesome` (string, required) - Your username.
        + password: pass (string, required) - Your password.
        + `user_email`: johnis@awesome.com (string, required) - Your email.
        + `user_phone`: `+61261063270` (string, required) - Your phone number in E.164 format.
        + `user_first_name`: John (string, required) - Your first name.
        + `user_last_name`: Awesome (string, required) - Your last name.
        + `account_name`: The Awesome Company (string, required) - Your delivery to value.
        + country: AU (string, required) - Client country.
    + Body

            {
                "reseller_user_id":1,
                "username":"john_awesome",
                "user_email":"johnis@awesome.com",
                "user_phone":"+61261063270",
                "user_first_name":"John",
                "user_last_name":"Awesome",
                "country":"AU",
                "password":"pass",
                "account_name":"The Awesome Company"
            }

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"New reseller has been added.",
            "data":{
                "user_id":130,
                "username":"john_awesome",
                "user_email":"johnis@awesome.com",
                "active":0,
                "banned":0,
                "balance":"0.000000",
                "user_phone":"+61261063270",
                "reply_to":"originalemail",
                "delivery_to":null,
                "user_first_name":"John",
                "user_last_name":"Awesome",
                "account":0,
                "account_name":"The Awesome Company",
                "account_billing_email":"johnis@awesome.com",
                "account_billing_mobile":"+61261063270",
                "country":"AU",
                "default_country_sms":"AU",
                "auto_recharge":0,
                "auto_recharge_amount":"20.00",
                "low_credit_amount":"0.00",
                "setting_unicode_sms":0,
                "setting_email_sms_subject":0,
                "setting_fix_sender_id":0,
                "setting_sms_message_char_limit":8,
                "old_dashboard":0,
                "balance_commission": "0.299954",
                "timezone": "Australia/Melbourne",
                "_currency":{
                    "currency_name_short":"AUD",
                    "currency_prefix_d":"$",
                    "currency_prefix_c":"c",
                    "currency_name_long":"Australian Dollars"
                },
                "_subaccount":{
                    "subaccount_id":146,
                    "api_username":"john_awesome",
                    "email":"johnis@awesome.com",
                    "phone_number":"+61261063270",
                    "first_name":"John",
                    "last_name":"Awesome",
                    "api_key":"A144E6D3-3FF9-F3BF-4495-80AE75A0BF88",
                    "access_users":1,
                    "access_billing":1,
                    "access_reporting":1,
                    "access_contacts":0,
                    "access_settings":1,
                    "access_sms":0,
                    "access_email":0,
                    "access_voice":0,
                    "access_fax":0,
                    "access_post":0,
                    "access_reseller":0,
                    "notes":null
                }
            }
        }

## Update Reseller Account [PUT /reseller/accounts/{client_user_id}]

+ Parameters
    + `client_user_id`: 24 (number, required) - Your client user id.

+ Request (application/json)

    + Attributes (object)
        + username: johndoe2 (string, required) - Your username.
        + password: pass (string, required) - Your password.
        + `user_email`: johndoe2@awesome.com (string, required) - Your email.
        + `user_phone`: `518-481-1002` (string, required) - Your phone number in E.164 format.
        + `user_first_name`: John (string, required) - Your first name.
        + `user_last_name`: Doe (string, required) - Your last name.
        + `account_name`: The Awesome Company (string, required) - Your delivery to value.
        + country: `US` (string, required) - Client country.
    + Body

                {
                    "username":"johndoe2",
                    "user_email":"johndoe2@awesome.com",
                    "user_phone":"518-481-1002",
                    "user_first_name":"John",
                    "user_last_name":"Doe",
                    "country":"US",
                    "password":"pass",
                    "account_name":"The Awesome Company"
                }

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Reseller account has been updated.",
            "data":{
                "user_id":117,
                "username":"johndoe2",
                "user_email":"johndoe2@awesome.com",
                "active":0,
                "banned":0,
                "balance":"199.997000",
                "user_phone":"518-481-1002",
                "reply_to":"originalemail",
                "delivery_to":null,
                "user_first_name":"John",
                "user_last_name":"Doe",
                "account":0,
                "account_name":"The Awesome Company",
                "account_billing_email":"johndoe2@awesome.com",
                "account_billing_mobile":"+15184811002",
                "country":"US",
                "default_country_sms":"US",
                "auto_recharge":0,
                "auto_recharge_amount":"20.00",
                "low_credit_amount":"0.00",
                "setting_unicode_sms":0,
                "setting_email_sms_subject":0,
                "setting_fix_sender_id":0,
                "setting_sms_message_char_limit":6,
                "old_dashboard":0,
                "balance_commission": "0.299954",
                "timezone": "Australia/Melbourne",
                "_currency":{
                    "currency_name_short":"USD",
                    "currency_prefix_d":"$",
                    "currency_prefix_c":"¢",
                    "currency_name_long":"US Dollars"
                },
                "_subaccount":null
            }
        }

## Transfer Credit [PUT /reseller/transfer-credit]

+ Request (application/json)

    + Headers

            Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA==

    + Attributes (object)
        + `client_user_id`: 60 (string, required) - Your client user id.
        + balance: 12 (number, required) - Your amount.
        + currency: USD (string, required) - Your currency.

    + Body

                {
                    "client_user_id":60,
                    "balance":12,
                    "currency":"USD"
                }

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Your balance has been successfully transferred.",
            "data":{
                "user_id":60,
                "username":"FHJatAkKXD",
                "user_email":"MEynjL6C3A@2YtIn.com",
                "active":0,
                "banned":0,
                "balance":"170.728701",
                "user_phone":"+61353787971",
                "reply_to":"originalemail",
                "delivery_to":"I1hq9xrvmcNO24sf",
                "user_first_name":"JohnjRk3I",
                "user_last_name":"Doe1uWR5",
                "account":0,
                "account_name":"JohnkMJLv",
                "account_billing_email":"fZpbUQfzE0@NQ9Nt.com",
                "account_billing_mobile":"+61353787898",
                "country":"AU",
                "default_country_sms":"AU",
                "unsubscribe_mail":0,
                "auto_recharge":0,
                "auto_recharge_amount":"20.00",
                "low_credit_amount":"1.50",
                "setting_unicode_sms":0,
                "setting_beta":0,
                "setting_email_sms_subject":0,
                "setting_fix_sender_id":0,
                "setting_sms_message_char_limit":140,
                "_currency":{
                    "currency_name_short":"AUD",
                    "currency_prefix_d":"$",
                    "currency_prefix_c":"c",
                    "currency_name_long":"Australian Dollars"
                },
                "_subaccount":{
                    "subaccount_id":70,
                    "api_username":"a4CQgqG4lS",
                    "email":"fZpbUQfzE0@NQ9Nt.com",
                    "phone_number":"+61353787898",
                    "first_name":"John19k46",
                    "last_name":"DoexkI6a",
                    "api_key":"C9B4AFBA-BDBA-E343-950B-2C63BF6E7901",
                    "access_users":1,
                    "access_billing":1,
                    "access_reporting":1,
                    "access_contacts":0,
                    "access_settings":1,
                    "access_sms":0,
                    "access_email":0,
                    "access_voice":0,
                    "access_fax":0,
                    "access_post":0,
                    "access_reseller":0
                }
            }
        }

# Group SDK

## SDK Download [GET /sdk-download/{type}]

+ Parameters
    + type: cs, java, android, objectivec, angular, ruby, python, php, nodejs, go (string, required) - Supported types.

+ Response 200 (application/json)

        {
            "http_code": 200,
            "response_code": "SUCCESS",
            "response_msg": "Here's your download link.",
            "data": {
                "url": "https://someurl.com/download/RnZfdktoaVBzbmczem9FcVd0eUtmRGp
            }
        }

# Group Search

## Search Contacts-Lists [GET /search/contacts-lists?q={q}]

+ Parameters
    + q: Gorne (string, required) - Your keyword or query.

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Here are some search result.",
            "data":{
                "total":2,
                "per_page":15,
                "current_page":1,
                "last_page":1,
                "next_page_url":null,
                "prev_page_url":null,
                "from":1,
                "to":2,
                "data":[
                    {
                        "id":552807,
                        "name":"Gorne",
                        "contact":"+16783270696",
                        "type":"contact",
                        "contacts_count":null
                    },
                    {
                        "id":428,
                        "name":"Gorne",
                        "contact":"GHPAJCCVGMTD9BLA",
                        "type":"list",
                        "contacts_count":3
                    }
                ]
            }
        }

# Group SMS

# How many messages can I send?

## Send SMS Endpoint

You can post **up to 1000 messages** with each API call. You can send to a mix of contacts and contact lists, as long as the total number of recipients is up to 1000. The response contains a status and details for each recipient.

Refer to [**Application Status Codes**](#introduction/application-status-codes) for the possible response message status strings.

## SMS Campaign Endpoint

You can post to a list with **up to 20000 recipients** with each API call. You can only send to a single list containing up to 20,000 recipients. The response is far less detailed than the normal Send SMS endpoint.

# How many characters can I send in a message?

A standard SMS message has a maximum of 160 characters. Longer messages are definitely possible, however please be aware that exceeding 160 characters will constitute a ‘second’ message. The end user will see this as 1 long message on their handset.
When a message is longer than 160 characters, this is referred to as a multi-part message as it contains multiple messages (or multiple-parts). The total SMS limit then becomes 153 characters per ‘part’ as the 7 characters are used up by invisible headers and footers which denote which part of the message is being sent (i.e. Part 1 of 2). For example:
If a message is longer than 6 message parts, it will be truncated (see below). If a message contains any characters that aren't in the GSM 03.38 character set, the message type will be treated as unicode. (`https://en.wikipedia.org/wiki/GSM_03.38`)

## Standard English Characters:

| Number of Characters | Message Credits |
|---|---|
| 1 - 160 | 1 |
| 161 - 306 | 2 |
| 307 - 459 | 3 |
| 460 - 612 | 4 |
| 613 - 765 | 5 |
| 766 - 918 | 6 |
| 919 - 1071 | 7 |
| 1072 - 1224 | 8 |

## Non-GSM (Unicode) characters:

| Number of Characters | Message Credits |
|---|---|
|1 - 70 | 1 |
|71 - 134 | 2 |
|135 - 201 | 3 |
|202 - 268 | 4 |
|269 - 335 | 5 |
|336 - 402 | 6 |
|403 - 469 | 7 |
|470 - 536 | 8 |

## Send an SMS [/sms/send]

### Send an SMS [POST]

You can post **up to 1000 messages** with each API call.

+ Request (application/json)

    + Headers

            Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA==

    + Attributes
        + source: php (string, optional) - Your method of sending e.g. 'wordpress', 'php', 'c#'.
        + to: +17205963005 (string, required) - Recipient number in E.164 format or local format ([more info](https://help.clicksend.com/SMS/what-format-does-the-recipient-phone-number-need-to-be-in)).
        + `list_id`: 428 (number, optional) - Your list ID if sending to a whole list. Can be used instead of 'to'.
        + body: Biscuit uv3nlCOjRk croissant chocolate lollipop chocolate muffin. (string, required) - Your message.
        + from: +61411111111 (string, optional) - Your sender id - [more info](http://help.clicksend.com/SMS/what-is-a-sender-id-or-sender-number).
        + schedule: 1436174254 (number, optional) - Leave blank for immediate delivery. Your schedule time as a [unix timestamp](http://help.clicksend.com/what-is-a-unix-timestamp).
        + `custom_string`: Custom kn0ChLhwn6 (string, optional) - Your reference. Will be passed back with all replies and delivery reports.
        + country: US (string, optional) - Recipient country.
        + `from_email`: email@yourdomain.com (string, optional) - An email address where the reply should be emailed to. If omitted, the reply will be emailed back to the user who sent the outgoing SMS.

    + Body

                {
                    "messages":[
                        {
                            "source":"php",
                            "from":"sendmobile",
                            "body":"Jelly liquorice marshmallow candy carrot cake 4Eyffjs1vL.",
                            "to":"+61411111111",
                            "schedule":1436874701,
                            "custom_string":"this is a test"
                        },
                        {
                            "source":"php",
                            "from":"sendlist",
                            "body":"Chocolate bar icing icing oat cake carrot cake jelly cotton MWEvciEPIr.",
                            "list_id":428,
                            "schedule":1436876011,
                            "custom_string":"this is a test"
                        }
                    ]
                }

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Here are your data.",
            "data":{
                "total_price":0.28,
                "total_count":4,
                "queued_count":4,
                "messages":[
                    {
                        "direction":"out",
                        "date":1436871253,
                        "to":"+61411111111",
                        "body":"Jelly liquorice marshmallow candy carrot cake 4Eyffjs1vL.",
                        "from":"sendmobile",
                        "schedule":1436874701,
                        "message_id":"BF7AD270-0DE2-418B-B606-71D527D9C1AE",
                        "message_parts":1,
                        "message_price":0.07,
                        "custom_string":"this is a test",
                        "user_id":1,
                        "subaccount_id":1,
                        "country":"AU",
                        "carrier":"Telstra",
                        "status":"SUCCESS"
                    },
                    {
                        "direction":"out",
                        "date":1436871253,
                        "to":"+61411111111",
                        "body":"Chocolate bar icing icing oat cake carrot cake jelly cotton MWEvciEPIr.",
                        "from":"sendlist",
                        "schedule":1436876011,
                        "message_id":"D0C273EE-816D-4DF2-8E9D-9D9C65F168F3",
                        "message_parts":1,
                        "message_price":0.07,
                        "custom_string":"this is a test",
                        "user_id":1,
                        "subaccount_id":1,
                        "country":"AU",
                        "carrier":"Telstra",
                        "status":"SUCCESS"
                    },
                    {
                        "direction":"out",
                        "date":1436871253,
                        "to":"+16783270696",
                        "body":"Chocolate bar icing icing oat cake carrot cake jelly cotton MWEvciEPIr.",
                        "from":"sendlist",
                        "schedule":1436876011,
                        "message_id":"A1845B61-C404-4793-8661-97890C19C8A2",
                        "message_parts":1,
                        "message_price":0.07,
                        "custom_string":"this is a test",
                        "user_id":1,
                        "subaccount_id":1,
                        "country":"US",
                        "carrier":"",
                        "status":"SUCCESS"
                    },
                    {
                        "direction":"out",
                        "date":1436871253,
                        "to":"+16783275492",
                        "body":"Chocolate bar icing icing oat cake carrot cake jelly cotton MWEvciEPIr.",
                        "from":"sendlist",
                        "schedule":1436876011,
                        "message_id":"DB545FAA-7325-465F-A696-8BDBFA8C1E49",
                        "message_parts":1,
                        "message_price":0.07,
                        "custom_string":"this is a test",
                        "user_id":1,
                        "subaccount_id":1,
                        "country":"US",
                        "carrier":"",
                        "status":"SUCCESS"
                    }
                ],
                "currency":{
                    "currency_name_short":"USD",
                    "currency_prefix_d":"$",
                    "currency_prefix_c":"¢",
                    "currency_name_long":"US Dollars"
                }
            }
        }

### Calculate Price [POST /sms/price]

+ Request (application/json)

    + Headers

            Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA==

    + Attributes
        + source: php (string, optional) - Your method of sending e.g. 'wordpress', 'php', 'c#'.
        + to: +17205963005 (string, required) - Recipient number in E.164 format or local format ([more info](https://help.clicksend.com/SMS/what-format-does-the-recipient-phone-number-need-to-be-in)).
        + `list_id`: 428 (number, optional) - Your list ID if sending to a whole list. Can be used instead of 'to'.
        + body: Biscuit uv3nlCOjRk croissant chocolate lollipop chocolate muffin. (string, required) - Your message.
        + from: +61411111111 (string, optional) - Your sender id - [more info](http://help.clicksend.com/SMS/what-is-a-sender-id-or-sender-number).
        + schedule: 1436174254 (number, optional) - Leave blank for immediate delivery. Your schedule time as a [unix timestamp](http://help.clicksend.com/what-is-a-unix-timestamp).
        + `custom_string`: Custom kn0ChLhwn6 (string, optional) - Your reference. Will be passed back with all replies and delivery reports.
        + country: US (string, optional) - Recipient country.

    + Body

                {
                    "messages":[
                        {
                            "source":"php",
                            "from":"sendmobile",
                            "body":"Jelly liquorice marshmallow candy carrot cake 4Eyffjs1vL.",
                            "to":"+61411111111",
                            "schedule":1436874701,
                            "custom_string":"this is a test"
                        },
                        {
                            "source":"php",
                            "from":"sendlist",
                            "body":"Chocolate bar icing icing oat cake carrot cake jelly cotton MWEvciEPIr.",
                            "list_id":428,
                            "schedule":1436876011,
                            "custom_string":"this is a test"
                        }
                    ]
                }

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Here are your data.",
            "data":{
                "total_price":0.2264,
                "total_count":4,
                "queued_count":4,
                "messages":[
                    {
                        "to":"+61411111111",
                        "body":"Jelly liquorice marshmallow candy carrot cake 4Eyffjs1vL.",
                        "from":"sendmobile",
                        "schedule":1436874701,
                        "message_parts":1,
                        "message_price":"0.0566",
                        "custom_string":"this is a test",
                        "country":"AU",
                        "status":"SUCCESS"
                    },
                    {
                        "to":"+61411111111",
                        "body":"Chocolate bar icing icing oat cake carrot cake jelly cotton MWEvciEPIr.",
                        "from":"sendlist",
                        "schedule":1436876011,
                        "message_parts":1,
                        "message_price":"0.0566",
                        "custom_string":"this is a test",
                        "country":"AU",
                        "status":"SUCCESS"
                    },
                    {
                        "to":"+16783270696",
                        "body":"Chocolate bar icing icing oat cake carrot cake jelly cotton MWEvciEPIr.",
                        "from":"sendlist",
                        "schedule":1436876011,
                        "message_parts":1,
                        "message_price":"0.0566",
                        "custom_string":"this is a test",
                        "country":"US",
                        "status":"SUCCESS"
                    },
                    {
                        "to":"+16783275492",
                        "body":"Chocolate bar icing icing oat cake carrot cake jelly cotton MWEvciEPIr.",
                        "from":"sendlist",
                        "schedule":1436876011,
                        "message_parts":1,
                        "message_price":"0.0566",
                        "custom_string":"this is a test",
                        "country":"US",
                        "status":"SUCCESS"
                    }
                ]
            }
        }

## SMS History [/sms/history?date_from={date_from}&date_to={date_to}]

### Get all History [GET]

**SMS Delivery Status**

**Status (status field)**

| Status | Description |
|---|---|---|
| `Completed` | Added to delivery queue. Waiting to be sent to the network.|
| `Sent` | Message sent to the network.|
| `Cancelled` | Message cancelled.|
| `Scheduled` | Message scheduled.|
| `WaitApproval` | Waiting approval by our team. This is temporary and will change to 'Sent' once approved. This only happens for a few messages that are flagged for approval by our automated spam-detection system.|

**Status Codes (status_code field)**

| Code | Text | Description |
|---|---|---|
| `200` | Sent by network| Temporary success|
| `201` | Received on handset| Permanent success|
| `300` | Delivery failure| Permanent failure|
| `301` | Delivery failure| Permanent failure|
| `302` | Delivery failure| Temporary failure - supplier routing issue|

+ Parameters
    + `date_from`: 1449459940 (int, optional) - Timestamp (from) used to show records by date.
    + `date_to`: 1449659940 (int, optional) - Timestamp (to) used to show recrods by date.

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Here are your data.",
            "data":{
                "total":6,
                "per_page":15,
                "current_page":1,
                "last_page":1,
                "next_page_url":null,
                "prev_page_url":null,
                "from":1,
                "to":6,
                "data":[
                    {
                        "direction":"out",
                        "date":"1436932432",
                        "to":"+16783270696",
                        "body":"Chocolate bar icing icing oat cake carrot cake jelly cotton 1iQByXxdLN.",
                        "status":"Completed",
                        "from":"sendlist",
                        "schedule":"1436879372",
                        "status_code":null,
                        "status_text":null,
                        "error_code":null,
                        "error_text":null,
                        "message_id":"4E90F4C3-43A3-489D-9AB8-DA1F4332A0C3",
                        "message_parts":"1.00",
                        "message_price":"0.070000",
                        "from_email":null,
                        "list_id":null,
                        "custom_string":"this is a test",
                        "contact_id":0,
                        "user_id":1,
                        "subaccount_id":1,
                        "country":"US",
                        "carrier":"",
                        "first_name":"John",
                        "last_name":"Doe",
                        "_api_username":"johndoe"
                    },
                    {
                        "direction":"out",
                        "date":"1436932432",
                        "to":"+16783275492",
                        "body":"Chocolate bar icing icing oat cake carrot cake jelly cotton 1iQByXxdLN.",
                        "status":"Completed",
                        "from":"sendlist",
                        "schedule":"1436879372",
                        "status_code":null,
                        "status_text":null,
                        "error_code":null,
                        "error_text":null,
                        "message_id":"7DA5EB64-29FF-4E8A-AB6B-FE945EC9B45E",
                        "message_parts":"1.00",
                        "message_price":"0.070000",
                        "from_email":null,
                        "list_id":null,
                        "custom_string":"this is a test",
                        "contact_id":0,
                        "user_id":1,
                        "subaccount_id":1,
                        "country":"US",
                        "carrier":"",
                        "first_name":"John",
                        "last_name":"Doe",
                        "_api_username":"johndoe"
                    },
                    {
                        "direction":"out",
                        "date":"1436932503",
                        "to":"+61411111111",
                        "body":"Jelly liquorice marshmallow candy carrot cake fgzOlMXuOI.",
                        "status":"Completed",
                        "from":"sendmobile",
                        "schedule":"1436871976",
                        "status_code":null,
                        "status_text":null,
                        "error_code":null,
                        "error_text":null,
                        "message_id":"064AF521-2A27-4B2A-9AB5-C45F555024EA",
                        "message_parts":"1.00",
                        "message_price":"0.070000",
                        "from_email":null,
                        "list_id":null,
                        "custom_string":"this is a test",
                        "contact_id":0,
                        "user_id":1,
                        "subaccount_id":1,
                        "country":"AU",
                        "carrier":"Telstra",
                        "_api_username":"johndoe"
                    },
                    {
                        "direction":"out",
                        "date":"1436932503",
                        "to":"+61411111111",
                        "body":"Chocolate bar icing icing oat cake carrot cake jelly cotton 1iQByXxdLN.",
                        "status":"Completed",
                        "from":"sendlist",
                        "schedule":"1436879372",
                        "status_code":null,
                        "status_text":null,
                        "error_code":null,
                        "error_text":null,
                        "message_id":"25DD465D-2286-45AF-AE25-D7AB36587B57",
                        "message_parts":"1.00",
                        "message_price":"0.070000",
                        "from_email":null,
                        "list_id":null,
                        "custom_string":"this is a test",
                        "contact_id":0,
                        "user_id":1,
                        "subaccount_id":1,
                        "country":"AU",
                        "carrier":"Telstra",
                        "_api_username":"johndoe"
                    },
                    {
                        "direction":"out",
                        "date":"1436932503",
                        "to":"+16783270696",
                        "body":"Chocolate bar icing icing oat cake carrot cake jelly cotton 1iQByXxdLN.",
                        "status":"Completed",
                        "from":"sendlist",
                        "schedule":"1436879372",
                        "status_code":null,
                        "status_text":null,
                        "error_code":null,
                        "error_text":null,
                        "message_id":"CBC8FCF2-78B2-4C7B-ABFB-76B7AC5CB558",
                        "message_parts":"1.00",
                        "message_price":"0.070000",
                        "from_email":null,
                        "list_id":null,
                        "custom_string":"this is a test",
                        "contact_id":0,
                        "user_id":1,
                        "subaccount_id":1,
                        "country":"US",
                        "carrier":"",
                        "first_name":"John",
                        "last_name":"Doe",
                        "_api_username":"johndoe"
                    },
                    {
                        "direction":"out",
                        "date":"1436932503",
                        "to":"+16783275492",
                        "body":"Chocolate bar icing icing oat cake carrot cake jelly cotton 1iQByXxdLN.",
                        "status":"Completed",
                        "from":"sendlist",
                        "schedule":"1436879372",
                        "status_code":null,
                        "status_text":null,
                        "error_code":null,
                        "error_text":null,
                        "message_id":"39266530-5430-44AA-B620-FDFC7D4A9184",
                        "message_parts":"1.00",
                        "message_price":"0.070000",
                        "from_email":null,
                        "list_id":null,
                        "custom_string":"this is a test",
                        "contact_id":0,
                        "user_id":1,
                        "subaccount_id":1,
                        "country":"US",
                        "carrier":"",
                        "first_name":"John",
                        "last_name":"Doe",
                        "_api_username":"johndoe"
                    }
                ]
            }
        }

### Export SMS History [GET /sms/history/export?filename={filename}]

+ Parameters
    + filename: `export.csv` (string, required) - Your export filename.

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Download your file here.",
            "data":{
                "url":"https://rest.clicksend.com/files/22D55AF9-6CF0-476D-A8B3-82A998FD2738?filename=export.csv"
            }
        }

## Delivery Receipts [/sms/receipts]

**Push Delivery Receipts**

If you prefer, we can push message replies to your server as they arrive with us.

1. Log into your account.
2. Click on 'SMS' then 'Settings' tab.
3. Click on the 'SMS Delivery Report Settings' menu.
4. Select 'Forward to URL'.
5. Enter the URL and click 'Save'.


The following variables will be posted to the URL specified:

| Variable | Description |
|---|---|
| `timestamp_send` | Timestamp of the original send request in UNIX format. e.g 1439173980
| `timestamp` | Timestamp of delivery report in UNIX format. e.g 1439173981
| `message_id` | Message ID, returned when originally sending the message.
| `status` | Delivered or Undelivered
| `status_code` | Status code. Refer to 'SMS Delivery Status Codes' in docs.
| `status_text` | Status text.
| `error_code` | Error code.
| `error_text` | Error text.
| `custom_string` | A custom string used when sending the original message.
| `user_id` | The user ID of the user who sent the message.
| `subaccount_id` | The subaccount ID of the user who sent the message.
| `message_type` | 'sms' (constant).




**Pull Delivery Receipts**

Receive delivery reports by polling.
You can poll our server and retrieve delivery reports at a time that suits you.

1. Log into your account.
2. Click on 'SMS' then 'Settings' tab.
3. Click on the 'SMS Delivery Report Settings' menu.
4. Select 'Poll our server' and click 'Save'.

### Get all Delivery Receipts [GET]

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Here are your delivery receipts.",
            "data":{
                "total":3,
                "per_page":15,
                "current_page":1,
                "last_page":1,
                "next_page_url":null,
                "prev_page_url":null,
                "from":1,
                "to":3,
                "data":[
                    {
                        "timestamp_send":"1442381791",
                        "timestamp":"1442381791",
                        "message_id":"31BC271B-1E0C-45F6-9E7E-97186C46BB82",
                        "status_code":"201",
                        "status_text":"Success: Message received on handset.",
                        "error_code":null,
                        "error_text":null,
                        "custom_string":null,
                        "_message_type":"sms"
                    },
                    {
                        "timestamp_send":"1442381829",
                        "timestamp":"1442381829",
                        "message_id":"23C8ADA3-FD8B-420B-801A-F829BB87AC6F",
                        "status_code":"201",
                        "status_text":"Success: Message received on handset.",
                        "error_code":null,
                        "error_text":null,
                        "custom_string":null,
                        "_message_type":"sms"
                    },
                    {
                        "timestamp_send":"1442381861",
                        "timestamp":"1442381861",
                        "message_id":"3BD22FAD-A5D3-4D99-B4C0-16BF65BE052C",
                        "status_code":"201",
                        "status_text":"Success: Message received on handset.",
                        "error_code":null,
                        "error_text":null,
                        "custom_string":null,
                        "_message_type":"sms"
                    }
                ]
            }
        }

### Get a Specific Delivery Receipt [GET /sms/receipts/{message_id}]

+ Parameters
  + `message_id`: 88AB118E EB1B 478C 98CE 6C73ABA23F67 (string, required) - Your message id.

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Your receipt.",
            "data":{
                "timestamp_send":"1450854013",
                "timestamp":"1451200622",
                "message_id":"88AB118E-EB1B-478C-98CE-6C73ABA23F67",
                "status_code":"Completed",
                "status_text":"statustext",
                "error_code":"errorcode",
                "error_text":"errortext",
                "custom_string":"",
                "message_type":"sms"
            }
        }

### Add a Test Delivery Receipt [POST]

+ Request (application/json)

    + Attributes (object)
        + url: http://yourdomain.com (string, required) - Your URL if using the push option or 'poll' if using the pull option.

    + Body

                {
                    "url":"http://yourdomain.com"
                }

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Receipt has been added",
            "data":{
                "timestamp":"1441958441",
                "message_id":"493FFB41-9733-4641-985F-BD79A067B58F",
                "status_code":"201",
                "status_text":"Success: Message received on handset.",
                "error_code":null,
                "error_text":null,
                "custom_string":null
            }
        }

### Mark Delivery Receipts as read [PUT /sms/receipts-read]

+ Request (application/json)

    + Attributes (object)
        + `date_before`: 1441958441 (number, optional) - An optional timestamp - mark all as read before this timestamp. If not given, all receipts will be marked as read.


    + Body

            {
                "date_before": 1441958441
            }

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Receipts has been marked as read.",
            "data":[]
        }

# Inbound SMS [/sms/inbound]

**Push Inbound SMS**

If you prefer, we can push message replies to your server as they arrive with us.

1. Log into your account.
2. Click on 'SMS' then 'Settings' tab.
3. Click on the 'Inbound SMS Settings' menu.
4. Add a new rule to and select Action: 'URL'.
5. Enter the URL and click 'Save'.

The following variables will be posted to the URL specified:

| Variable | Description |
|---|---|
| `timestamp` | Timestamp in UNIX format. e.g 1439173981
| `to` | Number that the SMS was sent to (your Dedicated or shared number).
| `from` | Recipient Mobile Number that sent the reply message.
| `body` | Inbound message body.
| `original_body` | Original outgoing SMS message body.
| `original_message_id` | Original SMS message ID. Returned when originally sending the message.
| `custom_string` | A custom string used when sending the original message.
| `user_id` | The user ID of the user who sent the message.
| `subaccount_id` | The subaccount ID of the user who sent the message.
| `message_id` | The Message ID for the inbound message.

Note: HTTP `POST` is used to send the variables (not `GET` or query-string). [**More Info**](http://www.w3schools.com/tags/ref_httpmethods.asp).

Your URL should respond with a 200 OK HTTP status code. If we receive a non-200 response or your URL is down/times out, we will continue to retry every minute until we reach 10 retries. After 10 attempts, we'll mark it as completed. If your server is down for a long period of time, we can manually re-queue the data.

**Pull Inbound SMS**

Receive SMS by polling your Inbox.
You can poll our server and retrieve new Messages at a time that suits you.

1. Log into your account.
2. Click on 'SMS' then 'Settings' tab.
3. Click on the 'Inbound SMS Settings' menu.
4. Select Action: 'POLL' and click 'Save'.

### Get all Inbound SMS - Pull [GET /sms/inbound]

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Here are your data.",
            "data":{
                "total":3,
                "per_page":15,
                "current_page":1,
                "last_page":1,
                "next_page_url":null,
                "prev_page_url":null,
                "from":1,
                "to":3,
                "data":[
                    {
                        "timestamp":"1436174407",
                        "from":"+61411111111",
                        "body":"Liquorice sweet roll fruitcake gummies. ",
                        "original_body":"Liquorice sweet roll fruitcake gummies. ",
                        "original_message_id":"C557B56E-83C0-4070-A74C-9BF05474B418",
                        "to":"SC557B56E-83C0-4070-A74C-9BF05474B418",
                        "custom_string":"22PKU978RF",
                        "message_id" : "C557B56E-83C0-4070-A74C-9BF05474B418",
                        "_keyword":"liquorice"
                    },
                    {
                        "timestamp":"1436174406",
                        "from":"Lemon drops brownie pie chocolate bar pie swe",
                        "body":"Lemon drops brownie pie chocolate bar pie sweet jelly-o chocolate.",
                        "original_body":"Lemon drops brownie pie chocolate bar pie sweet jelly-o chocolate.",
                        "original_message_id":"373F7121-8089-42FA-8F5C-8F8F7C18DFAA",
                        "to":"S373F7121-8089-42FA-8F5C-8F8F7C18DFAA",
                        "custom_string":"2ATQKLETYX",
                        "message_id" : "C557B56E-83C0-4070-A74C-9BF05474B418",
                        "_keyword":"lemon"
                    },
                    {
                        "timestamp":"1436174405",
                        "from":"Jelly beans jelly cupcake bear claw gummies.",
                        "body":"Jelly beans jelly cupcake bear claw gummies.",
                        "original_body":"Jelly beans jelly cupcake bear claw gummies.",
                        "original_message_id":"A9F3863C-D88E-4A54-BEF1-BD73A6E42E2E",
                        "to":"SA9F3863C-D88E-4A54-BEF1-BD73A6E42E2E",
                        "custom_string":"0PZCOGJP0A",
                        "message_id" : "C557B56E-83C0-4070-A74C-9BF05474B418",
                        "_keyword":"jelly"
                    }
                ]
            }
        }

### Get Specific Inbound - Pull [GET /sms/inbound/{outbound_message_id}]

+ Parameters
    + `outbound_message_id`: `C557B56E-83C0-4070-A74C-9BF05474B418` (required, string) - Message ID of the original outbound message, to which the inbound message is a reply. Must be a valid GUID.

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Here's your result.",
            "data":{
                "timestamp":"1457947468",
                "from":"+61410926433",
                "body":"This is a test incoming SMS. IWXTUW9DCH.",
                "original_body":"This is the original message. 0CSO0ITKJM.",
                "original_message_id":"5D420421-8715-4461-A9A2-C8F569E41835",
                "to":"+61411111111",
                "custom_string":"custom_string",
                "message_id" : "C557B56E-83C0-4070-A74C-9BF05474B418",
                "_keyword":"this"
            }
        }


### Add a Test Inbound SMS [POST /sms/inbound]

+ Request (application/json)

    + Attributes (object)
        + url: http://yourdomain.com (string, required) - Your URL if using the push option or 'poll' if using the pull option.

    + Body

                {
                    "url":"http://yourdomain.com"
                }

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Here are your incoming messages.",
            "data":{
                "timestamp":"1442398236",
                "from":"+61468460249",
                "body":"This is a test incoming SMS. 5IHHOWWZTB.",
                "original_body":"This is the original message. AA4NN45X7J.",
                "original_message_id":"F35B6DF1-0C9E-488F-954E-2F603B6192F5",
                "to":"+61411111111",
                "custom_string":null,
                "message_id" : "C557B56E-83C0-4070-A74C-9BF05474B418",
                "_keyword":"this"
            }
        }

### Mark a specific Inbound SMS as read [PUT /sms/inbound-read/{message_id}]

+ Request (application/json)

+ Parameters
    + `message_id`: `C557B56E-83C0-4070-A74C-9BF05474B418` (required, string) - Message ID. Must be a valid GUID.

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Inbound messages have been marked as read.",
            "data":[]
        }

### Mark all Inbound SMS as read [PUT /sms/inbound-read]

+ Request (application/json)

    + Attributes (object)
        + `date_before`: 1442398100 (number, required) - An optional timestamp - mark all as read before this timestamp. If not given, all messages will be marked as read.

    + Body

                {
                    "date_before":1442398100
                }


+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Inbound messages have been marked as read.",
            "data":[]
        }

## Cancel Scheduled Messages [/sms/{message_id}/cancel]

### Cancel a Scheduled Message [PUT]

+ Parameters
    + `message_id`: 307EF035-B7CE432193CD-0753597B7293 (string, required) - The message ID you want to cancel.

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Message 307EF035-B7CE-4321-93CD-0753597B7293 has been cancelled.",
            "data":[]
        }

### Cancel all Scheduled Messages [PUT /sms/cancel-all]

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"5 messages has been cancelled.",
            "data":{
                "count":5
            }
        }

# Group SMS Campaigns

### Create SMS Campaign [POST /sms-campaigns/send]

You can post to a list with **up to 20000 recipients** with each API call.

+ Request (application/json)

    + Attributes
        + `list_id`: 428 (number, required) - Your list id.
        + name: My Campaign 1 (string, required) - Your campaign name.
        + from: +61411111111 (string, optional) - Your sender id - [more info](http://help.clicksend.com/SMS/what-is-a-sender-id-or-sender-number).
        + body: This is my new campaign message. (string, required) - Your campaign message.
        + schedule: 1444821615 (number, optional) - Leave blank for immediate delivery. Your schedule time as a [unix timestamp](http://help.clicksend.com/what-is-a-unix-timestamp).

    + Body

            {
                "list_id":428,
                "name":"My Campaign 1",
                "from":"+61353787448",
                "body":"This is my new campaign message.",
                "schedule":1444821615
            }

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Your new campaign has been added.",
            "data":{
                "sms_campaign_id":7,
                "name":"My Campaign 1",
                "user_id":1,
                "subaccount_id":1,
                "list_id":428,
                "from":"+61353787448",
                "body":"This is my new campaign message.",
                "schedule":"1444821615",
                "status":"Queued",
                "date_added":"1444962630",
                "custom_string":null,
                "source":null
            }
        }

### Calculate Price for SMS Campaign [POST /sms-campaigns/price]

+ Request (application/json)

    + Attributes
        + `list_id`: 428 (number, required) - Your list id.
        + name: My Campaign 1 (string, required) - Your campaign name.
        + from: +61411111111 (string, optional) - Your sender id - [more info](http://help.clicksend.com/SMS/what-is-a-sender-id-or-sender-number).
        + body: "First Name, this is your new campaign message." (string, required) - Your campaign message.

    + Body

            {
                "list_id":428,
                "name":"My Campaign 1",
                "from":"+61353787448",
                "body":"(First Name), this is your new campaign message."
            }

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Here is your price for your SMS Campaign.",
            "data":{
                "total_count":1,
                "total_price":"0.035",
                "data":{
                    "from":"+61353787448",
                    "body":"John, this is your new campaign message.",
                    "schedule":1444381346
                },
                "currency":{
                    "currency_name_short":"GBP",
                    "currency_prefix_d":"£",
                    "currency_prefix_c":"p",
                    "currency_name_long":"British Pounds"
                }
            }
        }
## Existing SMS Campaigns [/sms-campaigns/{sms_campaign_id}]
### Update an SMS Campaign [PUT]

+ Parameters
    + `sms_campaign_id`: 1 (number, required) - Your SMS Campaign id.

+ Request (application/json)

    + Attributes
        + `list_id`: 428 (number, required) - Your list id.
        + name: Awesome campaign. (string, required) - Your campaign name.
        + from: +61411111111 (string, optional) - Your sender id - [more info](http://help.clicksend.com/SMS/what-is-a-sender-id-or-sender-number).
        + body: This is an awesome message. (string, required) - Your campaign message.
        + schedule: 1444821615 (number, optional) - Leave blank for immediate delivery. Will replace existing schedule (even if left blank). Your schedule time as a [unix timestamp](http://help.clicksend.com/what-is-a-unix-timestamp).

    + Body

            {
                "list_id":428,
                "name":"Awesome campaign.",
                "from":"+61353787447",
                "body":"his is an awesome message.",
                "schedule":1444821615
            }

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Your SMS Campaign has been updated.",
            "data":{
                "sms_campaign_id":1,
                "name":"Awesome campaign.",
                "user_id":1,
                "subaccount_id":1,
                "list_id":428,
                "from":"+61353787447",
                "body":"This is an awesome message.",
                "schedule":"1444821615",
                "status":"Queued",
                "date_added":"1444962803",
                "ip_address":"192.168.10.1",
                "custom_string":null,
                "source":null
            }
        }

### Get SMS Campaign [GET]

+ Parameters
    + `sms_campaign_id`: 1 (number, required) - Your SMS campaign id.

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Your SMS Campaign.",
            "data":{
                "sms_campaign_id":2,
                "name":"My Campaign 1",
                "user_id":1,
                "subaccount_id":1,
                "list_id":428,
                "from":"+61353787448",
                "body":"This is my new campaign message.",
                "schedule":"1444821615",
                "status":"Sent",
                "date_added":"1444882068",
                "ip_address":"192.168.10.1",
                "custom_string":null,
                "source":null,
                "_total_count":10
            }
        }

### Cancel an SMS Campaign [PUT /sms-campaigns/{sms_campaign_id}/cancel]

+ Parameters
    + `sms_campaign_id`: 1 (number, required) - Your SMS Campaign id.

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Your SMS Campaign has been cancelled.",
            "data":{
                "sms_campaign_id":1,
                "name":"Awesome campaign.",
                "user_id":1,
                "subaccount_id":1,
                "list_id":428,
                "from":"+61353787447",
                "body":"This is an awesome message.",
                "schedule":"1444821615",
                "status":"Cancelled",
                "date_added":"1444959876",
                "ip_address":"192.168.10.1",
                "custom_string":null,
                "source":null
            }
        }


### Get list of SMS Campaigns [GET /sms-campaigns]

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Here are your SMS campaigns.",
            "data":{
                "total":7,
                "per_page":20,
                "current_page":1,
                "last_page":1,
                "next_page_url":null,
                "prev_page_url":null,
                "from":1,
                "to":7,
                "data":[
                    {
                        "sms_campaign_id":1,
                        "name":"This is my awesome campaign.",
                        "user_id":1,
                        "subaccount_id":1,
                        "list_id":428,
                        "from":"+61353787447",
                        "body":"This is my new campaign message.",
                        "schedule":"1444821615",
                        "status":"Cancelled",
                        "date_added":"1444962803",
                        "ip_address":"192.168.10.1",
                        "custom_string":null,
                        "source":null,
                        "_total_count":10
                    },
                    {
                        "sms_campaign_id":7,
                        "name":"My Campaign 1",
                        "user_id":1,
                        "subaccount_id":1,
                        "list_id":428,
                        "from":"+61353787448",
                        "body":"This is my new campaign message.",
                        "schedule":"1444821615",
                        "status":"Queued",
                        "date_added":"1444962630",
                        "ip_address":"192.168.10.1",
                        "custom_string":null,
                        "source":null,
                        "_total_count":10
                    },
                    {
                        "sms_campaign_id":6,
                        "name":"My Campaign 1",
                        "user_id":1,
                        "subaccount_id":1,
                        "list_id":428,
                        "from":"+61353787448",
                        "body":"This is my new campaign message.",
                        "schedule":"1444821615",
                        "status":"Queued",
                        "date_added":"1444893067",
                        "ip_address":"192.168.10.1",
                        "custom_string":null,
                        "source":null,
                        "_total_count":10
                    },
                    {
                        "sms_campaign_id":5,
                        "name":"My Campaign 1",
                        "user_id":1,
                        "subaccount_id":1,
                        "list_id":428,
                        "from":"+61353787448",
                        "body":"This is my new campaign message.",
                        "schedule":"1444821615",
                        "status":"Sent",
                        "date_added":"1444891837",
                        "ip_address":"192.168.10.1",
                        "custom_string":null,
                        "source":null,
                        "_total_count":10
                    },
                    {
                        "sms_campaign_id":4,
                        "name":"My Campaign 1",
                        "user_id":1,
                        "subaccount_id":1,
                        "list_id":428,
                        "from":"+61353787448",
                        "body":"This is my new campaign message.",
                        "schedule":"1444821615",
                        "status":"Sent",
                        "date_added":"1444888498",
                        "ip_address":"192.168.10.1",
                        "custom_string":null,
                        "source":null,
                        "_total_count":10
                    },
                    {
                        "sms_campaign_id":3,
                        "name":"My Campaign 1",
                        "user_id":1,
                        "subaccount_id":1,
                        "list_id":428,
                        "from":"+61353787448",
                        "body":"This is my new campaign message.",
                        "schedule":"1444821615",
                        "status":"Sent",
                        "date_added":"1444882130",
                        "ip_address":"192.168.10.1",
                        "custom_string":null,
                        "source":null,
                        "_total_count":10
                    },
                    {
                        "sms_campaign_id":2,
                        "name":"My Campaign 1",
                        "user_id":1,
                        "subaccount_id":1,
                        "list_id":428,
                        "from":"+61353787448",
                        "body":"This is my new campaign message.",
                        "schedule":"1444821615",
                        "status":"Sent",
                        "date_added":"1444882068",
                        "ip_address":"192.168.10.1",
                        "custom_string":null,
                        "source":null,
                        "_total_count":10
                    }
                ]
            }
        }

## URL Shortening [/sms-campaigns]

We support URL shortening and subsequent link tracking within SMS campaigns. Your long URL will be replaced with `smsg.us/xxxxx`, where `xxxxx` is replaced with a randomly-generated, five-character code.

This allows you to not only save on message space when sending a long link (as ours is only 13 characters long), but also allows you to see which of your customers has visited the link and track specific details about your users, including:

1. Their approximate geographical area and country.
2. The device (e.g. `phone`), operating system (e.g. `iOS`) and browser (e.g. `Safari`) that they're using.
4. The time they visited the link.
5. How many times the link has been visited.

All of this is broken down into simple categorised statistics to give you a better idea of your customers' engagement.

To use Short URLs, all you need to do is:

1. Insert `smsg.us/xxxxx` anywhere in the `body` of your campaign. Note that this is literally the string, including the `xxxxx` - which will be automatically replaced prior to sending.
2. Include the attribute `url_to_shorten` specifying the long URL you want users to visit.

Note that if either of these two items are included without the other, an error will be returned.

### Use Short URL [POST /sms-campaigns/send]

This is functionally identical to the **POST /sms-campaigns/send** endpoint, other than adding the `smsg.us/xxxxx` string to the message body additional `url_to_shorten` parameter.

+ Request (application/json)

    + Attributes
        + `list_id`: 428 (number, required) - Your list id.
        + name: My Campaign 1 (string, required) - Your campaign name.
        + from: +61411111111 (string, optional) - Your sender id - [more info](http://help.clicksend.com/SMS/what-is-a-sender-id-or-sender-number).
        + body: This is my new campaign message. Visit this url: smsg.us/xxxxx (string, required) - Your campaign message.
        + `url_to_shorten`: http://yourdomain.com/ (string, required) - The URL you want to shorten (only required when using this feature). This must be only `http` or `https`.
        + schedule: 1444821615 (number, optional) - Leave blank for immediate delivery. Your schedule time as a [unix timestamp](http://help.clicksend.com/what-is-a-unix-timestamp).

    + Body

            {
                "list_id":428,
                "name":"My Campaign 1",
                "from":"+61353787448",
                "body":"This is my new campaign message. Visit this url: smsg.us/xxxxx",
                "url_to_shorten": "http://yourdomain.com/",
                "schedule":1444821615
            }

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Your new campaign has been added.",
            "data":{
                "sms_campaign_id":7,
                "name":"My Campaign 1",
                "user_id":1,
                "subaccount_id":1,
                "list_id":428,
                "from":"+61353787448",
                "body":"This is my new campaign message. Visit this url: smsg.us/xxxxx",
                "schedule":"1444821615",
                "status":"Queued",
                "date_added":"1444962630",
                "url_to_shorten": "http://yourdomain.com/",
                "custom_string":null,
                "source":null
            }
        }

### Link Tracking [GET /sms-campaigns/{campaign_id}/link-tracking]

This endpoint gives you a paginated overview of all the links in a particular campaign, and who has and hasn't visited them.

+ Parameters
    + `campaign_id`: 1 (number, required) - Your campaign id.

+ Response 200 (application/json)

        {
            "http_code": 200,
            "response_code": "SUCCESS",
            "response_msg": "Here is your result.",
            "data": {
                "total": 3,
                "per_page": 15,
                "current_page": 1,
                "last_page": 1,
                "next_page_url": "https://rest.clicksend.com/v3/sms-campaigns/1/link-tracking?page=2",
                "prev_page_url": null,
                "from": 1,
                "to": 3,
                "data": [
                    {
                        "open_count": 0,
                        "date_opened": null,
                        "user_geo_country": null,
                        "user_geo_region": null,
                        "user_device": null,
                        "user_browser": null,
                        "user_os": null,
                        "contact": {
                            "contact_id": 1,
                            "first_name": "John",
                            "last_name": "Smith",
                            "phone_number": "+61411111111"
                        }
                    },
                    {
                        "open_count": 2,
                        "date_opened": 1508130356,
                        "user_geo_country": "US",
                        "user_geo_region": "Illinois",
                        "user_device": "desktop",
                        "user_browser": "Chrome",
                        "user_os": "OS X",
                        "contact": {
                            "contact_id": 2,
                            "first_name": "Jane",
                            "last_name": "Doe",
                            "phone_number": "+61422222222"
                        }
                    },
                    {
                        "open_count": 1,
                        "date_opened": 1508130333,
                        "user_geo_country": "CA",
                        "user_geo_region": "Newfoundland and Labrador",
                        "user_device": "phone",
                        "user_browser": "Safari",
                        "user_os": "iOS",
                        "contact": {
                            "contact_id": 3,
                            "first_name": "Jill",
                            "last_name": "Smith",
                            "phone_number": "+61433333333"
                        }
                    }
                ]
            }
        }

### Link Tracking Export [GET /sms-campaigns/{campaign_id}/link-export?filename={filename}]

Compile all link tracking for the specified campaign into a CSV for download.

+ Parameters
    + `campaign_id`: 1 (number, required) - Your campaign id.
    + filename: `export.csv` (string, required) - Your export filename.

+ Response 200 (application/json)

        {
            "http_code": 200,
            "response_code": "SUCCESS",
            "response_msg": "Download your file here.",
            "data": {
                "url": "https://rest.clicksend.com/files/24C16065-FB6F-400A-B922-C814C6A32727?filename=export.csv"
            }
        }


### Link Statistics [GET /sms-campaigns/{campaign_id}/link-statistics]

Get the breakdown of statistics for your campaign. Note that the returned values vary depending on your specific customers' interaction, so it's not safe to assume a value will always be specified.

+ Parameters
    + `campaign_id`: 1 (number, required) - Your campaign id.

+ Response 200 (application/json)

        {
            "http_code": 200,
            "response_code": "SUCCESS",
            "response_msg": "Here is your result.",
            "data": {
                "links": {
                    "opened": 108,
                    "unopened": 1
                },
                "device": [
                    {
                        "label": "Desktop",
                        "count": 98
                    },
                    {
                        "label": "Mobile",
                        "count": 10
                    }
                ],
                "os": [
                    {
                        "label": "IOS",
                        "count": 10
                    },
                    {
                        "label": "OS X",
                        "count": 98
                    }
                ],
                "browser": [
                    {
                        "label": "Chrome",
                        "count": 95
                    },
                    {
                        "label": "Opera",
                        "count": 3
                    },
                    {
                        "label": "Safari",
                        "count": 10
                    }
                ],
                "country": [
                    {
                        "label": "Other",
                        "count": 15
                    },
                    {
                        "label": "AF",
                        "count": 1
                    },
                    {
                        "label": "AR",
                        "count": 2
                    },
                    {
                        "label": "AU",
                        "count": 1
                    },
                    {
                        "label": "BE",
                        "count": 2
                    },
                    {
                        "label": "BR",
                        "count": 4
                    },
                    {
                        "label": "CA",
                        "count": 3
                    },
                    {
                        "label": "CH",
                        "count": 1
                    },
                    {
                        "label": "CN",
                        "count": 11
                    },
                    {
                        "label": "CZ",
                        "count": 1
                    },
                    {
                        "label": "DE",
                        "count": 4
                    },
                    {
                        "label": "DK",
                        "count": 1
                    },
                    {
                        "label": "ES",
                        "count": 1
                    },
                    {
                        "label": "FR",
                        "count": 2
                    },
                    {
                        "label": "GB",
                        "count": 1
                    },
                    {
                        "label": "IN",
                        "count": 3
                    },
                    {
                        "label": "IR",
                        "count": 1
                    },
                    {
                        "label": "JP",
                        "count": 5
                    },
                    {
                        "label": "KR",
                        "count": 3
                    },
                    {
                        "label": "MY",
                        "count": 1
                    },
                    {
                        "label": "PK",
                        "count": 2
                    },
                    {
                        "label": "PL",
                        "count": 1
                    },
                    {
                        "label": "RU",
                        "count": 3
                    },
                    {
                        "label": "SK",
                        "count": 1
                    },
                    {
                        "label": "TW",
                        "count": 2
                    },
                    {
                        "label": "UA",
                        "count": 1
                    },
                    {
                        "label": "US",
                        "count": 34
                    },
                    {
                        "label": "ZA",
                        "count": 1
                    }
                ]
            }
        }

# Group SMS Templates

## Templates [/sms/templates]

### List of Templates [GET]
Get list of templates.

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Here are your data.",
            "data":{
                "total":10,
                "per_page":15,
                "current_page":1,
                "last_page":1,
                "next_page_url":null,
                "prev_page_url":null,
                "from":1,
                "to":10,
                "data":[
                    {
                        "template_id":1,
                        "body":"This is a sample template.",
                        "template_name":"My Awesome Template"
                    },
                    {
                        "template_id":2,
                        "body":"This is a sample template.",
                        "template_name":"My Awesome Template"
                    },
                    {
                        "template_id":3,
                        "body":"This is a sample template.",
                        "template_name":"My Awesome Template"
                    },
                    {
                        "template_id":4,
                        "body":"This is a sample template.",
                        "template_name":"My Awesome Template"
                    },
                    {
                        "template_id":5,
                        "body":"This is a sample template.",
                        "template_name":"My Awesome Template"
                    },
                    {
                        "template_id":6,
                        "body":"This is a sample template.",
                        "template_name":"My Awesome Template"
                    },
                    {
                        "template_id":7,
                        "body":"This is a sample template.",
                        "template_name":"My Awesome Template"
                    },
                    {
                        "template_id":8,
                        "body":"This is a sample template.",
                        "template_name":"My Awesome Template"
                    },
                    {
                        "template_id":9,
                        "body":"This is a sample template.",
                        "template_name":"My Awesome Template"
                    },
                    {
                        "template_id":10,
                        "body":"This is a sample template.",
                        "template_name":"My Awesome Template"
                    }
                ]
            }
        }

### Create a Template [POST]
Create new template.

+ Request (application/json)

    + Headers

            Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA==

    + Attributes (object)
        + `template_name`: Template 501916 (string, required) - Your template name.
        + body: This is a sample content: H7YI68B3yk for this template. (string, required) - Your template body.

    + Body

                {
                    "template_name":"Template 501916",
                    "body":"This is a sample content: H7YI68B3yk for this template."
                }

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"New template has been saved.",
            "data":{
                "template_id":25,
                "body":"This is a sample content: H7YI68B3yk for this template.",
                "template_name":"Template 501916"
            }
        }

## Update a Template [PUT /sms/templates/{template_id}]

+ Parameters
    + `template_id`: 25 (string, required) - Your template id.

+ Request (application/json)

    + Headers

            Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA==

    + Attributes (object)
        + `template_name`: I am updated (string, required) - Your template name.
        + body: This is a sample content: Sc0KNWgSMG for this template. (string, required) - Your template body.

    + Body

                {
                    "template_name":"I am updated",
                    "body":"This is a sample content: Sc0KNWgSMG for this template."
                }

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Your template has been updated.",
            "data":{
                "template_id":25,
                "body":"This is a sample content: Sc0KNWgSMG for this template.",
                "template_name":"I am updated"
            }
        }

## Delete a Template [DELETE /sms/templates/{template_id}]

+ Parameters
    + `template_id`: 25 (string, required) - Your template id.

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Your template has been deleted.",
            "data":[]
        }

# Group Statistics

### Get SMS Statistics [GET /statistics/sms]

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Here are your data.",
            "data":{
                "total":{
                    "outbound":{
                        "count":132,
                        "price":9.24
                    },
                    "inbound":{
                        "count":0
                    },
                    "bounced":{
                        "count":0
                    }
                },
                "stat":[
                    {
                        "date":1434412800,
                        "outbound":{
                            "count":0,
                            "price":0
                        },
                        "inbound":{
                            "count":0
                        },
                        "bounced":{
                            "count":0
                        }
                    },
                    {
                        "date":1434499200,
                        "outbound":{
                            "count":0,
                            "price":0
                        },
                        "inbound":{
                            "count":0
                        },
                        "bounced":{
                            "count":0
                        }
                    },
                    {
                        "date":1434585600,
                        "outbound":{
                            "count":0,
                            "price":0
                        },
                        "inbound":{
                            "count":0
                        },
                        "bounced":{
                            "count":0
                        }
                    },
                    {
                        "date":1434672000,
                        "outbound":{
                            "count":0,
                            "price":0
                        },
                        "inbound":{
                            "count":0
                        },
                        "bounced":{
                            "count":0
                        }
                    },
                    {
                        "date":1434758400,
                        "outbound":{
                            "count":0,
                            "price":0
                        },
                        "inbound":{
                            "count":0
                        },
                        "bounced":{
                            "count":0
                        }
                    },
                    {
                        "date":1434844800,
                        "outbound":{
                            "count":0,
                            "price":0
                        },
                        "inbound":{
                            "count":0
                        },
                        "bounced":{
                            "count":0
                        }
                    },
                    {
                        "date":1434931200,
                        "outbound":{
                            "count":0,
                            "price":0
                        },
                        "inbound":{
                            "count":0
                        },
                        "bounced":{
                            "count":0
                        }
                    },
                    {
                        "date":1435017600,
                        "outbound":{
                            "count":0,
                            "price":0
                        },
                        "inbound":{
                            "count":0
                        },
                        "bounced":{
                            "count":0
                        }
                    },
                    {
                        "date":1435104000,
                        "outbound":{
                            "count":0,
                            "price":0
                        },
                        "inbound":{
                            "count":0
                        },
                        "bounced":{
                            "count":0
                        }
                    },
                    {
                        "date":1435190400,
                        "outbound":{
                            "count":0,
                            "price":0
                        },
                        "inbound":{
                            "count":0
                        },
                        "bounced":{
                            "count":0
                        }
                    },
                    {
                        "date":1435276800,
                        "outbound":{
                            "count":0,
                            "price":0
                        },
                        "inbound":{
                            "count":0
                        },
                        "bounced":{
                            "count":0
                        }
                    },
                    {
                        "date":1435363200,
                        "outbound":{
                            "count":0,
                            "price":0
                        },
                        "inbound":{
                            "count":0
                        },
                        "bounced":{
                            "count":0
                        }
                    },
                    {
                        "date":1435449600,
                        "outbound":{
                            "count":0,
                            "price":0
                        },
                        "inbound":{
                            "count":0
                        },
                        "bounced":{
                            "count":0
                        }
                    },
                    {
                        "date":1435536000,
                        "outbound":{
                            "count":0,
                            "price":0
                        },
                        "inbound":{
                            "count":0
                        },
                        "bounced":{
                            "count":0
                        }
                    },
                    {
                        "date":1435622400,
                        "outbound":{
                            "count":0,
                            "price":0
                        },
                        "inbound":{
                            "count":0
                        },
                        "bounced":{
                            "count":0
                        }
                    },
                    {
                        "date":1435708800,
                        "outbound":{
                            "count":0,
                            "price":0
                        },
                        "inbound":{
                            "count":0
                        },
                        "bounced":{
                            "count":0
                        }
                    },
                    {
                        "date":1435795200,
                        "outbound":{
                            "count":0,
                            "price":0
                        },
                        "inbound":{
                            "count":0
                        },
                        "bounced":{
                            "count":0
                        }
                    },
                    {
                        "date":1435881600,
                        "outbound":{
                            "count":0,
                            "price":0
                        },
                        "inbound":{
                            "count":0
                        },
                        "bounced":{
                            "count":0
                        }
                    },
                    {
                        "date":1435968000,
                        "outbound":{
                            "count":0,
                            "price":0
                        },
                        "inbound":{
                            "count":0
                        },
                        "bounced":{
                            "count":0
                        }
                    },
                    {
                        "date":1436054400,
                        "outbound":{
                            "count":0,
                            "price":0
                        },
                        "inbound":{
                            "count":0
                        },
                        "bounced":{
                            "count":0
                        }
                    },
                    {
                        "date":1436140800,
                        "outbound":{
                            "count":0,
                            "price":0
                        },
                        "inbound":{
                            "count":0
                        },
                        "bounced":{
                            "count":0
                        }
                    },
                    {
                        "date":1436227200,
                        "outbound":{
                            "count":0,
                            "price":0
                        },
                        "inbound":{
                            "count":0
                        },
                        "bounced":{
                            "count":0
                        }
                    },
                    {
                        "date":1436313600,
                        "outbound":{
                            "count":0,
                            "price":0
                        },
                        "inbound":{
                            "count":0
                        },
                        "bounced":{
                            "count":0
                        }
                    },
                    {
                        "date":1436400000,
                        "outbound":{
                            "count":0,
                            "price":0
                        },
                        "inbound":{
                            "count":0
                        },
                        "bounced":{
                            "count":0
                        }
                    },
                    {
                        "date":1436486400,
                        "outbound":{
                            "count":0,
                            "price":0
                        },
                        "inbound":{
                            "count":0
                        },
                        "bounced":{
                            "count":0
                        }
                    },
                    {
                        "date":1436572800,
                        "outbound":{
                            "count":0,
                            "price":0
                        },
                        "inbound":{
                            "count":0
                        },
                        "bounced":{
                            "count":0
                        }
                    },
                    {
                        "date":1436659200,
                        "outbound":{
                            "count":0,
                            "price":0
                        },
                        "inbound":{
                            "count":0
                        },
                        "bounced":{
                            "count":0
                        }
                    },
                    {
                        "date":1436745600,
                        "outbound":{
                            "count":0,
                            "price":0
                        },
                        "inbound":{
                            "count":0
                        },
                        "bounced":{
                            "count":0
                        }
                    },
                    {
                        "date":1436832000,
                        "outbound":{
                            "count":49,
                            "price":3.43
                        },
                        "inbound":{
                            "count":0
                        },
                        "bounced":{
                            "count":0
                        }
                    },
                    {
                        "date":1436918400,
                        "outbound":{
                            "count":83,
                            "price":5.81
                        },
                        "inbound":{
                            "count":0
                        },
                        "bounced":{
                            "count":0
                        }
                    }
                ],
                "currency":{
                    "currency_name_short":"AUD",
                    "currency_prefix_d":"$",
                    "currency_prefix_c":"c",
                    "currency_name_long":"Australian Dollars"
                }
            }
        }

### Get Voice Statistics [GET /statistics/voice]

+ Response 200 (application/json)

        {
           "http_code":200,
           "response_code":"SUCCESS",
           "response_msg":"Here are your statistics.",
           "data":{
              "total":{
                 "outbound":{
                    "count":4,
                    "price":0.6600252
                 },
                 "bounced":{
                    "count":0
                 }
              },
              "stats":[
                 {
                    "date":1441065600,
                    "outbound":{
                       "count":0,
                       "price":0
                    },
                    "bounced":{
                       "count":0
                    }
                 },
                 {
                    "date":1441152000,
                    "outbound":{
                       "count":0,
                       "price":0
                    },
                    "bounced":{
                       "count":0
                    }
                 },
                 {
                    "date":1441238400,
                    "outbound":{
                       "count":0,
                       "price":0
                    },
                    "bounced":{
                       "count":0
                    }
                 },
                 {
                    "date":1441324800,
                    "outbound":{
                       "count":0,
                       "price":0
                    },
                    "bounced":{
                       "count":0
                    }
                 },
                 {
                    "date":1441411200,
                    "outbound":{
                       "count":0,
                       "price":0
                    },
                    "bounced":{
                       "count":0
                    }
                 },
                 {
                    "date":1441497600,
                    "outbound":{
                       "count":0,
                       "price":0
                    },
                    "bounced":{
                       "count":0
                    }
                 },
                 {
                    "date":1441584000,
                    "outbound":{
                       "count":0,
                       "price":0
                    },
                    "bounced":{
                       "count":0
                    }
                 },
                 {
                    "date":1441670400,
                    "outbound":{
                       "count":0,
                       "price":0
                    },
                    "bounced":{
                       "count":0
                    }
                 },
                 {
                    "date":1441756800,
                    "outbound":{
                       "count":0,
                       "price":0
                    },
                    "bounced":{
                       "count":0
                    }
                 },
                 {
                    "date":1441843200,
                    "outbound":{
                       "count":0,
                       "price":0
                    },
                    "bounced":{
                       "count":0
                    }
                 },
                 {
                    "date":1441929600,
                    "outbound":{
                       "count":0,
                       "price":0
                    },
                    "bounced":{
                       "count":0
                    }
                 },
                 {
                    "date":1442016000,
                    "outbound":{
                       "count":0,
                       "price":0
                    },
                    "bounced":{
                       "count":0
                    }
                 },
                 {
                    "date":1442102400,
                    "outbound":{
                       "count":0,
                       "price":0
                    },
                    "bounced":{
                       "count":0
                    }
                 },
                 {
                    "date":1442188800,
                    "outbound":{
                       "count":0,
                       "price":0
                    },
                    "bounced":{
                       "count":0
                    }
                 },
                 {
                    "date":1442275200,
                    "outbound":{
                       "count":0,
                       "price":0
                    },
                    "bounced":{
                       "count":0
                    }
                 },
                 {
                    "date":1442361600,
                    "outbound":{
                       "count":0,
                       "price":0
                    },
                    "bounced":{
                       "count":0
                    }
                 },
                 {
                    "date":1442448000,
                    "outbound":{
                       "count":0,
                       "price":0
                    },
                    "bounced":{
                       "count":0
                    }
                 },
                 {
                    "date":1442534400,
                    "outbound":{
                       "count":0,
                       "price":0
                    },
                    "bounced":{
                       "count":0
                    }
                 },
                 {
                    "date":1442620800,
                    "outbound":{
                       "count":0,
                       "price":0
                    },
                    "bounced":{
                       "count":0
                    }
                 },
                 {
                    "date":1442707200,
                    "outbound":{
                       "count":0,
                       "price":0
                    },
                    "bounced":{
                       "count":0
                    }
                 },
                 {
                    "date":1442793600,
                    "outbound":{
                       "count":0,
                       "price":0
                    },
                    "bounced":{
                       "count":0
                    }
                 },
                 {
                    "date":1442880000,
                    "outbound":{
                       "count":0,
                       "price":0
                    },
                    "bounced":{
                       "count":0
                    }
                 },
                 {
                    "date":1442966400,
                    "outbound":{
                       "count":0,
                       "price":0
                    },
                    "bounced":{
                       "count":0
                    }
                 },
                 {
                    "date":1443052800,
                    "outbound":{
                       "count":0,
                       "price":0
                    },
                    "bounced":{
                       "count":0
                    }
                 },
                 {
                    "date":1443139200,
                    "outbound":{
                       "count":0,
                       "price":0
                    },
                    "bounced":{
                       "count":0
                    }
                 },
                 {
                    "date":1443225600,
                    "outbound":{
                       "count":0,
                       "price":0
                    },
                    "bounced":{
                       "count":0
                    }
                 },
                 {
                    "date":1443312000,
                    "outbound":{
                       "count":0,
                       "price":0
                    },
                    "bounced":{
                       "count":0
                    }
                 },
                 {
                    "date":1443398400,
                    "outbound":{
                       "count":0,
                       "price":0
                    },
                    "bounced":{
                       "count":0
                    }
                 },
                 {
                    "date":1443484800,
                    "outbound":{
                       "count":4,
                       "price":0.6600252
                    },
                    "bounced":{
                       "count":0
                    }
                 },
                 {
                    "date":1443571200,
                    "outbound":{
                       "count":0,
                       "price":0
                    },
                    "bounced":{
                       "count":0
                    }
                 }
              ],
              "currency":{
                 "currency_name_short":"USD",
                 "currency_prefix_d":"$",
                 "currency_prefix_c":"¢",
                 "currency_name_long":"US Dollars"
              }
           }
        }

# Group Subaccounts

## Subaccount Collection [/subaccounts]

### Get all Subaccounts [GET]

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"SUCCESS",
            "data":{
                "total":8,
                "per_page":15,
                "current_page":1,
                "last_page":1,
                "next_page_url":null,
                "prev_page_url":null,
                "from":1,
                "to":8,
                "data":[
                    {
                        "subaccount_id":1,
                        "api_username":"johndoe",
                        "email":"john@doe.com",
                        "phone_number":"+13523944199",
                        "first_name":"John",
                        "last_name":"Doe",
                        "api_key":"E72D09F6-AC80-0A5C-F7F0-1A244A377A5C",
                        "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
                    },
                    {
                        "subaccount_id":27,
                        "api_username":"name9Fb",
                        "email":"testvT9@gmail.com",
                        "phone_number":"+19417516953",
                        "first_name":"Firstname7JiPG",
                        "last_name":"Lastname2olB1",
                        "api_key":"B7825E96-6A67-1275-0F35-8DB8AC743B2C",
                        "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
                    },
                    {
                        "subaccount_id":28,
                        "api_username":"nameLXD",
                        "email":"testIiq@gmail.com",
                        "phone_number":"+19417519130",
                        "first_name":"FirstnameSA3tA",
                        "last_name":"Lastname22Pam",
                        "api_key":"D09BA7BC-546A-C951-6D3D-DAE3FEE6D848",
                        "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
                    },
                    {
                        "subaccount_id":29,
                        "api_username":"nameh7m",
                        "email":"testxQv.updated@gmail.com",
                        "phone_number":"+19417519640",
                        "first_name":"Firstname5dgZw Updated",
                        "last_name":"Lastname0voRd Updated",
                        "api_key":"9415E584-794E-4F90-699D-7ECEF7290E51",
                        "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
                    },
                    {
                        "subaccount_id":30,
                        "api_username":"name5XC",
                        "email":"testaLj.updated@gmail.com",
                        "phone_number":"+19417514461",
                        "first_name":"FirstnameZcMSS Updated",
                        "last_name":"LastnameDLmEB Updated",
                        "api_key":"6E1491FC-797E-3011-1274-595EAFDE06EE",
                        "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
                    },
                    {
                        "subaccount_id":47,
                        "api_username":"franklinew5",
                        "email":"frank@test.com",
                        "phone_number":"+13108147982",
                        "first_name":"John",
                        "last_name":"Doe",
                        "api_key":"2C3B97DD-6C61-94BF-7886-9CA11DF550AF",
                        "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
                    },
                    {
                        "subaccount_id":48,
                        "api_username":"franklinew6",
                        "email":"frank@test.com",
                        "phone_number":"+13108147982",
                        "first_name":"John",
                        "last_name":"Doe",
                        "api_key":"DE5F8C8F-E939-941B-C9E0-2BD542C3FFE3",
                        "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
                    },
                    {
                        "subaccount_id":49,
                        "api_username":"franklinew7",
                        "email":"frank@test.com",
                        "phone_number":"+13108147982",
                        "first_name":"John",
                        "last_name":"Doe",
                        "api_key":"6279E8E9-8D02-72AE-9824-BF7C0C2E4FE7",
                        "access_users":1,
                        "access_billing":1,
                        "access_reporting":1,
                        "access_contacts":1,
                        "access_settings":1,
                        "access_sms":0,
                        "access_email":0,
                        "access_voice":0,
                        "access_fax":0,
                        "access_post":0,
                        "access_reseller":0,
                        "access_mms": 0,
                        "share_campaigns" : 0,
                        "notes": null
                    }
                ]
            }
        }



### Create a new subaccount [POST]

+ Request (application/json)

    + Headers

            Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA==

    + Attributes (object)
        + `api_username`: nameP99 (string, required) - Your new api username.
        + password: pass (required, string) - Your new password.
        + email: testvrq@gmail.com (required, string) - Your new email.
        + `phone_number`: +619417513278 (required, string) - Your phone number in E.164 format.
        + `first_name`: FirstnameeGPqV (required, string) - Your firstname.
        + `last_name`: LastnamePvjJp (required, string) - Your lastname.
        + `access_users`: 1 (optional, number) - Your access users flag value, must be 1 or 0.
        + `access_billing`: 1 (optional, number) - Your access billing flag value, must be 1 or 0.
        + `access_reporting`: 1 (optional, number) - Your access reporting flag value, must be 1 or 0.
        + `access_contacts`: 0 (optional, number) - Your access contacts flag value, must be 1 or 0.
        + `access_settings`: 1 (optional, number) - Your access settings flag value, must be 1 or 0.
        + `share_campaigns`: 0 (optional, number) - Your share campaigns flag value, must be 1 or 0.

    + Body

                {
                    "api_username":"nameP99",
                    "password":"pass",
                    "email":"testvrq@gmail.com",
                    "phone_number":"941-751-3278",
                    "first_name":"FirstnameeGPqV",
                    "last_name":"LastnamePvjJp"
                }

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"New account has been created.",
            "data":{
                "subaccount_id":59,
                "api_username":"nameP99",
                "email":"testvrq@gmail.com",
                "phone_number":"+619417513278",
                "first_name":"FirstnameeGPqV",
                "last_name":"LastnamePvjJp",
                "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
            }
        }

## Subaccount [/subaccounts/{subaccount_id}]

+ Parameters
    + `subaccount_id`: 59 (required, number) - The subaccount ID you want to access.

### Get a specific subaccount [GET]

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Here are your data.",
            "data":{
                "subaccount_id":59,
                "api_username":"nameP99",
                "email":"testvrq@gmail.com",
                "phone_number":"+619417513278",
                "first_name":"FirstnameeGPqV",
                "last_name":"LastnamePvjJp",
                "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
            }
        }

### Update a specific subaccount [PUT]

+ Parameters
    + `subaccount_id`: 59 (required, number) - The subaccount ID you want to access.

+ Request (application/json)

    + Headers

            Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA==

    + Attributes (object)
        + password: pass (optional, string) - Your new password.
        + email: testfP0.updated@gmail.com (optional, string) - Your new email.
        + `phone_number`: +19417519130 (optional, string) - Your phone number in E.164 format.
        + `first_name`: FirstnameKvdRZUpdated (optional, string) - Your firstname.
        + `last_name`: LastnameHUPYGUpdated (optional, string) - Your lastname.
        + `access_users`: 0 (optional, number) - Your access users flag value, must be 1 or 0.
        + `access_billing`: 0 (optional, number) - Your access billing flag value, must be 1 or 0.
        + `access_reporting`: 0 (optional, number) - Your access reporting flag value, must be 1 or 0.
        + `access_contacts`: 0 (optional, number) - Your access contacts flag value, must be 1 or 0.
        + `access_settings`: 0 (optional, number) - Your access settings flag value, must be 1 or 0.
        + `share_campaigns`: 0 (number, optional) - Your share campaigns flag value, must be 1 or 0.

    + Body

                {
                    "password":"pass",
                    "email":"testfP0.updated@gmail.com",
                    "phone_number":"+19417519130",
                    "first_name":"FirstnameKvdRZUpdated",
                    "last_name":"LastnameHUPYGUpdated",
                    "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
                }

+ Response 200 (application/json)

        {
            "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 specific subaccount [DELETE]

+ Parameters
    + `subaccount_id`: 59 (required, number) - The subaccount ID you want to access.

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Subaccount #59 has been deleted",
            "data":true
        }


### Regenerate API Key [PUT /subaccounts/{subaccount_id}/regen-api-key]

+ Parameters
    + `subaccount_id`: 2837 (required, number) - The ID of the subaccount to be accessed.

+ Response 200 (application/json)

        {
            "http_code": 200,
            "response_code": "SUCCESS",
            "response_msg": "Your API Key has been regenerated.",
            "data": {
                "api_key": "E72D09F6-AC80-0A5C-F7F0-1A244A377A5C"
            }
        }

# Group Timezones

## Timezones [/timezones]

### Get Timezones [GET]
Get supported list of timezones.

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"List of timezones.",
            "data":[
                "Africa/Abidjan",
                "Africa/Accra",
                "Africa/Addis_Ababa",
                "Africa/Algiers",
                "Africa/Asmara",
                "Africa/Bamako",
                "Africa/Bangui",
                "Africa/Banjul",
                "Africa/Bissau",
                "Africa/Blantyre",
                "Africa/Brazzaville",
                "Africa/Bujumbura",
                "Africa/Cairo",
                "Africa/Casablanca",
                "Africa/Ceuta",
                "Africa/Conakry",
                "Africa/Dakar",
                "Africa/Dar_es_Salaam",
                "Africa/Djibouti",
                "Africa/Douala",
                "Africa/El_Aaiun",
                "Africa/Freetown",
                "Africa/Gaborone",
                "Africa/Harare",
                "Africa/Johannesburg",
                "Africa/Juba",
                "Africa/Kampala",
                "Africa/Khartoum",
                "Africa/Kigali",
                "Africa/Kinshasa",
                "Africa/Lagos",
                "Africa/Libreville",
                "Africa/Lome",
                "Africa/Luanda",
                "Africa/Lubumbashi",
                "Africa/Lusaka",
                "Africa/Malabo",
                "Africa/Maputo",
                "Africa/Maseru",
                "Africa/Mbabane",
                "Africa/Mogadishu",
                "Africa/Monrovia",
                "Africa/Nairobi",
                "Africa/Ndjamena",
                "Africa/Niamey",
                "Africa/Nouakchott",
                "Africa/Ouagadougou",
                "Africa/Porto-Novo",
                "Africa/Sao_Tome",
                "Africa/Tripoli",
                "Africa/Tunis",
                "Africa/Windhoek",
                "America/Adak",
                "America/Anchorage",
                "America/Anguilla",
                "America/Antigua",
                "America/Araguaina",
                "America/Argentina/Buenos_Aires",
                "America/Argentina/Catamarca",
                "America/Argentina/Cordoba",
                "America/Argentina/Jujuy",
                "America/Argentina/La_Rioja",
                "America/Argentina/Mendoza",
                "America/Argentina/Rio_Gallegos",
                "America/Argentina/Salta",
                "America/Argentina/San_Juan",
                "America/Argentina/San_Luis",
                "America/Argentina/Tucuman",
                "America/Argentina/Ushuaia",
                "America/Aruba",
                "America/Asuncion",
                "America/Atikokan",
                "America/Bahia",
                "America/Bahia_Banderas",
                "America/Barbados",
                "America/Belem",
                "America/Belize",
                "America/Blanc-Sablon",
                "America/Boa_Vista",
                "America/Bogota",
                "America/Boise",
                "America/Cambridge_Bay",
                "America/Campo_Grande",
                "America/Cancun",
                "America/Caracas",
                "America/Cayenne",
                "America/Cayman",
                "America/Chicago",
                "America/Chihuahua",
                "America/Costa_Rica",
                "America/Creston",
                "America/Cuiaba",
                "America/Curacao",
                "America/Danmarkshavn",
                "America/Dawson",
                "America/Dawson_Creek",
                "America/Denver",
                "America/Detroit",
                "America/Dominica",
                "America/Edmonton",
                "America/Eirunepe",
                "America/El_Salvador",
                "America/Fort_Nelson",
                "America/Fortaleza",
                "America/Glace_Bay",
                "America/Godthab",
                "America/Goose_Bay",
                "America/Grand_Turk",
                "America/Grenada",
                "America/Guadeloupe",
                "America/Guatemala",
                "America/Guayaquil",
                "America/Guyana",
                "America/Halifax",
                "America/Havana",
                "America/Hermosillo",
                "America/Indiana/Indianapolis",
                "America/Indiana/Knox",
                "America/Indiana/Marengo",
                "America/Indiana/Petersburg",
                "America/Indiana/Tell_City",
                "America/Indiana/Vevay",
                "America/Indiana/Vincennes",
                "America/Indiana/Winamac",
                "America/Inuvik",
                "America/Iqaluit",
                "America/Jamaica",
                "America/Juneau",
                "America/Kentucky/Louisville",
                "America/Kentucky/Monticello",
                "America/Kralendijk",
                "America/La_Paz",
                "America/Lima",
                "America/Los_Angeles",
                "America/Lower_Princes",
                "America/Maceio",
                "America/Managua",
                "America/Manaus",
                "America/Marigot",
                "America/Martinique",
                "America/Matamoros",
                "America/Mazatlan",
                "America/Menominee",
                "America/Merida",
                "America/Metlakatla",
                "America/Mexico_City",
                "America/Miquelon",
                "America/Moncton",
                "America/Monterrey",
                "America/Montevideo",
                "America/Montserrat",
                "America/Nassau",
                "America/New_York",
                "America/Nipigon",
                "America/Nome",
                "America/Noronha",
                "America/North_Dakota/Beulah",
                "America/North_Dakota/Center",
                "America/North_Dakota/New_Salem",
                "America/Ojinaga",
                "America/Panama",
                "America/Pangnirtung",
                "America/Paramaribo",
                "America/Phoenix",
                "America/Port-au-Prince",
                "America/Port_of_Spain",
                "America/Porto_Velho",
                "America/Puerto_Rico",
                "America/Rainy_River",
                "America/Rankin_Inlet",
                "America/Recife",
                "America/Regina",
                "America/Resolute",
                "America/Rio_Branco",
                "America/Santarem",
                "America/Santiago",
                "America/Santo_Domingo",
                "America/Sao_Paulo",
                "America/Scoresbysund",
                "America/Sitka",
                "America/St_Barthelemy",
                "America/St_Johns",
                "America/St_Kitts",
                "America/St_Lucia",
                "America/St_Thomas",
                "America/St_Vincent",
                "America/Swift_Current",
                "America/Tegucigalpa",
                "America/Thule",
                "America/Thunder_Bay",
                "America/Tijuana",
                "America/Toronto",
                "America/Tortola",
                "America/Vancouver",
                "America/Whitehorse",
                "America/Winnipeg",
                "America/Yakutat",
                "America/Yellowknife",
                "Antarctica/Casey",
                "Antarctica/Davis",
                "Antarctica/DumontDUrville",
                "Antarctica/Macquarie",
                "Antarctica/Mawson",
                "Antarctica/McMurdo",
                "Antarctica/Palmer",
                "Antarctica/Rothera",
                "Antarctica/Syowa",
                "Antarctica/Troll",
                "Antarctica/Vostok",
                "Arctic/Longyearbyen",
                "Asia/Aden",
                "Asia/Almaty",
                "Asia/Amman",
                "Asia/Anadyr",
                "Asia/Aqtau",
                "Asia/Aqtobe",
                "Asia/Ashgabat",
                "Asia/Baghdad",
                "Asia/Bahrain",
                "Asia/Baku",
                "Asia/Bangkok",
                "Asia/Barnaul",
                "Asia/Beirut",
                "Asia/Bishkek",
                "Asia/Brunei",
                "Asia/Chita",
                "Asia/Choibalsan",
                "Asia/Colombo",
                "Asia/Damascus",
                "Asia/Dhaka",
                "Asia/Dili",
                "Asia/Dubai",
                "Asia/Dushanbe",
                "Asia/Gaza",
                "Asia/Hebron",
                "Asia/Ho_Chi_Minh",
                "Asia/Hong_Kong",
                "Asia/Hovd",
                "Asia/Irkutsk",
                "Asia/Jakarta",
                "Asia/Jayapura",
                "Asia/Jerusalem",
                "Asia/Kabul",
                "Asia/Kamchatka",
                "Asia/Karachi",
                "Asia/Kathmandu",
                "Asia/Khandyga",
                "Asia/Kolkata",
                "Asia/Krasnoyarsk",
                "Asia/Kuala_Lumpur",
                "Asia/Kuching",
                "Asia/Kuwait",
                "Asia/Macau",
                "Asia/Magadan",
                "Asia/Makassar",
                "Asia/Manila",
                "Asia/Muscat",
                "Asia/Nicosia",
                "Asia/Novokuznetsk",
                "Asia/Novosibirsk",
                "Asia/Omsk",
                "Asia/Oral",
                "Asia/Phnom_Penh",
                "Asia/Pontianak",
                "Asia/Pyongyang",
                "Asia/Qatar",
                "Asia/Qyzylorda",
                "Asia/Rangoon",
                "Asia/Riyadh",
                "Asia/Sakhalin",
                "Asia/Samarkand",
                "Asia/Seoul",
                "Asia/Shanghai",
                "Asia/Singapore",
                "Asia/Srednekolymsk",
                "Asia/Taipei",
                "Asia/Tashkent",
                "Asia/Tbilisi",
                "Asia/Tehran",
                "Asia/Thimphu",
                "Asia/Tokyo",
                "Asia/Tomsk",
                "Asia/Ulaanbaatar",
                "Asia/Urumqi",
                "Asia/Ust-Nera",
                "Asia/Vientiane",
                "Asia/Vladivostok",
                "Asia/Yakutsk",
                "Asia/Yekaterinburg",
                "Asia/Yerevan",
                "Atlantic/Azores",
                "Atlantic/Bermuda",
                "Atlantic/Canary",
                "Atlantic/Cape_Verde",
                "Atlantic/Faroe",
                "Atlantic/Madeira",
                "Atlantic/Reykjavik",
                "Atlantic/South_Georgia",
                "Atlantic/St_Helena",
                "Atlantic/Stanley",
                "Australia/Adelaide",
                "Australia/Brisbane",
                "Australia/Broken_Hill",
                "Australia/Currie",
                "Australia/Darwin",
                "Australia/Eucla",
                "Australia/Hobart",
                "Australia/Lindeman",
                "Australia/Lord_Howe",
                "Australia/Melbourne",
                "Australia/Perth",
                "Australia/Sydney",
                "Europe/Amsterdam",
                "Europe/Andorra",
                "Europe/Astrakhan",
                "Europe/Athens",
                "Europe/Belgrade",
                "Europe/Berlin",
                "Europe/Bratislava",
                "Europe/Brussels",
                "Europe/Bucharest",
                "Europe/Budapest",
                "Europe/Busingen",
                "Europe/Chisinau",
                "Europe/Copenhagen",
                "Europe/Dublin",
                "Europe/Gibraltar",
                "Europe/Guernsey",
                "Europe/Helsinki",
                "Europe/Isle_of_Man",
                "Europe/Istanbul",
                "Europe/Jersey",
                "Europe/Kaliningrad",
                "Europe/Kiev",
                "Europe/Kirov",
                "Europe/Lisbon",
                "Europe/Ljubljana",
                "Europe/London",
                "Europe/Luxembourg",
                "Europe/Madrid",
                "Europe/Malta",
                "Europe/Mariehamn",
                "Europe/Minsk",
                "Europe/Monaco",
                "Europe/Moscow",
                "Europe/Oslo",
                "Europe/Paris",
                "Europe/Podgorica",
                "Europe/Prague",
                "Europe/Riga",
                "Europe/Rome",
                "Europe/Samara",
                "Europe/San_Marino",
                "Europe/Sarajevo",
                "Europe/Simferopol",
                "Europe/Skopje",
                "Europe/Sofia",
                "Europe/Stockholm",
                "Europe/Tallinn",
                "Europe/Tirane",
                "Europe/Ulyanovsk",
                "Europe/Uzhgorod",
                "Europe/Vaduz",
                "Europe/Vatican",
                "Europe/Vienna",
                "Europe/Vilnius",
                "Europe/Volgograd",
                "Europe/Warsaw",
                "Europe/Zagreb",
                "Europe/Zaporozhye",
                "Europe/Zurich",
                "Indian/Antananarivo",
                "Indian/Chagos",
                "Indian/Christmas",
                "Indian/Cocos",
                "Indian/Comoro",
                "Indian/Kerguelen",
                "Indian/Mahe",
                "Indian/Maldives",
                "Indian/Mauritius",
                "Indian/Mayotte",
                "Indian/Reunion",
                "Pacific/Apia",
                "Pacific/Auckland",
                "Pacific/Bougainville",
                "Pacific/Chatham",
                "Pacific/Chuuk",
                "Pacific/Easter",
                "Pacific/Efate",
                "Pacific/Enderbury",
                "Pacific/Fakaofo",
                "Pacific/Fiji",
                "Pacific/Funafuti",
                "Pacific/Galapagos",
                "Pacific/Gambier",
                "Pacific/Guadalcanal",
                "Pacific/Guam",
                "Pacific/Honolulu",
                "Pacific/Johnston",
                "Pacific/Kiritimati",
                "Pacific/Kosrae",
                "Pacific/Kwajalein",
                "Pacific/Majuro",
                "Pacific/Marquesas",
                "Pacific/Midway",
                "Pacific/Nauru",
                "Pacific/Niue",
                "Pacific/Norfolk",
                "Pacific/Noumea",
                "Pacific/Pago_Pago",
                "Pacific/Palau",
                "Pacific/Pitcairn",
                "Pacific/Pohnpei",
                "Pacific/Port_Moresby",
                "Pacific/Rarotonga",
                "Pacific/Saipan",
                "Pacific/Tahiti",
                "Pacific/Tarawa",
                "Pacific/Tongatapu",
                "Pacific/Wake",
                "Pacific/Wallis",
                "UTC"
            ]
        }

# Group Transactional Email

## Transactional Email [/email]

### Email Send [POST /email/send]

+ Request (application/json)

    + Attributes (object)
        + to (array, required) - The recipients of the email.
            + (object)
                + email: test@clicksend.com (string, required) - The recipient's email address.
                + name: John Doe (string, optional) - The recipient's name.
        + cc: array (array, optional) - The cc of the email. Follows the same structure as `to`.
        + bcc: array (array, optional) - The bcc of the email. Follows the same structure as `to`.
        + `from.email_address_id`: 1 (number, required) - The sender's email address ID.
        + from.name: Joanne Doe (string, optional) - The sender's name.
        + body: Lorem ipsum (string, required) - The content of the email.
        + attachments (array, optional) - The attachments of the email.
            + (object)
                + content: ZmlsZSBjb250ZW50cw== (string, required) - The base64-encoded contents of the file.
                + type: text/plain (string, required) - The type of the file being attached.
                + filename: text.txt (string, required) - The name of the file being attached.
                + disposition: attachment (string, required) - `inline` for content that can be displayed within the email, or `attachment` for any other files.
                + `content_id`: text (string, required) - An ID for the content.
        + schedule: 1436174254 (number, optional) - Leave blank for immediate delivery. Your schedule time as a [unix timestamp](http://help.clicksend.com/what-is-a-unix-timestamp).

    + Body

                {
                   "to":[
                      {
                         "email":"test@clicksend.com",
                         "name":"John Doe"
                      }
                   ],
                   "cc":[
                      {
                         "email":"test2@clicksend.com",
                         "name":"Jane Doe"
                      }
                   ],
                   "bcc":[
                      {
                         "email":"test3@clicksend.com",
                         "name":"Joseph Doe"
                      }
                   ],
                   "from":{
                      "email_address_id":1,
                      "name":"Joanne Doe"
                   },
                   "subject":"Test subject",
                   "body":"Lorem ipsum",
                   "attachments":[
                      {
                         "content":"ZmlsZSBjb250ZW50cw==",
                         "type":"text/plain",
                         "filename":"text.txt",
                         "disposition":"attachment",
                         "content_id":"text"
                      }
                   ]
                }

+ Response 200 (application/json)

            {
                "http_code": 200,
                "response_code": "SUCCESS",
                "response_msg": "Transactional email queued for delivery.",
                "data": {
                    "user_id": 1,
                    "subaccount_id": 1,
                    "from_email_address_id": 1,
                    "from_name": "Joanne Doe",
                    "to": [
                        {
                            "email": "test@clicksend.com",
                            "name": "John Doe"
                        }
                    ],
                    "cc": [
                        {
                            "email": "test2@clicksend.com",
                            "name": "Jane Doe"
                        }
                    ],
                    "bcc": [
                        {
                            "email": "test3@clicksend.com",
                            "name": "Joseph Doe"
                        }
                    ],
                    "subject": "Test subject",
                    "body": "Lorem ipsum",
                    "body_plain_text": "Lorem ipsum",
                    "schedule": 1507018182,
                    "message_id": "21C632C1-3FCC-4EFF-8191-6079244F0142",
                    "status": "WaitApproval",
                    "status_text": "Accepted for delivery",
                    "soft_bounce_count": 0,
                    "hard_bounce_count": 0,
                    "price": "0.0050",
                    "date_added": 1507018182,
                    "custom_string": null,
                    "_attachments": [
                        {
                            "file_name": "text.txt",
                            "content_type": "text/plain",
                            "content_disposition": "attachment",
                            "content_id": "text",
                            "_attachment_file_url": "https://rest.clicksend.com/files/3C2284DC-7C37-47BA-8C95-3F12A4B987B7.txt"
                        }
                    ],
                    "_currency": {
                        "currency_name_short": "GBP",
                        "currency_prefix_d": "£",
                        "currency_prefix_c": "p",
                        "currency_name_long": "British Pounds"
                    }
                }
            }

### Email Price [POST /email/price]

+ Request (application/json)

    + Attributes (object)
        + to: array (array, required) - The recipients of the email. See sample request for more details.
        + subject: Test subject (string, required) - The subject of the email.
        + cc: array (array, optional) - The cc of the email. See sample request for more details.
        + bcc: array (array, optional) - The bcc of the email. See sample request for more details.
        + `from.email_address_id`: 1 (number, required) - The sender's email address id.
        + from.name: John Doe (string, optional) - The sender's name.
        + body: Lorem ipsum (string, required) - The content of the email.
        + attachments: array (array, required) - The attachments of the email. See sample request for more details.

    + Body

                {
                   "to":[
                      {
                         "email":"<string>|required",
                         "name":"<string>"
                      }
                   ],
                   "subject":"<string>|required",
                   "cc":[
                      {
                         "email":"<string>",
                         "name":"<string>"
                      }
                   ],
                   "bcc":[
                      {
                         "email":"<string>",
                         "name":"<string>"
                      }
                   ],
                   "from":{
                      "email_address_id":"<integer>|required",
                      "name":"<string>"
                   },
                   "body":"<string>|required",
                   "attachments":[
                      {
                         "content":"<string>",
                         "type":"<string>",
                         "filename":"<string>",
                         "disposition":"<string>",
                         "content_id":"<string>"
                      }
                   ],
                   "schedule":"<integer>"
                }

+ Response 200 (application/json)

            {
                "http_code": 200,
                "response_code": "SUCCESS",
                "response_msg": "Here's the email price.",
                "data": {
                    "to_array": [
                        {
                            "email": "test@user",
                            "name": "user1"
                        }
                    ],
                    "cc_array": [
                        {
                            "email": "user1@test.com",
                            "name": "cc1"
                        }
                    ],
                    "bcc_array": null,
                    "subject": "test subject",
                    "body": "This is a test <img src='cid:test'/>",
                    "price": 0.002,
                    "_currency": {
                        "currency_name_short": "AUD",
                        "currency_prefix_d": "$",
                        "currency_prefix_c": "c",
                        "currency_name_long": "Australian Dollars"
                    }
                }
            }

### Email History [GET /email/history]

+ Response 200 (application/json)

            {
                "http_code": 200,
                "response_code": "SUCCESS",
                "response_msg": "Here is your result.",
                "data": {
                    "total": 2,
                    "per_page": 15,
                    "current_page": 1,
                    "last_page": 1,
                    "next_page_url": null,
                    "prev_page_url": null,
                    "from": 1,
                    "to": 15,
                    "data": [
                        {
                            "user_id": 1201,
                            "subaccount_id": 1039,
                            "from_email_address_id": 2,
                            "from_name": "test",
                            "to": [
                                {
                                    "email": "test1@user.com"
                                }
                            ],
                            "cc": null,
                            "bcc": null,
                            "subject": "test email transaction",
                            "body": "This is a test content <img src=\"cid:7c65ccc4a134a809db09a839df9b75f055afcb62@click-send.com\" />",
                            "body_plain_text": "This is a test content <img src=\"cid:7c65ccc4a134a809db09a839df9b75f055afcb62@click-send.com\" />",
                            "schedule": "1469001353",
                            "message_id": "BCEBC89E-6993-4F13-B485-942440C62915",
                            "status": "Sent",
                            "status_text": "Email added to outgoing mail queue for delivery",
                            "soft_bounce_count": 0,
                            "hard_bounce_count": 0,
                            "price": "0.0000",
                            "date_added": "1469001354",
                            "custom_string": null,
                            "_attachments": [],
                            "_currency": {
                                "currency_name_short": "PHP",
                                "currency_prefix_d": "?",
                                "currency_prefix_c": "c",
                                "currency_name_long": "Philippine Peso"
                            }
                        },
                        {
                            "user_id": 1201,
                            "subaccount_id": 1039,
                            "from_email_address_id": 2,
                            "from_name": "test",
                            "to": [
                                {
                                    "email": "test1@user.com"
                                }
                            ],
                            "cc": null,
                            "bcc": null,
                            "subject": "test email transaction",
                            "body": "This is a test content",
                            "body_plain_text": "This is a test content",
                            "schedule": "1469002942",
                            "message_id": "988067DE-9318-448F-B225-7A5A695B23D1",
                            "status": "Queued:WaitSend",
                            "status_text": null,
                            "soft_bounce_count": 0,
                            "hard_bounce_count": 0,
                            "price": "0.0822",
                            "date_added": "1469002942",
                            "custom_string": null,
                            "_attachments": [
                                {
                                    "file_name": "test.jpg",
                                    "content_type": "image/jpeg",
                                    "content_disposition": "attachment",
                                    "content_id": "<cid:PHP-CID-5b3eb73f50a7cf7f423dc97070bb3b5280312308>",
                                    "_attachment_file_url": "https://rest.clicksend.com/files/B5664FA5-CEBD-40B0-BED1-5CFF0CA027BD.jpg"
                                }
                            ],
                            "_currency": {
                                "currency_name_short": "PHP",
                                "currency_prefix_d": "?",
                                "currency_prefix_c": "c",
                                "currency_name_long": "Philippine Peso"
                            }
                        }
                    ]
                }
            }

### Export History [GET /email/history/export?filename={filename}]

+ Parameters
    + filename: `export.csv` (string, required) - Your export filename.

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Download your file here.",
            "data":{
                "url":"https://rest.clicksend.com/files/22D55AF9-6CF0-476D-A8B3-82A998FD2738?filename=export.csv"
            }
        }

## Delivery Receipts [/automations/email/receipt]

**Push Delivery Receipts**

If you prefer, we can push message replies to your server as they arrive with us.

1. Log into your account.
2. Click on ’Transactional Email’ then ’Settings’ tab.
3. Click on the 'Email Delivery Report Settings' menu.
4. Select 'Forward to URL'.
5. Enter the URL and click 'Save'.


The following variables will be posted to the URL specified:

| Variable | Description |
|---|---|
| `email` | The sender of the email.
| `timestamp` | Timestamp in UNIX format. e.g 1439173981.
| `message_id` | Message ID, returned when originally sending the message.
| `status` | The email event. |

List of email events:

| Code | Description |
|---|---|
| `Processed` | This event fires when smtp server receives an individual message and prepares it to be delivered. |
| `Deferred` | When an email cannot immediately be delivered, but it hasn’t been completely rejected. |
| `Delivered` | When an email has been accepted at the receiving server. |
| `Bounce` | If a server cannot or will not deliver a message. Bounces often are caused by outdated or incorrectly entered email addresses. |
| `Dropped` | There are a number of reasons your email will not even be sent to a recipient for delivery. This event informs your system when an email has been dropped. |
| `SpamReport` | Most internet service providers provide a feedback loop, sending specific spam complaints to the email service providers. This event fires so that you can react appropriately–or at the very least, never send another email to that address. |

### Add a Test Delivery Receipt [POST /email/receipts]

+ Request (application/json)

    + Attributes (object)
        + url: http://yourdomain.com (string, required) - Your URL if using the push option or 'poll' if using the pull option.

    + Body

                {
                    "url":"http://yourdomain.com"
                }

+ Response 200 (application/json)

        {
            "http_code": 200,
            "response_code": "SUCCESS",
            "response_msg": "Receipt has been added.",
            "data": {
                "email": "john_doe@user.com",
                "timestamp": 1476870832,
                "message_id": "73A80623-CFC3-4E7F-856A-880B289242D7@clicksend.com",
                "status": "Delivered"
            }
        }

# Group Uploads

## Upload a File [/uploads?convert={convert}]

The `upload` endpoint provides a method for converting files from an unspported format to a format that one of our endpoints can handle.

Files can be submitted two ways:
1. Using `base64` encoding in an `application/json` request. In this case, submit the `base64`-encoded file contents in the `content` field of the request body, and `convert` can be specified either also in the body or as part of the query string.
2. Using `multipart/form-data` encoding, in the same way it would be submitted using a HTML form. You may find cURL useful for this. For an example of how to do this, see one of our [SDKs](https://dashboard.clicksend.com/#/libraries-sdk/main). In this case, specify `convert` in the query string.

Note that `convert` specifies the conversion to take place - that is, what the result should be compatible with - and can be any of `fax`, `mms`, `csv` or `post`.

All files have 10 minutes expiry.

### Upload a file [POST]

+ Request (application/json)

    + Attributes
        + content: `Y29udGVudA==` (required, string) - Your file contents encoded in `base64`.
        + convert: `fax` (required, string) - Conversion type: `fax`, `mms`, `csv` or `post`

    + Body

            {
                "content": "PGh0bWw+PGhlYWQ+PHN0eWxlIHR5cGU9InRleHQvY3NzIj5ib2R5IHsgZm9udC1mYW1pbHk6J0FyaWFsJzsgfTwvc3R5bGU+PHRpdGxlPkhpPC90aXRsZT48L2hlYWQ+PGJvZHk+PGgxPkhlbGxvIHRoZXJlPC9oMT48aDI+SG93IGFyZSB5b3UgdG9kYXk/PC9oMj48L2JvZHk+PC9odG1sPg=="
            }

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Your file has been uploaded.",
            "data":{
                "upload_id":15,
                "file_name":"161BFA93-3660-4B03-9BCB-7629166F2E91.pdf",
                "date_added":1449500640,
                "date_delete":1450105440,
                "user_id":1,
                "_url":"https://s3-ap-southeast-2.amazonaws.com/clicksend-api-downloads/_public/_examples/document.pdf"
            }
        }

+ Request (multipart/form-data)

    + Attributes
        + file: `letter.docx` (required, string) - Your file.
        + convert: `fax` (required, string) - Conversion type: `fax`, `mms`, `csv` or `post`

    + Body

            --Boundary
            Content-Type: multipart/form-data
            Content-Disposition: form-data; name="file"; filename="letter.pdf"
            Content-Type: application/pdf
            --Boundary

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Your file has been uploaded.",
            "data":{
                "upload_id":15,
                "file_name":"161BFA93-3660-4B03-9BCB-7629166F2E91.pdf",
                "date_added":1449500640,
                "date_delete":1450105440,
                "user_id":1,
                "_url":"https://s3-ap-southeast-2.amazonaws.com/clicksend-api-downloads/_public/_examples/document.pdf"
            }
        }

# Group Voice

Send TTS (Text-to-speech) voice calls

# How many messages can I send?

You can post **up to 1000 messages** with each API call. You can send to a mix of contacts and contact lists, as long as the total number of recipients is up to 1000. The response contains a status and details for each recipient.

# How many characters can I send in a message?

If a message is longer than 4 message parts, it will be truncated (see below). If a message contains any characters that aren't in the GSM 03.38 character set, the message type will be treated as unicode. (`https://en.wikipedia.org/wiki/GSM_03.38`)

## Standard English Characters:

| Number of Characters | Message Credits |
|---|---|
| 1 - 300 | 1 |
| 301 - 600 | 2 |
| 601 - 900 | 3 |
| 901 - 1200 | 4 |

## Non-GSM (Unicode) characters:

| Number of Characters | Message Credits |
|---|---|
|1 - 150 | 1 |
|151 - 300 | 2 |
|301 - 450 | 3 |
|451 - 600 | 4 |

# Allowed Languages

| Language, Locale | lang | voice |
|---|---|---|
| `English`, US | en-us | female (default) / male|
| `English`, Australia | en-au | female (default) / male|
| `English`, UK | en-gb | female (default) / male|
| `English`, India | en-in | female|
| `English`, Wales | en-gb-wls | female (default) / male|
| `Celtic`, Wales | cy-gb-wls | female (default) / male|
| `German`, Germany | de-de | female (default) / male|
| `Spanish`, Spain | es-es | female (default) / male|
| `Spanish`, US | es-us | female (default) / male|
| `French`, Canada | fr-ca | female|
| `French`, France | fr-fr | female (default) / male|
| `Icelandic`, Iceland | is-is | female (default) / male|
| `Italian`, Italy | it-it | female (default) / male|
| `Danish`, Denmark | da-dk | female (default) / male|
| `Dutch`, Netherlands | nl-nl | female (default) / male|
| `Norwegian`, Norway | nb-no | female|
| `Polish`, Poland | pl-pl | female (default) / male|
| `Portuguese`, Portugal | pt-pt | male|
| `Portuguese`, Brazil | pt-br | female (default) / male|
| `Romanian`, Romania | ro-ro | female|
| `Russian`, Russia | ru-ru | female (default) / male|
| `Swedish`, Sweden | sv-se | female|
| `Turkish`, Turkey | tr-tr | female|

# Tips

To introduce a small delay between words or digits you can use a comma (,).

For example:
`Please enter your activation code 9, 0, 9, 0, in the next 20 minutes.`

### Send a Voice Call - Text-to-speech [/voice/send]

### Send a Voice Call [POST /voice/send]

You can post **up to 1000 messages** with each API call.

We support some SSML tags allowing custom breaks or pauses to be entered, and the readout rate to be altered. [More info](https://help.clicksend.com/voice/how-to-adjust-tts-voice-calls).

+ Request (application/json)

    + Headers

            Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA==

    + Attributes
        + source: php (string, optional) - Your method of sending e.g. 'wordpress', 'php', 'c#'.
        + to: +17205963005 (string, required) - Recipient number in E.164 format or local format ([more info](https://help.clicksend.com/SMS/what-format-does-the-recipient-phone-number-need-to-be-in)).
        + `list_id`: 428 (number, optional) - Your list ID if sending to a whole list. Can be used instead of 'to'. Will override 'to' if both are used.
        + body: Biscuit uv3nlCOjRk croissant chocolate lollipop chocolate muffin. (string, required) - Your message.
        + lang: en-au (string, required) - See section on available languages.
        + voice: female (string, required) - Either 'female' or 'male'.
        + schedule: 1436174254 (number, optional) - Leave blank for immediate delivery. Your schedule time as a [unix timestamp](http://help.clicksend.com/what-is-a-unix-timestamp).
        + `custom_string`: Custom kn0ChLhwn6 (string, optional) - Your reference. Will be passed back with all replies and delivery reports.
        + country: US (string, optional) - The country of the recipient.
        + `require_input`: 1 (number, optional) - Whether you want to receive a keypress from the call recipient (1 for on, 0 [default] for off)
        + `machine_detection`: 1 (number, optional) - Whether to attempt to detect an answering machine or voicemail service and leave a message (1 for on, 0 [default] for off)

    + Body

                {
                    "messages":[
                        {
                            "source":"php",
                            "body":"Jelly liquorice marshmallow candy carrot cake 4Eyffjs1vL.",
                            "to":"+61411111111",
                            "lang":"en-au",
                            "voice":"female",
                            "schedule":1436874701,
                            "custom_string":"this is a test",
                            "require_input": 1,
                            "machine_detection": 1
                        },
                        {
                            "source":"php",
                            "body":"Chocolate bar icing icing oat cake carrot cake jelly cotton MWEvciEPIr.",
                            "list_id":428,
                            "lang":"en-au",
                            "voice":"female",
                            "schedule":1436876011,
                            "custom_string":"this is a test"
                        }
                    ]
                }

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Here are your data.",
            "data":{
                "total_price":0.28,
                "total_count":4,
                "queued_count":4,
                "messages":[
                    {
                        "date":1436871253,
                        "to":"+61411111111",
                        "to_type":"mobile",
                        "body":"Jelly liquorice marshmallow candy carrot cake 4Eyffjs1vL.",
                        "from":null,
                        "lang":"en-au",
                        "voice":"female",
                        "schedule":1436874701,
                        "message_id":"BF7AD270-0DE2-418B-B606-71D527D9C1AE",
                        "message_parts":1,
                        "message_price":0.07,
                        "custom_string":"this is a test",
                        "user_id":1,
                        "subaccount_id":1,
                        "country":"AU",
                        "carrier":"Telstra",
                        "require_input":1,
                        "machine_detection":0,
                        "status":"SUCCESS"
                    },
                    {
                        "date":1436871253,
                        "to":"+61411111111",
                        "to_type":"mobile",
                        "body":"Chocolate bar icing icing oat cake carrot cake jelly cotton MWEvciEPIr.",
                        "from":null,
                        "lang":"en-au",
                        "voice":"female",
                        "schedule":1436876011,
                        "message_id":"D0C273EE-816D-4DF2-8E9D-9D9C65F168F3",
                        "message_parts":1,
                        "message_price":0.07,
                        "custom_string":"this is a test",
                        "user_id":1,
                        "subaccount_id":1,
                        "country":"AU",
                        "carrier":"Telstra",
                        "require_input":0,
                        "machine_detection":0,
                        "status":"SUCCESS"
                    },
                    {
                        "date":1436871253,
                        "to":"+16783270696",
                        "to_type":"mobile",
                        "body":"Chocolate bar icing icing oat cake carrot cake jelly cotton MWEvciEPIr.",
                        "from":null,
                        "lang":"en-au",
                        "voice":"female",
                        "schedule":1436876011,
                        "message_id":"A1845B61-C404-4793-8661-97890C19C8A2",
                        "message_parts":1,
                        "message_price":0.07,
                        "custom_string":"this is a test",
                        "user_id":1,
                        "subaccount_id":1,
                        "country":"US",
                        "carrier":"",
                        "require_input":0,
                        "machine_detection":0,
                        "status":"SUCCESS"
                    },
                    {
                        "date":1436871253,
                        "to":"+16783275492",
                        "to_type":"mobile",
                        "body":"Chocolate bar icing icing oat cake carrot cake jelly cotton MWEvciEPIr.",
                        "from":null,
                        "lang":"en-au",
                        "voice":"female",
                        "schedule":1436876011,
                        "message_id":"DB545FAA-7325-465F-A696-8BDBFA8C1E49",
                        "message_parts":1,
                        "message_price":0.07,
                        "custom_string":"this is a test",
                        "user_id":1,
                        "subaccount_id":1,
                        "country":"US",
                        "carrier":"",
                        "require_input":0,
                        "machine_detection":0,
                        "status":"SUCCESS"
                    }
                ],
                "currency":{
                    "currency_name_short":"USD",
                    "currency_prefix_d":"$",
                    "currency_prefix_c":"¢",
                    "currency_name_long":"US Dollars"
                }
            }
        }

### Calculate Price [POST /voice/price]

+ Request (application/json)

    + Headers

            Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA==

    + Attributes
        + source: php (string, optional) - Your method of sending e.g. 'wordpress', 'php', 'c#'.
        + to: +17205963005 (string, required) - Recipient number in E.164 format or local format ([more info](https://help.clicksend.com/SMS/what-format-does-the-recipient-phone-number-need-to-be-in)).
        + `list_id`: 428 (number, optional) - Your list ID if sending to a whole list. Can be used instead of 'to'.
        + body: Biscuit uv3nlCOjRk croissant chocolate lollipop chocolate muffin. (string, required) - Your message.
        + lang: en-au (string, required) - See section on available languages.
        + voice: female (string, required) - Either 'female' or 'male'.
        + schedule: 1436174254 (number, optional) - Leave blank for immediate delivery. Your schedule time as a [unix timestamp](http://help.clicksend.com/what-is-a-unix-timestamp).
        + `custom_string`: Custom kn0ChLhwn6 (string, optional) - Your reference. Will be passed back with all replies and delivery reports.
        + country: US (string, optional) - The country of the recipient.
        + `require_input`: 1 (number, optional) - Whether you want to receive a keypress from the call recipient (1 for on, 0 [default] for off)

    + Body

                {
                    "messages":[
                        {
                            "source":"php",
                            "body":"Jelly liquorice marshmallow candy carrot cake 4Eyffjs1vL.",
                            "to":"+61411111111",
                            "lang":"en-au",
                            "voice":"female",
                            "schedule":1436874701,
                            "custom_string":"this is a test"
                        },
                        {
                            "source":"php",
                            "body":"Chocolate bar icing icing oat cake carrot cake jelly cotton MWEvciEPIr.",
                            "list_id":428,
                            "lang":"en-au",
                            "voice":"female",
                            "schedule":1436876011,
                            "custom_string":"this is a test",
                            "require_input":1
                        }
                    ]
                }

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Here are your data.",
            "data":{
                "total_price":0.28,
                "total_count":4,
                "queued_count":4,
                "messages":[
                    {
                        "date":1436871253,
                        "to":"+61411111111",
                        "to_type":"mobile",
                        "body":"Jelly liquorice marshmallow candy carrot cake 4Eyffjs1vL.",
                        "from":null,
                        "lang":"en-au",
                        "voice":"female",
                        "schedule":1436874701,
                        "message_id":"BF7AD270-0DE2-418B-B606-71D527D9C1AE",
                        "message_parts":1,
                        "message_price":0.07,
                        "custom_string":"this is a test",
                        "user_id":1,
                        "subaccount_id":1,
                        "country":"AU",
                        "require_input":0,
                        "machine_detection":0,
                        "status":"SUCCESS"
                    },
                    {
                        "date":1436871253,
                        "to":"+61411111111",
                        "to_type":"mobile",
                        "body":"Chocolate bar icing icing oat cake carrot cake jelly cotton MWEvciEPIr.",
                        "from":null,
                        "lang":"en-au",
                        "voice":"female",
                        "schedule":1436876011,
                        "message_id":"D0C273EE-816D-4DF2-8E9D-9D9C65F168F3",
                        "message_parts":1,
                        "message_price":0.07,
                        "custom_string":"this is a test",
                        "user_id":1,
                        "subaccount_id":1,
                        "country":"AU",
                        "require_input":1,
                        "machine_detection":0,
                        "status":"SUCCESS"
                    },
                    {
                        "date":1436871253,
                        "to":"+16783270696",
                        "to_type":"mobile",
                        "body":"Chocolate bar icing icing oat cake carrot cake jelly cotton MWEvciEPIr.",
                        "from":null,
                        "lang":"en-au",
                        "voice":"female",
                        "schedule":1436876011,
                        "message_id":"A1845B61-C404-4793-8661-97890C19C8A2",
                        "message_parts":1,
                        "message_price":0.07,
                        "custom_string":"this is a test",
                        "user_id":1,
                        "subaccount_id":1,
                        "country":"US",
                        "require_input":1,
                        "machine_detection":0,
                        "status":"SUCCESS"
                    },
                    {
                        "date":1436871253,
                        "to":"+16783275492",
                        "to_type":"mobile",
                        "body":"Chocolate bar icing icing oat cake carrot cake jelly cotton MWEvciEPIr.",
                        "from":null,
                        "lang":"en-au",
                        "voice":"female",
                        "schedule":1436876011,
                        "message_id":"DB545FAA-7325-465F-A696-8BDBFA8C1E49",
                        "message_parts":1,
                        "message_price":0.07,
                        "custom_string":"this is a test",
                        "user_id":1,
                        "subaccount_id":1,
                        "country":"US",
                        "require_input":1,
                        "machine_detection":0,
                        "status":"SUCCESS"
                    }
                ]
            }
        }


## Voice Languages [/voice/lang]

### Voice Languages [GET /voice/lang]

+ Response 200 (application/json)

        {
          "http_code": 200,
          "response_code": "SUCCESS",
          "response_msg": "Here are the possible languages.",
          "data": [
            {
              "code": "en-us",
              "country": "English, US",
              "gender": [
                "female",
                "male"
              ]
            },
            {
              "code": "en-au",
              "country": "English, Australia",
              "gender": [
                "female",
                "male"
              ]
            },
            {
              "code": "en-gb",
              "country": "English, UK",
              "gender": [
                "female",
                "male"
              ]
            },
            {
              "code": "en-in",
              "country": "English, India",
              "gender": "female"
            },
            {
              "code": "de-de",
              "country": "German, Germany",
              "gender": [
                "female",
                "male"
              ]
            },
            {
              "code": "es-es",
              "country": "Spanish, Spain",
              "gender": [
                "female",
                "male"
              ]
            },
            {
              "code": "es-us",
              "country": "Spanish, US",
              "gender": [
                "female",
                "male"
              ]
            },
            {
              "code": "fr-ca",
              "country": "French, Canada",
              "gender": "female"
            },
            {
              "code": "fr-fr",
              "country": "French, France",
              "gender": [
                "female",
                "male"
              ]
            },
            {
              "code": "is-is",
              "country": "Icelandic, Iceland",
              "gender": [
                "female",
                "male"
              ]
            },
            {
              "code": "it-it",
              "country": "Italian, Italy",
              "gender": [
                "female",
                "male"
              ]
            },
            {
              "code": "nl-nl",
              "country": "Dutch, Netherlands",
              "gender": [
                "female",
                "male"
              ]
            },
            {
              "code": "pl-pl",
              "country": "Polish-Poland",
              "gender": [
                "female",
                "male"
              ]
            },
            {
              "code": "pt-pt",
              "country": "Portuguese, Portugal",
              "gender": "male"
            },
            {
              "code": "pt-br",
              "country": "Portuguese, Brazil",
              "gender": [
                "female",
                "male"
              ]
            },
            {
              "code": "ro-ro",
              "country": "Romanian, Romania",
              "gender": "female"
            },
            {
              "code": "ru-ru",
              "country": "Russian, Russia",
              "gender": [
                "female",
                "male"
              ]
            },
            {
              "code": "sv-se",
              "country": "Swedish, Sweden",
              "gender": "female"
            },
            {
              "code": "tr-tr",
              "country": "Turkish, Turkey",
              "gender": "female"
            },
            {
              "code": "en-gb-wls",
              "country": "English, Wales",
              "gender": [
                "female",
                "male"
              ]
            },
            {
              "code": "cy-gb-wls",
              "country": "Celtic, Wales",
              "gender": [
                "female",
                "male"
              ]
            },
            {
              "code": "nb-no",
              "country": "Norwegian, Norway",
              "gender": "female"
            },
            {
              "code": "da-dk",
              "country": "Danish, Denmark",
              "gender": [
                "female",
                "male"
              ]
            }
          ]
        }

### Voice History [/voice/history?date_from={date_from}&date_to={date_to}]

### Get Voice History [GET /voice/history?date_from={date_from}&date_to={date_to}]

+ Parameters
    + `date_from`: 1443501617 (int, optional) - Timestamp (from) used to show records by date.
    + `date_to`: 1443501727 (int, optional) - Timestamp (to) used to show recrods by date.

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Here is your history.",
            "data":{
                "total":4,
                "per_page":15,
                "current_page":1,
                "last_page":1,
                "next_page_url":null,
                "prev_page_url":null,
                "from":1,
                "to":4,
                "data":[
                    {
                        "user_id":1,
                        "subaccount_id":1,
                        "list_id":null,
                        "message_id":"D6456F8A-9DF9-46EC-8014-BFE87860F65C",
                        "to":"+15184811537",
                        "to_type":"mobile",
                        "from":"+19403944918",
                        "voice":"female",
                        "lang":"en-us",
                        "body":"this is a test.",
                        "carrier":"",
                        "country":"US",
                        "custom_string":"mystring",
                        "schedule":"1538672470",
                        "message_parts":"1.00",
                        "message_price":"0.17",
                        "status":"WaitApproval",
                        "status_code":null,
                        "status_text":null,
                        "date_added":1443501617,
                        "digits":null,
                        "machine_detected":0,
                        "require_input":0,
                        "machine_detected":0

                    },
                    {
                        "user_id":1,
                        "subaccount_id":1,
                        "list_id":null,
                        "message_id":"25304958-15F2-41D9-8716-CF1F28EF506B",
                        "to":"+15184811537",
                        "to_type":"mobile",
                        "from":"+19403944918",
                        "voice":"female",
                        "lang":"en-us",
                        "body":"this is a test.",
                        "carrier":"",
                        "country":"US",
                        "custom_string":"mystring",
                        "schedule":"1538672470",
                        "message_parts":"1.00",
                        "message_price":"0.17",
                        "status":"WaitApproval",
                        "status_code":null,
                        "status_text":null,
                        "date_added":1443501727,
                        "digits":null,
                        "machine_detected":0,
                        "require_input":0,
                        "machine_detected":0
                    },
                    {
                        "user_id":1,
                        "subaccount_id":1,
                        "list_id":null,
                        "message_id":"0B474459-B75F-4180-9567-7ECA3FC56BD7",
                        "to":"+15184811538",
                        "to_type":"mobile",
                        "from":"+19403944918",
                        "voice":"female",
                        "lang":"en-us",
                        "body":"this is a test.",
                        "carrier":"",
                        "country":"US",
                        "custom_string":"mystring",
                        "schedule":"1538672470",
                        "message_parts":"1.00",
                        "message_price":"0.17",
                        "status":"WaitApproval",
                        "status_code":null,
                        "status_text":null,
                        "date_added":1443501727,
                        "digits":null,
                        "machine_detected":0,
                        "require_input":0,
                        "machine_detected":0
                    },
                    {
                        "user_id":1,
                        "subaccount_id":1,
                        "list_id":null,
                        "message_id":"A991556C-D4A5-47D5-A5E5-C9D251C8743A",
                        "to":"+15184811539",
                        "to_type":"mobile",
                        "from":"+19403944918",
                        "voice":"female",
                        "lang":"en-us",
                        "body":"this is a test.",
                        "carrier":"",
                        "country":"US",
                        "custom_string":"mystring",
                        "schedule":"1538672470",
                        "message_parts":"1.00",
                        "message_price":"0.17",
                        "status":"WaitApproval",
                        "status_code":null,
                        "status_text":null,
                        "date_added":1443501727,
                        "digits":null,
                        "machine_detected":0,
                        "require_input":0,
                        "machine_detected":0
                    }
                ]
            }
        }

### Export Voice History [GET /voice/history/export?filename={filename}]

+ Parameters
    + filename: `export.csv` (string, required) - Your export filename.

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Download your file here.",
            "data":{
                "url":"https://rest.clicksend.com/files/22D55AF9-6CF0-476D-A8B3-82A998FD2738?filename=export.csv"
            }
        }

### Delivery Receipts [/voice/receipts]

**Push Delivery Receipts**

If you prefer, we can push message replies to your server as they arrive with us.

1. Log into your account.
2. Click on 'Voice' then 'Settings' tab.
3. Click on the 'Voice Delivery Report Settings' menu.
4. Select 'Forward to URL'.
5. Enter the URL and click 'Save'.


The following variables will be posted to the URL specified:

| Variable | Description |
|---|---|
| `timestamp_send` | Timestamp of the original send request in UNIX format. e.g 1439173980
| `timestamp` | Timestamp of delivery report in UNIX format. e.g 1439173981
| `message_id` | Message ID, returned when originally sending the message.
| `status` | Delivered or Undelivered
| `status_code` | Status code. Refer to 'Voice Delivery Status Codes' in docs.
| `status_text` | Status text.
| `error_code` | Error code.
| `error_text` | Error text.
| `custom_string` | A custom string used when sending the original message.
| `user_id` | The user ID of the user who sent the message.
| `subaccount_id` | The subaccount ID of the user who sent the message.
| `message_type` | 'voice' (constant).
| `digits` | Numbers the recipient pressed on their keypad during the call. A blank string will be used if they didn't provide any input.




**Pull Delivery Receipts**

Receive delivery reports by polling.
You can poll our server and retrieve delivery reports at a time that suits you.

1. Log into your account.
2. Click on 'Voice' then 'Settings' tab.
3. Click on the 'Voice Delivery Report Settings' menu.
4. Select 'Poll our server' and click 'Save'.

### Get Voice receipts [GET /voice/receipts]

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Here are your delivery receipts.",
            "data":{
                "total":2,
                "per_page":15,
                "current_page":1,
                "last_page":1,
                "next_page_url":null,
                "prev_page_url":null,
                "from":1,
                "to":2,
                "data":[
                    {
                        "timestamp_send":"1442381791",
                        "timestamp":"1442381791",
                        "message_id":"31BC271B-1E0C-45F6-9E7E-97186C46BB82",
                        "status_code":"201",
                        "status_text":"Success: Message received on handset.",
                        "error_code":null,
                        "error_text":null,
                        "custom_string":null,
                        "message_type":"voice",
                        "digits":"2"
                    },
                    {
                        "timestamp_send":"1442381829",
                        "timestamp":"1442381829",
                        "message_id":"23C8ADA3-FD8B-420B-801A-F829BB87AC6F",
                        "status_code":"201",
                        "status_text":"Success: Message received on handset.",
                        "error_code":null,
                        "error_text":null,
                        "custom_string":null,
                        "message_type":"voice",
                        "digits":"5"
                    }
                ]
            }
        }

### Add a Test Delivery Receipt [POST /voice/receipts]

+ Request (application/json)

    + Attributes (object)
        + url: http://yourdomain.com (string, required) - Your URL if using the push option or 'poll' if using the pull option.

    + Body

                {
                    "url":"http://yourdomain.com"
                }

+ Response 200 (application/json)

        {
          "http_code": 200,
          "response_code": "SUCCESS",
          "response_msg": "Test receipt has been added.",
          "data": {
            "timestamp_send": "1489730505",
            "timestamp": "1489730505",
            "message_id": "CEA5E06A-F4BF-4EC6-8315-B25087352DFA",
            "status_code": "201",
            "status_text": "Success: Message received on handset.",
            "error_code": null,
            "error_text": null,
            "custom_string": null,
            "subaccount_id": 1746,
            "message_type": "voice",
            "digits": "2"
          }
        }

### Get Specific Voice Receipt [GET /voice/receipts/{message_id}]

+ Parameters
    + `message_id`: 28DD2718-3055-45F1-9B79-F2C43509FD16 (string, required) - The voice receipt message id.

+ Response 200 (application/json)

    + Body

                {
                    "http_code": 200,
                    "response_code": "SUCCESS",
                    "response_msg": "Here is your result.",
                    "data": {
                        "timestamp_send": "1461658202",
                        "timestamp": "1461658202",
                        "message_id": "1FCFEBBF-90F5-4198-AEBD-5DAEDBA3D7B1",
                        "status_code": "Sent",
                        "status_text": "Sent",
                        "error_code": "",
                        "error_text": "",
                        "custom_string": "custom string test",
                        "subaccount_id": 1039,
                        "message_type": "voice",
                        "digits": "6"
                    }
                }

### Marked Voice Receipts as Read [PUT /voice/receipts-read?date_before={date_before}]

+ Parameters
    + `date_before`: 1461897483 (number, required) - An optional [unix timestamp](http://help.clicksend.com/what-is-a-unix-timestamp) - mark all as read before this timestamp. If not given, all receipts will be marked as read.

+ Response 200 (application/json)

    + Body

                {
                    "http_code": 200,
                    "response_code": "SUCCESS",
                    "response_msg": "Receipts have been marked as read.",
                    "data": null
                }

## Cancel Voice Calls [/voice/{message_id}/cancel]

### Cancel a Specific Voice Call [PUT]

+ Parameters
    + `message_id`: 7B5BFC19 06B7 49C1 8DCDFB011600E12B (string, required) - Your voice message id.

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"Voice have been cancelled.",
            "data":[]
        }

### Cancel all Voice Calls [PUT /voice/cancel-all]

+ Response 200 (application/json)

        {
            "http_code":200,
            "response_code":"SUCCESS",
            "response_msg":"5 messages have been cancelled.",
            "data":{
                "count":5
            }
        }

