Send a Messages API message

Send messages at scale through multiple channels, utilizing various message types.

Please log in to see full path URL. Learn why.
post
/messages-api/1/messages
Request Body schema:
application/json
collapse all -
messages
required
Array of Messages API message (object) or Messages API template message (object)

Array of message objects of a single message or multiple messages sent under one bulk ID.

Array
One of
  • Messages API message
  • Messages API template message

Represents a single message.

channel
required
string
Enum: "SMS" "MMS" "WHATSAPP" "VIBER_BM" "VIBER_BOT" "RCS" "APPLE_MB" "INSTAGRAM_DM" "LINE_ON" "MESSENGER"

Messaging channel used for sending a message.

sender
required
string

The sender ID. It can be alphanumeric or numeric (e.g., CompanyName). Make sure you don't exceed character limit.

destinations
required
Array of To Destination (object) or Channels Destination (object)

Array of destination objects for where messages are being sent. A valid destination is required.

Array
One of
  • To Destination
  • Channels Destination

Represents a simple destination.

to
required
string

The destination address of the message. It can be alphanumeric or numeric.

messageId
string [ 0 .. 200 ] characters

The ID that uniquely identifies the message sent.

content
required
object

Content of the message.

header
object

Header of the message.

type
required
string
text
required
string

Text of the header.

body
required
object

Body of the message.

type
required
string
text
required
string

Text to be sent.

buttons
Array of objects

List of buttons of the message.

Array
type
required
string
text
required
string

Text to be displayed on the button.

postbackData
required
string

Custom data that will be sent to you when user reply to a message.

confirmationBody
object

Body of the confirmation message.

text
required
string

Text to be sent.

description
string

Description to be sent.

imageUrl
string

URL of the image.

footer
object

Footer of the message.

text
required
string

Text of the footer.

options
object

Message options.

platform
object

Platform options. For more details, see documentation.

entityId
string [ 0 .. 255 ] characters

Used when specifying an entity in outbound send requests. It is also returned in notification events. For detailed usage, refer to the documentation.

applicationId
string [ 0 .. 255 ] characters

Used when specifying an application in outbound send requests. It is also returned in notification events. For detailed usage, refer to the documentation.

validityPeriod
object

Message validity period. Once expired, the message won't be sent. Validity period longer than 48h is not supported. If exceeded, it will be automatically set to 48h. Minimal value is 10 seconds.

amount
required
integer <int32>

Message validity period's value. If timeUnit is not set, it will default to MINUTES.

timeUnit
string
Default: "MINUTES"
Enum: "SECONDS" "MINUTES" "HOURS"

Message validity period time unit.

adaptationMode
boolean
Default: true

If channel does not fully support message to be sent, we will try to map it as best effort. This is default behavior, even if this option is not specified.

regional
object

Region-specific parameters, often imposed by local laws. Use this, if country or region that you are sending an SMS to requires additional information.

indiaDlt
object

Distributed Ledger Technology (DLT) specific parameters required for sending SMS to phone numbers registered in India.

contentTemplateId
string

Registered DLT content template ID which matches message you are sending.

principalEntityId
required
string

Your assigned DLT principal entity ID.

telemarketerId
string

Your assigned Telemarketer ID. (required for Aggregators)

turkeyIys
object

IYS regulations specific parameters required for sending promotional SMS to phone numbers registered in Turkey.

brandCode
integer <int32>

Brand code is an ID of the company based on a company VAT number. If not provided in request, default value is used from your Infobip account.

recipientType
required
string
Enum: "BIREYSEL" "TACIR"

Recipient Type must be TACIR or BIREYSEL.

southKorea
object

Use case dependent parameters for sending SMS to phone numbers registered in South Korea.

title
string [ 0 .. 66 ] characters

Title of the message.

resellerCode
integer <int32>

Reseller identification code: 9-digit registration number in the business registration certificate for South Korea. Resellers should submit this when sending.

campaignReferenceId
string

ID that allows you to track, analyze, and show an aggregated overview and the performance of individual campaigns per sending channel.

webhooks
object

Provides options for configuring message webhooks.

delivery
object

Provides options for configuring the delivery report behavior.

url
string

The URL on your call back server where a delivery report will be sent. If your URL becomes unavailable then the retry cycle uses the following formula: 1min + (1min * retryNumber * retryNumber).

intermediateReport
boolean

The real-time intermediate delivery report containing GSM error codes, messages status, pricing, network and country codes, etc., which will be sent on your callback server. The default setting is false.

receiveTriggeredFailoverReports
boolean

Allows you to receive delivery reports for all triggered failover steps, not just the final one (either the first successful or the last failed step). The default setting is false.

contentType
string

Preferred delivery report content type, application/json or application/xml.

callbackData
string [ 0 .. 4000 ] characters

Additional data that can be used for identifying, managing, or monitoring a message. Data included here will also be automatically included in the message Delivery Report and Seen Report. The maximum value is 4000 characters.

