Conversation API
Campaigns
Campaigns are a feature that allows you to schedule bulk messaging to a list of contacts. This method will prepare all necessary rules and intervals to ensure successful delivery. This method supports two approaches:
- Sending the same text to an array of contacts
- An array of requests where the message can be individualized for each contact.
Requirements for using Campaigns
- You can only use this method to send messages to contacts who have already communicated with your sender name.
- This API requires you to have active paid services. These API’s does not work with the sandbox environment.
- You CAN’T use this method to initiate a conversation with a new contact (i.e., cold messaging).
Schedule a campaign for an array of contacts
POST https://a.loopmessage.com/api/v1/campaigns/new/
Request body
| Name | Type | Description |
|---|---|---|
| name* | String | New name for the campaign. |
| contacts* | Array | An array of strings. |
| text* | String | Campaign text |
| attachments | Array | Optional. An array of strings. The string must be a full URL of your image. URL should start with https://. HTTP links (without SSL) are not supported. This must be a publicly accessible file URL: we will not be able to reach any URLs that are hidden or that require authentication. Max length of each URL: 256 characters, max elements in the array: 3. |
JSON payload example
{
"name": "My new campaign",
"text": "Hello",
"contacts": ["+13231112233", "+13232112233", "+13233112233"]
}
Response
Response {.tabset .tabset-fade}
tab 200: Accepted
{
"id": "UUID String",
"name": "String",
"api_key": "String",
"create_date": "2025-01-01T23:59:59Z"
}
tab 400: Failed
{
"code": 100,
"success": false,
"message": "error description",
}
Schedule a campaign with an array of requests
This API works in the same way, but you need to pass the same parameters as an array.
POST https://a.loopmessage.com/api/v1/campaigns/new/
JSON payload example
{
"name": "My new campaign",
"messages" [
{
"text": "Hello 1",
"contact": "+13231112233",
},
{
"text": "Hello 2",
"contact": "+13232112233",
},
{
"text": "Hello 3",
"contact": "+13232112233",
"attachments": ["https://mycdn.com/image.png"]
}
]
}
Response
Response {.tabset .tabset-fade}
tab 200: Accepted
{
"id": "UUID String",
"name": "String",
"api_key": "String",
"create_date": "2025-01-01T23:59:59Z"
}
tab 400: Failed
{
"code": 100,
"success": false,
"message": "error description",
}
Additional schedule parameters
Use these parameters to specify the schedule for your campaign.
| Name | Type | Description |
|---|---|---|
| from_date | String | Date when will need to begin the campaign YYYY-MM-DD format date. For example: 2010-12-31. Default: today. |
| from_time | String | From what time will we need to start sendings HH:mm format time. For example: 13:30 Default: 10:00. |
| to_time | String | Until what time will we need to end sendings HH:mm format time. For example: 23:59 Default: 22:00. |
| timezone | String | In which time zone should from_time and to_time be considered. TZ identified format, eg: America/Los_Angeles Default: America/New_York. |
JSON payload example
Array of contacts
{
"name": "My new campaign",
"from_date": "2026-12-31",
"from_time": "10:00",
"to_time": "19:00",
"text": "Hello",
"contacts": ["+13231112233", "+13232112233", "+13233112233"]
}
An array of messages
{
"name": "My new campaign",
"from_date": "2026-12-31",
"from_time": "10:00",
"to_time": "19:00",
"messages" [
{
"text": "Hello 1",
"contact": "+13231112233",
},
{
"text": "Hello with attachment",
"contact": "+13232112233",
"attachments": ["https://mycdn.com/image.png"]
}
]
}
Additional message parameters
All these parameters are optional.
| Name | Type | Description |
|---|---|---|
| effect | String | Add effect to your message. Possible values: slam, loud, gentle, invisibleInk, echo, spotlight, balloons, confetti, love, lasers, fireworks, shootingStar, celebration You can check the Apple guide about expressive messages. |
| subject | String | Your message subject. A recipient will see this subject as a bold title before the text. Only for iMessage. |
JSON payload example
Array of contacts
{
"name": "My new campaign",
"text": "Hello",
"contacts": ["+13231112233", "+13232112233", "+13233112233"],
"effect": "echo",
"subject": "String"
}
Array of messages
{
"name": "My new campaign",
"messages" [
{
"text": "Hello 1",
"contact": "+13231112233",
"effect": "love"
},
{
"text": "Hello with attachment",
"contact": "+13232112233",
"attachments": ["https://mycdn.com/image.png"],
"subject": "String"
}
]
}
Get organization campaigns
GET https://a.loopmessage.com/api/v1/campaigns/list/
Headers
| Name | Type | Description |
|---|---|---|
| Authorization* | String | API Key. Required*. |
| Content-Type* | String | application/json |
Query parameters
| Name | Type | Description |
|---|---|---|
| from_date | String | YYYY-MM-DD format date. For example: 2010-12-31. |
| to_date | String | YYYY-MM-DD format date. For example: 2010-12-31. |
| sort_by | String | Optional. Sorting order for results. Possible values: asc (ascending) or desc (default). |
| search | String | Optional. Filter campaigns by a specific value in name. |
| page | Integer | Optional. The page number to retrieve. Default is 1. |
| per_page | Integer | Optional. Number of webhook records per page. Default is 20. |
Response
Response {.tabset .tabset-fade}
tab 200: Success
{
"page": 1,
"num_pages": 5,
"per_page": 10,
"count": 50,
"items": [
"id": "uuid string",
"name": "string",
"status": "string",
"create_date": "iso8 date",
]
}
tab 400: Failed
{
"code": 100,
"message": "string"
}