Send a LINE message

Send one or more messages to multiple recipients.

Please log in to see full path URL. Learn why.
post
/line/1/messages
Request Body schema:
application/json
collapse all -
messages
required
Array of objects

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

Array
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 objects

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

Array
to
required
string

The destination address of the message.

messageId
string [ 0 .. 200 ] characters

The ID that uniquely identifies the message sent.

content
required
object

Message content.

type
string
altText
required
string [ 0 .. 400 ] characters
contents
required
object
type
string
size
string
Enum: "NANO" "MICRO" "KILO" "MEGA" "GIGA"
direction
string
Enum: "LEFT_TO_RIGHT" "RIGHT_TO_LEFT"
header
object
layout
required
string
Enum: "HORIZONTAL" "VERTICAL" "BASELINE"
backgroundColor
string
borderColor
string
borderWidth
string
cornerRadius
string
width
string
height
string
flex
integer <int32> [ 0 .. 20 ]
margin
string
spacing
string
paddingAll
string
paddingTop
string
paddingBottom
string
paddingStart
string
paddingEnd
string
offsetTop
string
offsetBottom
string
offsetStart
string
offsetEnd
string
position
string
Enum: "RELATIVE" "ABSOLUTE"
action
object
type
string
label
required
string [ 0 .. 20 ] characters
uri
required
string [ 0 .. 1000 ] characters
altUri
object
desktop
string [ 0 .. 1000 ] characters
contents
Array of objects
Array
layout
required
string
Enum: "HORIZONTAL" "VERTICAL" "BASELINE"
backgroundColor
string
borderColor
string
borderWidth
string
cornerRadius
string
width
string
height
string
flex
integer <int32> [ 0 .. 20 ]
margin
string
spacing
string
paddingAll
string
paddingTop
string
paddingBottom
string
paddingStart
string
paddingEnd
string
offsetTop
string
offsetBottom
string
offsetStart
string
offsetEnd
string
position
string
Enum: "RELATIVE" "ABSOLUTE"
action
object
type
string
label
required
string [ 0 .. 20 ] characters
uri
required
string [ 0 .. 1000 ] characters
altUri
object
desktop
string [ 0 .. 1000 ] characters
contents
Array of objects
Array
object Component Recursive
type
string
type
string
Enum: "BOX" "BUTTON" "ICON" "IMAGE" "SEPARATOR" "TEXT" "SPAN"
body
object
layout
required
string
Enum: "HORIZONTAL" "VERTICAL" "BASELINE"
backgroundColor
string
borderColor
string
borderWidth
string
cornerRadius
string
width
string
height
string
flex
integer <int32> [ 0 .. 20 ]
margin
string
spacing
string
paddingAll
string
paddingTop
string
paddingBottom
string
paddingStart
string
paddingEnd
string
offsetTop
string
offsetBottom
string
offsetStart
string
offsetEnd
string
position
string
Enum: "RELATIVE" "ABSOLUTE"
action
object
type
string
label
required
string [ 0 .. 20 ] characters
uri
required
string [ 0 .. 1000 ] characters
altUri
object
desktop
string [ 0 .. 1000 ] characters
contents
Array of objects
Array
layout
required
string
Enum: "HORIZONTAL" "VERTICAL" "BASELINE"
backgroundColor
string
borderColor
string
borderWidth
string
cornerRadius
string
width
string
height
string
flex
integer <int32> [ 0 .. 20 ]
margin
string
spacing
string
paddingAll
string
paddingTop
string
paddingBottom
string
paddingStart
string
paddingEnd
string
offsetTop
string
offsetBottom
string
offsetStart
string
offsetEnd
string
position
string
Enum: "RELATIVE" "ABSOLUTE"
action
object
type
string
label
required
string [ 0 .. 20 ] characters
uri
required
string [ 0 .. 1000 ] characters
altUri
object
desktop
string [ 0 .. 1000 ] characters
contents
Array of objects
Array
object Component Recursive
type
string
type
string
Enum: "BOX" "BUTTON" "ICON" "IMAGE" "SEPARATOR" "TEXT" "SPAN"
footer
object
layout
required
string
Enum: "HORIZONTAL" "VERTICAL" "BASELINE"
backgroundColor
string
borderColor
string
borderWidth
string
cornerRadius
string
width
string
height
string
flex
integer <int32> [ 0 .. 20 ]
margin
string
spacing
string
paddingAll
string
paddingTop
string
paddingBottom
string
paddingStart
string
paddingEnd
string
offsetTop
string
offsetBottom
string
offsetStart
string
offsetEnd
string
position
string
Enum: "RELATIVE" "ABSOLUTE"
action
object
type
string
label
required
string [ 0 .. 20 ] characters
uri
required
string [ 0 .. 1000 ] characters
altUri
object
desktop
string [ 0 .. 1000 ] characters
contents
Array of objects
Array
layout
required
string
Enum: "HORIZONTAL" "VERTICAL" "BASELINE"
backgroundColor
string
borderColor
string
borderWidth
string
cornerRadius
string
width
string
height
string
flex
integer <int32> [ 0 .. 20 ]
margin
string
spacing
string
paddingAll
string
paddingTop
string
paddingBottom
string
paddingStart
string
paddingEnd
string
offsetTop
string
offsetBottom
string
offsetStart
string
offsetEnd
string
position
string
Enum: "RELATIVE" "ABSOLUTE"
action
object
type
string
label
required
string [ 0 .. 20 ] characters
uri
required
string [ 0 .. 1000 ] characters
altUri
object
desktop
string [ 0 .. 1000 ] characters
contents
Array of objects
Array
object Component Recursive
type
string
type
string
Enum: "BOX" "BUTTON" "ICON" "IMAGE" "SEPARATOR" "TEXT" "SPAN"
style
object
header
object
backgroundColor
string
separator
boolean
separatorColor
string
body
object
backgroundColor
string
separator
boolean
separatorColor
string
footer
object
backgroundColor
string
separator
boolean
separatorColor
string
action
object
type
string
label
required
string [ 0 .. 20 ] characters
uri
required
string [ 0 .. 1000 ] characters
altUri
object
desktop
string [ 0 .. 1000 ] characters
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.

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.

