Skip to content

LINE API

Used to send LINE messages to users

POST https://api.pushwoosh.com/json/1.3/createLineMessage

Simple LINE messages that consist only of plain text, without images or buttons. Learn more

Tip: For advanced formatting and rich media, use message templates like Flex, image, or carousel.

Parameter
Type
RequiredDescription
applicationstringYesPushwoosh application code
authstringYesAPI access token for authenticating the request.
notificationsarray of objectsYesList of LINE message objects to be sent.
contentstringYesText of the LINE message to be sent. Max character limit: 5000.
Note: If both preset and content are included, the value from the request overrides the preset.
presetstringNoCode of the LINE preset you created in the Pushwoosh Control Panel. Note: If both preset and content are included, the value from the request overrides the preset.
send_datestringYesDate and time to send the message. Use format YYYY-MM-DD HH:mm or now to send immediately.
devicesarray of stringsYesList of device codes (user IDs) to send the LINE message to.
{
"request": {
"application": "XXXXXX-XXXXXX",
"auth": "**************************************",,
"notifications": [
{
"content": "test",
"preset": "preset_code",
"send_date":"now",
"devices": ["XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"]
}
]
}
}

You can send an image message to LINE users by specifying an image object within the template field of your request.

Each image message requires two image URLs: one for the full-size image (image_url) and another for the preview (preview_image_url). When users tap the preview, the full-size image opens. Make sure both URLs use HTTPS (TLS 1.2 or later) and link to publicly accessible image files.

For details, see the Image Message section in the LINE Messaging API documentation.

Parameter
Type
RequiredDescription
applicationstringYesPushwoosh application code
authstringYesAPI access token used to authenticate the request.
notificationsarray of objectsYesList of messages to send.
contentstringYesUsed as fallback or preview text for the message. Code of the LINE preset you created in the Pushwoosh Control Panel.
Note: If both preset and template are included, the template from the request is used.
If both preset and content are included, the content from the request overrides the preset.
send_datestringYesDate and time to send the message. Use format YYYY-MM-DD HH:mm or now to send immediately.
devicesarray of stringsYesList of device codes (user IDs) to send the LINE message to.
presetstringNoCode of the LINE preset you created in the Pushwoosh Control Panel.
Note: If both preset and template parameters are included in the request, the values from the template will override those defined in the preset.
If both preset and content are included in the same request, the content provided directly in the request will override the content from the preset.
templateobjectYesMessage layout template. Supports multiple message types. See details below.

Type: image

Parameter
Type
RequiredDescription
image_urlstringYesURL to the full-size image (must use HTTPS). Max length: 2000 characters. Format: JPEG, PNG. Max size: 10 MB.
preview_image_urlstringYesURL to the preview image shown in chat (must use HTTPS). Max length: 2000 characters. Format: JPEG, PNG. Max size: 1 MB.
{
"request": {
"application": "XXXXXX-XXXXXX",
"auth": "**************************************",
"notifications": [
{
"content": "test",
"send_date": "now",
"devices": [
"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
],
"preset": "preset_code",
"template": {
"en": {
"image": {
"alt_text": "some text",
"image_url": "https://images.com/1.jpg",
"preview_image_url": "https://images.com/1.png"
}
}
}
}
]
}
}

Image carousel messages let you display multiple images in a horizontally scrollable format. Each image appears as a separate, non-clickable column that users can swipe through in the LINE chat interface.

This format is ideal for showcasing items, promotions, or visual selections in an engaging way.

For details, refer to the Image Carousel Template section in the LINE Messaging API documentation.

Parameter
Type
RequiredDescription
applicationstringYesPushwoosh application code
authstringYesAPI access token used to authenticate the request.
notificationsarray of objectsYesList of messages to send.
contentstringYesUsed as fallback or preview text for the message.
Note: If both content and template are set, the template is used.
If both a preset and content are included in the same request, the content provided directly in the request will override the content from the preset.
send_datestringYesDate and time to send the message. Use the format YYYY-MM-DD HH:mm or "now".
devicesarray of stringsYesList of device codes (user IDs) to send the LINE message to.
presetstringNoCode of the LINE preset you created in the Pushwoosh Control Panel.
Note: If both preset and template parameters are included in the request, the values from the template will override those defined in the preset.
If both a preset and content are included in the same request, the content provided directly in the request will override the content from the preset.
templateobjectYesMessage layout template. Supports multiple message types. See details below.

Type: image_carousel

Parameter
Type
RequiredDescription
alt_textstringYesFallback text displayed in push previews and on unsupported devices. Max 400 characters.
columnsarray of objectsYesArray of image columns (1–10 supported). Each column includes an image.
image_urlstringYesURL to the image shown in each carousel column pointing to a publicly accessible JPEG or PNG file. Must use HTTPS.
{
"request": {
"application": "XXXXXX-XXXXXX",
"auth": "**************************************",
"notifications": [
{
"content": "test",
"send_date": "now",
"devices": [
"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
],
"preset": "preset_code",
"template": {
"en": {
"image_carousel": {
"alt_text": "some text",
"columns": [
{ "image_url": "https://images.com/1.jpg" },
{ "image_url": "https://images.com/2.jpg" },
{ "image_url": "https://images.com/3.jpg" }
]
}
}
}
}
]
}
}

Flex Messages are powerful, customizable message types that allow you to create structured layouts using text, images, buttons, and other components. They are ideal for use cases such as receipts, product cards, menus, or any content that benefits from visual structuring.

To send a Flex Message, include a template object with a raw payload inside your request. The message layout must follow the LINE Flex Message specification.

Tip: You can design and preview Flex Messages using the LINE Flex Message Simulator.

Parameter
Type
RequiredDescription
applicationstringYesPushwoosh application code
authstringYesAPI access token used to authenticate the request.
notificationsarray of objectsYesList of messages to send.
contentstringYesUsed as fallback or preview text for the message.
Note: If both content and template are set, the template is used.
If both preset and content are included, the content from the request overrides the preset.
send_datestringYesWhen to send the message. Use "now" or YYYY-MM-DD HH:mm format.
devicesarray of stringsYesList of LINE device tokens (user IDs) to receive the message.
presetstringNoCode of the LINE preset you created in the Pushwoosh Control Panel.
Note: If both preset and template are included, the template overrides the preset.
If both preset and content are included, the content from the request overrides the preset.
templateobjectYesMessage layout template. Supports multiple message types. See details below.

For a Flex Message, use the raw structure.
Type: raw (Flex)

Parameter
Type
RequiredDescription
alt_textstringYesFallback text shown in notifications, chat previews, and quotes. Max 400 characters.
contentobjectYesFlex Message layout, structured using bubble, box, text, and other components as per LINE’s Flex specification.
{
"request": {
"application": "XXXXXX-XXXXXX",
"auth": "**************************************",
"notifications": [
{
"content": "test",
"send_date": "now",
"devices": ["XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"],
"preset": "preset_code",
"template": {
"en": {
"raw": {
"alt_text": "My raw template",
"content": {
"type": "bubble",
"body": {
"type": "box",
"layout": "vertical",
"contents": [
{
"type": "text",
"text": "RECEIPT",
"weight": "bold",
"color": "#1DB446",
"size": "sm"
}
// Additional components...
]
}
}
}
}
}
}
]
}
}