# Sending Campaigns

If your service provider is already integrated with Mobivate SMS, you should be able to configure your **API Key** on their platform and this should enable you to send SMS directly from the 3rd Party software.

{% hint style="info" %}
The **API Key**, you can find on [our portal](https://hub.mobivate.com/) under the **User Profile** section.
{% endhint %}

If your service provider is not already integrated, you can ask them to do so. It should only take them few minutes to complete the integration using this simple API:

### **Request URL**

```http
https://api.mobivatebulksms.com:443/send/campaign?api_key={API_Key which you provide to them}
```

### **Content Type**

```json
application/json
```

### **Post Data (raw)**

```json
{
  "scheduleDateTime" : "2022-04-23T12:00:00.996+0200",
  "routeId" : "mglobal",
  "excludeOptouts" : true,
  "excludeDuplicates" : false,
  "spreadHours" : 3,
  "recipients" : [
   {
    "reference" : "Testing",
    "text" : "Hello World",
    "routeId" : "mglobal",
    "originator" : "TEST",
    "recipient" : "447930000000",
    }
  ],
  "shortenUrls" : false,
  "name" : "Test Name",
}
```

### **Campaign Parameters:**

| Parameter         | Required? | Description                                                                                                                                                                              |
| ----------------- | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| scheduleDateTime  | No        | .A date/time parameter to be used if you want to schedule your request to be sent in the future. Must contain hours, minutes and seconds. Timezone follows the ISO 8601 time formatting. |
| routeId           | Yes       | Mobivate recommends using "mglobal", but other Route IDs are available. The route ID, can be specified in each recipient.                                                                |
| excludeOptouts    | No        | A true or false field indicating if you want to exclude OptOuts.                                                                                                                         |
| excludeDuplicates | No        | A true or false field indicating if you want to exclude duplicate records.                                                                                                               |
| spreadHours       | No        | An integer indicating how many hours you want to spread the messages across.                                                                                                             |
| recipients        | Yes       | A list of Recipient Objects.                                                                                                                                                             |
| shortenUrls       | No        | A true/false field can be used to shorten URL's in the body text. Additional costs apply.                                                                                                |
| name              | No        | The campaign name.                                                                                                                                                                       |

### **Recipient Object Parameters:**

| Parameter  | Required? | Description                                                             |
| ---------- | --------- | ----------------------------------------------------------------------- |
| reference  | No        | Individual message reference, if declared must be unique per recipient. |
| text       | Yes       | The text body of the message being sent.                                |
| routeId    | No        | Allows to override the routeID set on the campaign per recipient.       |
| originator | Yes       | 11 alpha-numeric sender name or 15 digit number.                        |
| recipient  | Yes       | Recipient number, MSISDN / International number E.G. 447930000000.      |


---

# Agent Instructions: 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://wiki.mobivatebulksms.com/archived-docs/sending-campaigns.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.