seen
object

Provides options for configuring the seen report behavior.

url
string

The URL on your call back server where a seen report will be sent.

failover
Array of Message failover (object) or Template message failover (object)

Provides options for configuring a message failover. When message fails it will be sent over channels in order specified in an array. It has to contain unique entries per channel and it cannot contain entry with the same channel as original message. Make sure to provide correct sender and destinations specified as Channels Destination for each channel.

Array
One of
  • Message failover
  • Template message failover

Configuration of a single failover step

channel
required
string
Enum: "SMS" "MMS" "WHATSAPP" "VIBER_BM" "VIBER_BOT" "RCS" "APPLE_MB" "INSTAGRAM_DM" "LINE_ON" "MESSENGER"

Messaging channel used for sending a message.

sender
required
string

Sender for channel specified above.

content
object

Content of the message.

header
object

Header of the message.

type
required
string
text
required
string

Text of the header.

body
required
object

Body of the message.

type
required
string
text
required
string

Text to be sent.

buttons
Array of objects

List of buttons of the message.

Array
type
required
string
text
required
string

Text to be displayed on the button.

postbackData
required
string

Custom data that will be sent to you when user reply to a message.

confirmationBody
object

Body of the confirmation message.

text
required
string

Text to be sent.

description
string

Description to be sent.

imageUrl
string

URL of the image.

footer
object

Footer of the message.

text
required
string

Text of the footer.

validityPeriod
object

Message validity period. Once expired, the message won't be sent. Validity period longer than 48h is not supported. If exceeded, it will be automatically set to 48h. Minimal value is 10 seconds.

amount
required
integer <int32>

Message validity period's value. If timeUnit is not set, it will default to MINUTES.

timeUnit
string
Default: "MINUTES"
Enum: "SECONDS" "MINUTES" "HOURS"

Message validity period time unit.

options
object

Options applicable to all messages in the request.

schedule
object

Options for scheduling a message.

bulkId
string [ 0 .. 100 ] characters

Unique ID assigned to the request if messaging multiple recipients or sending multiple messages via a single API request. If not provided, it will be auto-generated and returned in the API response.

sendAt
string <date-time>

Date and time when the message is to be sent. Used for scheduled messages. Has the following format: yyyy-MM-dd'T'HH:mm:ss.SSSZ, and can only be scheduled for no later than 180 days in advance.

sendingSpeedLimit
object

Limits the send speed when sending messages in bulk to deliver messages over a longer period of time. You may wish to use this to allow your systems or agents to handle large amounts of incoming traffic, e.g., if you are expecting recipients to follow through with a call-to-action option from a message you sent. Not setting a send speed limit can overwhelm your resources with incoming traffic.

amount
required
integer <int32>

The number of messages to be sent per timeUnit. By default, the system sends messages as fast as the infrastructure allows. Use this parameter to adapt sending capacity to your needs. The system is only able to work against its maximum capacity for ambitious message batches.

timeUnit
string
Default: "MINUTE"
Enum: "MINUTE" "HOUR" "DAY"

The time unit to define when setting a messaging speed limit. Defaults to MINUTE.

tracking
object

Sets up URL shortening and tracking feature. Does not apply to channels that do not support it: Instagram, LINE, Messenger, Viber Bot.

shortenUrl
boolean
Default: true

Enable shortening of the URLs within a message. Set this to true, if you want to set up other URL options.

trackClicks
boolean
Default: true

Enable tracking of short URL clicks within a message: which URL was clicked, how many times, and by whom.

trackingUrl
string

The URL of your callback server on to which the Click report will be sent.

removeProtocol
boolean
Default: false

Remove a protocol, such as https://, from links to shorten a message. Note that some mobiles may not recognize such links as a URL.

customDomain
string

Select a predefined custom domain to use when generating a short URL.

Responses

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

500

Internal Server Error

Request samples

Content type
application/json
Example
Copy
Collapse all
{
  • "messages":
    [
    • {
      • "channel": "SMS",
      • "sender": "447491163443",
      • "destinations":
        [
        • {
          • "to": "111111111"
          }
        ],
      • "content":
        {
        • "body":
          {
          • "text": "May the Force be with you.",
          • "type": "TEXT"
          }
        }
      }
    ]
}

Response samples

Content type
application/json
Copy
Collapse all
{
  • "bulkId": "1688025180464000013",
  • "messages":
    [
    • {
      • "messageId": "1688025180464000014",
      • "status":
        {
        • "groupId": 1,
        • "groupName": "PENDING",
        • "id": 26,
        • "name": "MESSAGE_ACCEPTED",
        • "description": "Message sent to next instance"
        },
      • "destination": "48600700800"
      }
    ]
}

Encountering issues

Contact our support

What's new? Check out

Release Notes

Unsure about a term? See

Glossary

Research panel

Help shape the future of our products
Learn more
Service status

Copyright @ 2006-2025 Infobip ltd.