> For the complete documentation index, see [llms.txt](https://docs.usenotifier.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.usenotifier.com/sms/send-bulk-sms.md).

# Send Bulk SMS

### Endpoint

```http
[POST] https://usenotifier.com/api/sms/bulk
```

### Example Request

{% tabs %}
{% tab title="Laravel" %}

```php
$response = Http::withToken('YOUR_API_KEY')
               ->post('https://usenotifier.com/api/sms', [
                  [
                     "to" => "+447700900389",
                     "body" => "Message One"
                  ],
                  [
                     "to" => "+447700900077",
                     "body" => "Message Two"
                  ],
                ]);
```

{% endtab %}

{% tab title="PHP Guzzle" %}

```php
<?php
$client = new Client();
$headers = [
  'Authorization' => 'Bearer YOUR-API-KEY',
  'Content-Type' => 'application/json'
];
$body = '[
  {
    "to": "+447700900389",
    "body": "Message One"
  },
  {
    "to": "+447700900077",
    "body": "Message Two"
  }
]';
$request = new Request('POST', 'https://usenotifier.com/api/sms/bulk', $headers, $body);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();
```

{% endtab %}

{% tab title="cURL" %}

```http
curl --location --request POST 'https://usenotifier.com/api/sms/bulk' \
--header 'Authorization: Bearer YOUR-API-KEY' \
--header 'Content-Type: application/json' \
--data-raw '[
    {
        "to": "+447949839469",
        "body": "Message One"
    },
    {
        "to": "+447949442686",
        "body": "Message Two"
    }
]'
```

{% endtab %}

{% tab title="C#" %}

```csharp
var client = new RestClient("https://usenotifier.com/api/sms/bulk");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer YOUR-API-KEY");
request.AddHeader("Content-Type", "application/json");
var body = @"[" + "\n" +
@"    {" + "\n" +
@"        ""to"": ""+447949839469""," + "\n" +
@"        ""body"": ""Message One""" + "\n" +
@"    }," + "\n" +
@"    {" + "\n" +
@"        ""to"": ""+447949442686""," + "\n" +
@"        ""body"": ""Message Two""" + "\n" +
@"    }" + "\n" +
@"]";
request.AddParameter("application/json", body,  ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
Read the [Authentication](/overview/authentication.md) docs to get your API KEY
{% endhint %}

**to:&#x20;***<mark style="color:red;">**required**</mark>*

The recipien&#x74;***'***&#x73; phone number in international format. This **must** start with a + and the country code. For example the UK phone number `07700900389` should be sent as `+447700900389`&#x20;

**body:&#x20;***<mark style="color:red;">**required**</mark>*

The contents of the message. The maximum length of this field is 1024 characters.&#x20;

Please note that the length of 1 message is 160 characters. Anything above this will be split into multiple messages of 153 characters and cost multiple credits.&#x20;

**uuid:&#x20;***<mark style="color:orange;">**optional**</mark>*

You may pass an optional UUID if you want to know the id of the message in advance. This is optional and we will create a UUID per message. The response of your request will give you this UUID.&#x20;

If you want generate your own you can do so programmatically or use a tool like `https://www.uuidgenerator.net/version1`

**sender:&#x20;***<mark style="color:orange;">**optional**</mark>*

You can pass over the name of an approved sender. If you have more than one approved sender you can switch between them by passing over this key, with the name of the sender as its value. If you do not pass the sender we will use the default sender set up in your Settings area.

**shortenLinks:&#x20;***<mark style="color:orange;">**optional**</mark>*

By default Notifier will replace your URLs with short links using the ntfy.app domain. This saves you characters and lets you have more text to your messages. If you want to turn this off, and use the full length URL that you sent over, pass over boolean false as the value.

**scheduled\_at:&#x20;***<mark style="color:orange;">**optional**</mark>*

You can tell Notifier to hold off sending your message until a date/time in the future. This field expects a datetime in the following format: **YYYY-MM-DD HH:MM:SS** for the UTC timezone. Alternatively you can send over a unix timestamp e.g. `1665600109`. Your message will be sent automatically at the time you have set in this field.

**campaign:&#x20;***<mark style="color:orange;">**optional**</mark>*

You can group your messages by a campaign, by sending over the name of the campaign. For example you may want to run a campaign for Black Friday. To do this send a field called campaign with the value Black Friday and we will group them all together.&#x20;

**campaignTracking:&#x20;***<mark style="color:orange;">**optional**</mark>*

You can add a customer tracking parameter to your shortened links. This will be added to the query string of the redirected URL of the short link.  The key will be `ntfy_campaign` and the value will be whatever you pass via this parameter.

Note that this requires **shortenLinks** so you cannot turn this off.&#x20;

### Example Response

All dates and times are UTC

```json
{
    "data": [
        {
            "uuid": "b2b14b1d-95d5-4751-9e53-41f6a3629950",
            "to": "+447700900389",
            "sender": "NTFY",
            "body": "Message One",
            "campaign": "Black Friday",
            "credits_used": 1,
            "status": "pending",
            "failure_reason": null,
            "created_at": "2022-09-26T08:47:16.000000Z",
            "sent_at": null,
            "delivered_at": null,
            "contact": {
                "uuid": "0338181e-358c-41f4-b914-8533df524aae",
                "firstname": "John",
                "lastname": "Smith",
                "created_at": "2022-09-01T16:45:32.000000Z",
                "contact_methods": [
                    {
                        "uuid": "6e7b6c86-4d24-41e4-9328-ec55ac088e9a",
                        "type": "phone",
                        "address": "+447700900389",
                        "created_at": "2022-09-06T16:45:32.000000Z",
                        "updated_at": "2022-09-06T16:45:32.000000Z"
                    }
                ]
            }
        },
        {
            "uuid": "efacb5a0-7d68-49ad-b6c0-e985db70a92f",
            "to": "+447700900077",
            "body": "Message Two",
            "status": "pending",
            "failure_reason": null,
            "created_at": "2022-09-26T08:47:16.000000Z",
            "scheduled_at":  "2022-09-25T22:00:00.000000Z",
            "sent_at": null,
            "delivered_at": null,
            "contact": {
                "uuid": "c7588eb0-aa97-4d6a-b6cc-86c7209005b0",
                "firstname": null,
                "lastname": null,
                "created_at": "2022-09-25T20:25:02.000000Z",
                "contact_methods": [
                    {
                        "uuid": "ed59b6f9-3b0c-4eaf-a380-a321eb98e195",
                        "type": "phone",
                        "address": "+447700900077",
                        "created_at": "2022-09-25T20:25:02.000000Z",
                        "updated_at": "2022-09-25T20:25:02.000000Z"
                    }
                ]
            }
        }
    ]
}
```

### Webhook

coming soon


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.usenotifier.com/sms/send-bulk-sms.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
