# Send SMS (Multiple V2)

## Send SMS Request (Multiple V2)

<mark style="color:green;">`POST`</mark> `https://app.sleengshort.com/api/sms/send-blk`

This endpoint allows you to send SMS to multiple recipients with different Sender Ids,&#x20;

Note the **msg\_ids** in the response body can be used to track the delivery status on a request when notifications are sent to the callback URL.

Also, you must check which API-Key you're using while sending sms. A <mark style="color:red;">coop API-Key</mark> must be used when sending sms with a <mark style="color:red;">coop sender\_id</mark> while an <mark style="color:red;">open API-Key</mark> must be used when sending sms with an <mark style="color:red;">open bind sender\_id.</mark>

#### Headers

| Name                                        | Type   | Description                        |
| ------------------------------------------- | ------ | ---------------------------------- |
| X-Api-Key<mark style="color:red;">\*</mark> | String | APPKEY\_\*\*\*\*\*\*\*\*\*\*\*\*\* |

#### Request Body

| Name                                         | Type   | Description                                                                                           |
| -------------------------------------------- | ------ | ----------------------------------------------------------------------------------------------------- |
| sender id<mark style="color:red;">\*</mark>  | String | SMS sender ID                                                                                         |
| recipients<mark style="color:red;">\*</mark> | String | MSISDN of recipients in international format                                                          |
| msg<mark style="color:red;">\*</mark>        | String | SMS body ( < 905 characters)                                                                          |
| type                                         | String | Message format: 0: Flash SMS, 1: SMS delivers to inbox(default), 2: Unicode SMS – Chinese, Arabic etc |

{% tabs %}
{% tab title="200: OK Click to view samples" %}
The error field shows the SMS that was not sent due to the wrong sender\_id

```javascript
{
    "status": "ok",
    "description": "Request processed successfully",
    "msg_ids": "+2347037076382|81ddc0aa-2464-4a07-bc83-c171591145cd,+2347037076382|f621510a-c5ea-4dbd-b0ea-2c630fa004cf",
    "errors": [
        {
            "sender_id": "Three",
            "recipient": "2347037076382",
            "msg": "2DO NOT DISCLOSE. Dear Customer",
            "err": "User of Transactional Sender ID not allowed"
        }
    ]
}
```
{% endtab %}

{% tab title="400: Bad Request Insufficient Balance" %}
```json
{
    "status": "Bad request",
    "description": "The request could not be understood by the server due to malformed syntax",
    "data": {
        "err_msg": "Insurficient balance, fund your account"
    }
}
```
{% endtab %}
{% endtabs %}

If you intend to send different messages with different sender Ids to multiple recipients in a single request, here is a sample request body below.\
This endpoint only allows 500 SMS in one request

```json
// sample body
    "data": [
        {
            "sender_id": "Opay",
            "recipient": "2347037076382",
            "msg": "1DO NOT DISCLOSE. Dear Customer",
            "type":1
        },
        {
            "sender_id": "OPay",
            "recipient": "2347037076382",
            "msg": "3DO NOT DISCLOSE. Dear Customer3DO NOT DISCLOSE. Dear Customer3DO NOT DISCLOSE. Dear Customer3DO NOT DISCLOSE. Dear Customer 3DO NOT DISCLOSE. Dear Customer NOT DISCLOSE. Dear Customer NOT DISCLOSE. Dear Customer NOT DISCLOSE. Dear Customer NOT DISCLOSE. Dear Customer",
            "type":0
        },
        {
            "sender_id": "Three",
            "recipient": "2347037076382",
            "msg": "2DO NOT DISCLOSE. Dear Customer"
        }
    ]
}
```

