Send messages from CSV

Send a message defined in layout variable to a list of contacts defined in a CSV file

Path Params
integer
required

Application's ID

Body Params
string
required

The layout is a JSON with the necessary information to send the messages. The variables should be enclosed in double curly braces (ex: {{variable}}).

An examples of layouts:

A simple text message:


{
  "contactCode": "{{contactCode}}",
  "channelType": "{{channelType}}",
  "sendType": "proactive",
  "content": {
    "body": "Hi there {{name}}!"
  }
}

A message with a template:


{
  "contactCode": "{{contactCode}}",
  "channelType": "cloud_api",
  "sendType": "proactive",
  "content": {
    "template": {
      "name": "{{templateName}}",
      "language": {
        "policy": "deterministic",
        "code": "es"
      },
      "components": [
        {
          "type": "body",
          "parameters": [
            {
              "type": "text",
              "text": "{{name}}"
            }
          ]
        },
        {
          "index": "0",
          "type": "button",
          "subType": "quickReply",
          "parameters": [
            {
              "type": "payload",
              "payload": "{{ticketId}}"
            }
          ]
        }
      ]
    }
  }
}
file
required

A CSV file with the contacts to be sent.

Each row in the CSV file represents a contact to be sent. Each column in the CSV file represents a variable in the layout.

An examples of CSV files:

The previous example with a simple text message:

contactCode,channelType,name
34666777888,cloud_api,John
34666555666,cloud_api,Jane
34666111222,cloud_api,Alice

The previous example with a template:

contactCode,templateName,name,ticketId
34666777888,new_ticket,John,5123
34666555666,new_ticket,Jane,5528
34666111222,error_ticket,Alice,4125
date-time

The date and time when the messages should be sent. If not provided, the messages will be sent immediately.

The format must be in ISO 8601 (e.g., 2025-10-01T12:15:00Z).

The scheduling date must be within the range from now up to a maximum of 3 months into the future.

string

The delay before sending the messages. The use of this property will schedule the sending of the messages to be sent after the specified delay from the current time.

This property can not be used in conjunction with the scheduleAt property.

The format must be in ISO 8601 duration.

Examples:

  • PT0.25S for 250 milliseconds
  • PT20S for 20 seconds
  • PT15M for 15 minutes
  • PT30M50.5S for 30 minutes, 50 seconds and 500 milliseconds
  • PT4H for 4 hours
  • P3D for 3 days
  • P2W for 2 weeks
  • P1M for 1 month
string
enum
Defaults to fragmentedSlots

The slicing condition allows you to define how the messages should be sliced when sending them.

  • fragmentedSlots: If slicing is enabled, slots will be assigned based on availability starting from the scheduled time, regardless of whether they are consecutive, and only within the next 48 hours.
  • immediateConsecutiveSlots: If slicing is enabled, slots will be assigned based on availability starting from the current time (or from the scheduled time, if it's a scheduled sending), and within the next 48 hours — but only if they are consecutive. If not enough consecutive slots are found, the task will be marked as canceled and will not be executed.
  • deferredConsecutiveSlots: If slicing is enabled, the system will attempt to find a set of consecutive available slots starting from the scheduled time and within the next 48 hours. If no suitable slots are found, the task will be marked as canceled and will not be executed.

If not provided, the default condition is fragmentedSlots.

Keep in mind that these conditions will only apply to a given sending when the slicing activation criteria are met.

Allowed:
Responses

Language
Credentials
Header
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json