deliveryTimeWindow
object

Sets specific message delivery window outside of which messages won't be delivered. Often, used when there are restrictions on when messages can be sent. The exact time of the day to start sending messages can be defined using the from property. The exact time of the day to end sending messages can be defined using the to property. Properties from and to should be both provided with the minimum 1 hour difference or omitted.

days
required
Array of strings
Items Enum: "MONDAY" "TUESDAY" "WEDNESDAY" "THURSDAY" "FRIDAY" "SATURDAY" "SUNDAY"

Days of the week which are included in the delivery time window. At least one day must be provided. Separate multiple days with a comma.

from
object

The exact time of the day. The time is expressed in the UTC time zone.

hour
required
integer <int32> [ 0 .. 23 ]

Hour when the time window opens when used in the from property or closes when used in the to property.

minute
required
integer <int32> [ 0 .. 59 ]

Minute when the time window opens when used in the from property or closes when used in the to property.

to
object

The exact time of the day. The time is expressed in the UTC time zone.

hour
required
integer <int32> [ 0 .. 23 ]

Hour when the time window opens when used in the from property or closes when used in the to property.

minute
required
integer <int32> [ 0 .. 59 ]

Minute when the time window opens when used in the from property or closes when used in the to property.

campaignReferenceId
string [ 0 .. 255 ] characters

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

smsFailover
object

Failover SMS message to be sent if the original message could not be delivered.

sender
string

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

text
required
string

Content of the message being sent.

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.

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.

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.

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. Defaults to false.

notify
boolean

Notify enables you to specify your preferences for receiving DLRs. If set to false, no DLR will be sent. Note: When no webhook is specified in the request and notify is set to 'true' or not defined, your Subscription settings will apply.

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. The maximum value is 4000 characters.

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.

Responses

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

500

Internal Server Error

Request samples

Content type
application/json
Copy
Collapse all
{
  • "messages":
    [
    • {
      • "sender": "OFFICIAL-ACCOUNT-ID-123",
      • "destinations":
        [
        • {
          • "to": "66855538125"
          }
        ],
      • "content":
        {
        • "altText": "Thank you for your purchase. We have successfully received your order.",
        • "contents":
          {
          • "header":
            {
            • "layout": "HORIZONTAL",
            • "paddingAll": "none",
            • "paddingTop": "md",
            • "paddingBottom": "md",
            • "paddingStart": "lg",
            • "paddingEnd": "lg",
            • "offsetTop": "none",
            • "contents":
              [
              • {},
              • {
                • "contents":
                  [
                  • {
                    • "text": "OFFICIAL NOTIFICATION",
                    • "type": "SPAN"
                    }
                  ],
                • "flex": 20,
                • "size": "14px",
                • "align": "CENTER",
                • "gravity": "CENTER",
                • "wrap": true,
                • "color": "#ffffff",
                • "weight": "REGULAR",
                • "position": "RELATIVE",
                • "type": "TEXT"
                },
              • {
                • "text": "powered by",
                • "contents":
                  [
                  • {
                    • "text": "powered by",
                    • "size": "10px",
                    • "weight": "REGULAR",
                    • "style": "ITALIC",
                    • "type": "SPAN"
                    }
                  ],
                • "flex": 7,
                • "align": "END",
                • "gravity": "CENTER",
                • "wrap": true,
                • "color": "#ffffff",
                • "offsetTop": "0.3px",
                • "type": "TEXT"
                },
              • {
                • "text": "powered by",
                • "contents":
                  [
                  • {
                    • "text": "LINE",
                    • "size": "12px",
                    • "weight": "BOLD",
                    • "type": "SPAN"
                    }
                  ],
                • "flex": 4,
                • "align": "CENTER",
                • "gravity": "CENTER",
                • "wrap": true,
                • "color": "#ffffff",
                • "type": "TEXT"
                }
              ],
            • "type": "BOX"
            },
          • "body":
            {
            • "layout": "VERTICAL",
            • "paddingAll": "none",
            • "paddingTop": "xl",
            • "paddingBottom": "lg",
            • "paddingStart": "xxl",
            • "paddingEnd": "xxl",
            • "contents":
              [
              • {
                • "layout": "VERTICAL",
                • "paddingTop": "none",
                • "offsetTop": "none",
                • "offsetBottom": "none",
                • "contents":
                  [
                  • {
                    • "text": "Purchase complete",
                    • "size": "lg",
                    • "wrap": true,
                    • "weight": "BOLD",
                    • "type": "TEXT"
                    }
                  ],
                • "type": "BOX"
                },
              • {
                • "layout": "HORIZONTAL",
                • "paddingTop": "lg",
                • "contents":
                  [
                  • {
                    • "contents":
                      [
                      • {
                        • "text": "Thank you for your purchase. We have successfully received your order.",
                        • "type": "SPAN"
                        }
                      ],
                    • "wrap": true,
                    • "offsetTop": "none",
                    • "type": "TEXT"
                    }
                  ],
                • "type": "BOX"
                }
              ],
            • "type": "BOX"
            },
          • "footer":
            {
            • "layout": "HORIZONTAL",
            • "borderWidth": "none",
            • "margin": "none",
            • "paddingTop": "sm",
            • "paddingBottom": "md",
            • "action":
              {},
            • "contents":
              [
              • {
                • "contents":
                  [
                  • {
                    • "text": "Learn more about LINE Official Notification ",
                    • "color": "#BDBDBD",
                    • "type": "SPAN"
                    },
                  • {
                    • "text": "here",
                    • "color": "#00b4ff",
                    • "decoration": "UNDERLINE",
                    • "type": "SPAN"
                    },
                  • {
                    • "text": ".",
                    • "color": "#BDBDBD",
                    • "type": "SPAN"
                    }
                  ],
                • "size": "10px",
                • "align": "CENTER",
                • "wrap": true,
                • "type": "TEXT"
                }
              ],
            • "type": "BOX"
            },
          • "style":
            {
            • "header":
              {
              • "backgroundColor": "#06C755"
              },
            • "footer":
              {
              • "backgroundColor": "#EEEEEE"
              }
            },
          • "type": "BUBBLE"
          },
        • "type": "LINE_NOTIFICATION"
        }
      }
    ]
}

Response samples

Content type
application/json
Copy
Collapse all
{
  • "bulkId": "2034072219640523072",
  • "messages":
    [
    • {
      • "messageId": "2250be2d4219-3af1-78856-aabe-1362af1edfd2",
      • "status":
        {
        • "groupId": 1,
        • "groupName": "PENDING",
        • "id": 7,
        • "name": "PENDING_ENROUTE",
        • "description": "Message sent to next instance"
        },
      • "destination": "66855538125"
      }
    ]
}

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.