---
title: Line Messaging Api
slug: connectors/line-messaging-api
docTags: 
createdAt: 2026-06-09T16:29:35.437Z
---

The Line Messaging API connector enables communication with users on the Line platform through various messaging capabilities.

The Line Messaging API Connector for Swimlane Turbine provides a powerful suite of actions to enhance user engagement and streamline communication management within the Line platform. By integrating with Line's Messaging API, users can automate a variety of tasks such as sending messages, managing message delivery, and analyzing communication patterns. This connector empowers security teams to interact with Line users directly, monitor chat activities, and gather valuable insights—all within the Swimlane Turbine environment.

### Limitations

None to date.

### Supported Versions

This Line Messaging API connector uses the latest Version API.

### Additional Docs

- [Line Messaging API API Documentation Link](https://developers.line.biz/en/reference/messaging-api/#messages)

## Configuration

### Prerequisites

To utilize the Line Messaging API connector with Swimlane Turbine, ensure you have the following prerequisites:

- OAuth 2.0 client credentials for secure authentication:
  - URL: Endpoint URL for the Line Messaging API.
  - Client ID: Unique identifier for your application to authenticate with Line.
  - Client Secret: A secret key provided by Line for authenticating your application.
  - Token URL: URL to retrieve the OAuth token from Line.

## Authentication Methods

### OAuth2 Password Credentials with the following parameters:

- URL: The endpoint URL for the Line Messaging API API.
- Token URL: Your Line Messaging API Token URL.
- Client Secret: The Client Secret associated with your Line Messaging API account.
- Client ID: The client identifier as registered in Line Messaging API for OAuth authentication.

## Capabilities

This Line Messaging API connector provides the following capabilities:

- Display a Loading Animation
- Get Narrowcast Message Status
- Get Number of Messages Sent this Month
- Get Number of Sent Broadcast Messages
- Get Number of Sent Multicast Messages
- Get Number of Sent Push Messages
- Get Number of Sent Reply Messages
- Get the Target Limit For Sending Messages This Month
- Send Broadcast Message
- Send Multicast Message
- Send Narrowcast Message
- Send Push Message
- Send Reply Message
- Validate Message Objects of a Broadcast Message
- Validate Message Objects of a Multicast Message
  *... and so on*

### Display a Loading Animation

Display a loading animation in one-on-one chats between users and LINE Official Accounts.

Line Messaging API's documentation for this action can be found [here](https://developers.line.biz/en/reference/messaging-api/#display-a-loading-indicator).

### Get Narrowcast Message Status

Retrieve the status of a narrowcast message sent to a specific audience.

Line Messaging API's documentation for this action can be found [here](https://developers.line.biz/en/reference/messaging-api/#get-narrowcast-progress-status).

### Get Number of Messages Sent This Month

Get the total number of messages sent from your LINE Official Account in the current month.

Line Messaging API's documentation for this action can be found [here](https://developers.line.biz/en/reference/messaging-api/#get-consumption).

### Get Number of Sent Reply Messages

Retrieve the number of reply messages sent from your LINE Official Account.

Line Messaging API's documentation for this action can be found [here](https://developers.line.biz/en/reference/messaging-api/#get-number-of-reply-messages).

### Get the Target Limit for Sending Messages This Month

Get the target limit for the number of messages that can be sent from your LINE Official Account in the current month.

Line Messaging API's documentation for this action can be found [here](https://developers.line.biz/en/reference/messaging-api/#get-quota).

### Send Broadcast Message

Send a broadcast message to all users who have added your LINE Official Account.

Line Messaging API's documentation for this action can be found [here](https://developers.line.biz/en/reference/messaging-api/#send-broadcast-message).

### Send Multicast Message

Send a multicast message to multiple users at once.

Line Messaging API's documentation for this action can be found [here](https://developers.line.biz/en/reference/messaging-api/#send-multicast-message).

### Send Narrowcast Message

Send a narrowcast message to a specific audience based on demographic filters.

Line Messaging API's documentation for this action can be found [here](https://developers.line.biz/en/reference/messaging-api/#send-narrowcast-message).

### Send Push Message

Send a push message to a specific user.

Line Messaging API's documentation for this action can be found [here](https://developers.line.biz/en/reference/messaging-api/#send-push-message).

### Send Reply Message

Send a reply message in response to an event.

Line Messaging API's documentation for this action can be found [here](https://developers.line.biz/en/reference/messaging-api/#send-reply-message).

# Configurations

## LINE OAuth 2.0 Client Credentials

Authenticates using oauth 2.0 client credentials

### Configuration Parameters

| **Parameter**  | **Description**                    | **Type** | **Required** |
| -------------- | ---------------------------------- | -------- | ------------ |
| url            | A URL to the target host.          | string   | Required     |
| token\_url     |                                    | string   | Required     |
| client\_id     | The client ID                      | string   | Required     |
| client\_secret | The client secret.                 | string   | Required     |
| verify\_ssl    | Verify SSL certificate             | boolean  | Optional     |
| http\_proxy    | A proxy to route requests through. | string   | Optional     |

# Actions

## Display a Loading Animation

Displays a loading animation in direct chats with LINE Official Accounts using the provided chatId.

### Endpoint

- **URL:** `v2/bot/chat/loading/start`
- **Method:** `POST`

### Input

| **Argument Name** | **Type** | **Required** | **Description**                                                                                                                  |
| ----------------- | -------- | ------------ | -------------------------------------------------------------------------------------------------------------------------------- |
| `chatId`          | string   | Optional     | User ID of the target user for whom the loading animation is to be displayed.                                                    |
| `loadingSeconds`  | number   | Optional     | Number of seconds to display a loading animation. You can specify a any one of 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, or 60. |

### Input Example

`{"json_body":{"chatId":"U4af4980629","loadingSeconds":5}}`

### Output

| **Parameter** | **Type** | **Description**                  |
| ------------- | -------- | -------------------------------- |
| `status_code` | number   | HTTP status code of the response |
| `reason`      | string   | Response reason phrase           |

### Output Example

`{"status_code":200,"response_headers":{"Server":"legy","Content-Type":"application/json","x-content-type-options":"nosniff","x-frame-options":"DENY","x-line-request-id":"900e2954-b41a-4dc9-87f7-f7782d73368e","x-xss-protection":"1; mode=block","Content-Length":"16","Expires":"Mon, 03 Feb 2025 09:51:53 GMT","Cache-Control":"max-age=0, no-cache, no-store","Pragma":"no-cache","Date":"Mon, 03 Feb 2025 09:51:53 GMT","Connection":"keep-alive"},"reason":"OK","json_body":{}}`

## Get Narrowcast Message Status

Retrieves the delivery status of a narrowcast message sent through Line Messaging API using a specific requestId.

### Endpoint

- **URL:** `v2/bot/message/progress/narrowcast`
- **Method:** `GET`

### Input

| **Argument Name**      | **Type** | **Required** | **Description**                                                                                                    |
| ---------------------- | -------- | ------------ | ------------------------------------------------------------------------------------------------------------------ |
| `parameters.requestId` | string   | Required     | The narrowcast message's request ID. Each Messaging API request has a request ID. Find it in the response headers. |

### Input Example

`{"parameters":{"requestId":"f4f3b2b1-2f4e-4f3b-2b1-2f4e4f3b2b1"}}`

### Output

| **Parameter** | **Type** | **Description**                  |
| ------------- | -------- | -------------------------------- |
| `status_code` | number   | HTTP status code of the response |
| `reason`      | string   | Response reason phrase           |
| `message`     | string   | Response message                 |

### Output Example

`{"status_code":200,"response_headers":{"Server":"legy","Content-Type":"application/json","x-content-type-options":"nosniff","x-frame-options":"DENY","x-line-request-id":"900e2954-b41a-4dc9-87f7-f7782d73368e","x-xss-protection":"1; mode=block","Content-Length":"16","Expires":"Mon, 03 Feb 2025 09:51:53 GMT","Cache-Control":"max-age=0, no-cache, no-store","Pragma":"no-cache","Date":"Mon, 03 Feb 2025 09:51:53 GMT","Connection":"keep-alive"},"reason":"OK","json_body":{"message":"Not found"}}`

## Get Number of Messages Sent this Month

Retrieve the total count of messages sent in the current month via Line Messaging API.

### Endpoint

- **URL:** `v2/bot/message/quota/consumption`
- **Method:** `GET`

### Output

| **Parameter** | **Type** | **Description**                  |
| ------------- | -------- | -------------------------------- |
| `status_code` | number   | HTTP status code of the response |
| `reason`      | string   | Response reason phrase           |
| `totalUsage`  | number   | Output field: totalUsage         |

### Output Example

`{"status_code":200,"response_headers":{"Server":"legy","Content-Type":"application/json","x-content-type-options":"nosniff","x-frame-options":"DENY","x-line-request-id":"900e2954-b41a-4dc9-87f7-f7782d73368e","x-xss-protection":"1; mode=block","Content-Length":"16","Expires":"Mon, 03 Feb 2025 09:51:53 GMT","Cache-Control":"max-age=0, no-cache, no-store","Pragma":"no-cache","Date":"Mon, 03 Feb 2025 09:51:53 GMT","Connection":"keep-alive"},"reason":"OK","json_body":{"totalUsage":0}}`

## Get Number of Sent Broadcast Messages

Retrieves the count of messages sent using the Line Messaging API's broadcast endpoint on a specified date.

### Endpoint

- **URL:** `v2/bot/message/delivery/broadcast`
- **Method:** `GET`

### Input

| **Argument Name** | **Type** | **Required** | **Description**                                                                 |
| ----------------- | -------- | ------------ | ------------------------------------------------------------------------------- |
| `parameters.date` | string   | Required     | Date the messages were sent. Format- yyyyMMdd (e.g. 20191231), Timezone- UTC+9. |

### Input Example

`{"parameters":{"date":"20250205"}}`

### Output

| **Parameter** | **Type** | **Description**                      |
| ------------- | -------- | ------------------------------------ |
| `status_code` | number   | HTTP status code of the response     |
| `reason`      | string   | Response reason phrase               |
| `status`      | string   | Status value                         |
| `success`     | number   | Whether the operation was successful |

### Output Example

`{"status_code":200,"response_headers":{"Server":"legy","Content-Type":"application/json","x-content-type-options":"nosniff","x-frame-options":"DENY","x-line-request-id":"d84edc66-4ebe-438f-bcb4-0e1586464499","x-xss-protection":"1; mode=block","Content-Length":"30","Expires":"Wed, 12 Feb 2025 06:30:06 GMT","Cache-Control":"max-age=0, no-cache, no-store","Pragma":"no-cache","Date":"Wed, 12 Feb 2025 06:30:06 GMT","Connection":"keep-alive"},"reason":"OK","json_body":{"status":"ready","success":0}}`

## Get Number of Sent Multicast Messages

Retrieves the count of messages sent using the Line Messaging API's multicast endpoint on a specified date.

### Endpoint

- **URL:** `v2/bot/message/delivery/multicast`
- **Method:** `GET`

### Input

| **Argument Name** | **Type** | **Required** | **Description**                                                                 |
| ----------------- | -------- | ------------ | ------------------------------------------------------------------------------- |
| `parameters.date` | string   | Required     | Date the messages were sent. Format- yyyyMMdd (e.g. 20191231), Timezone- UTC+9. |

### Input Example

`{"parameters":{"date":"20240105"}}`

### Output

| **Parameter** | **Type** | **Description**                      |
| ------------- | -------- | ------------------------------------ |
| `status_code` | number   | HTTP status code of the response     |
| `reason`      | string   | Response reason phrase               |
| `status`      | string   | Status value                         |
| `success`     | number   | Whether the operation was successful |

### Output Example

`{"status_code":200,"response_headers":{"Server":"legy","Content-Type":"application/json","x-content-type-options":"nosniff","x-frame-options":"DENY","x-line-request-id":"83c791c5-7780-4ae5-bd30-7e5d2c15a26a","x-xss-protection":"1; mode=block","Content-Length":"30","Expires":"Wed, 12 Feb 2025 06:16:59 GMT","Cache-Control":"max-age=0, no-cache, no-store","Pragma":"no-cache","Date":"Wed, 12 Feb 2025 06:16:59 GMT","Connection":"keep-alive"},"reason":"OK","json_body":{"status":"ready","success":0}}`

## Get Number of Sent Push Messages

Retrieves the count of messages sent using the /bot/message/push endpoint on a specified date.

### Endpoint

- **URL:** `v2/bot/message/delivery/push`
- **Method:** `GET`

### Input

| **Argument Name** | **Type** | **Required** | **Description**                                                                 |
| ----------------- | -------- | ------------ | ------------------------------------------------------------------------------- |
| `parameters.date` | string   | Required     | Date the messages were sent. Format- yyyyMMdd (e.g. 20191231), Timezone- UTC+9. |

### Input Example

`{"parameters":{"date":"20240105"}}`

### Output

| **Parameter** | **Type** | **Description**                      |
| ------------- | -------- | ------------------------------------ |
| `status_code` | number   | HTTP status code of the response     |
| `reason`      | string   | Response reason phrase               |
| `status`      | string   | Status value                         |
| `success`     | number   | Whether the operation was successful |

### Output Example

`{"status_code":200,"response_headers":{"Server":"legy","Content-Type":"application/json","x-content-type-options":"nosniff","x-frame-options":"DENY","x-line-request-id":"11de3c6d-3882-4b86-baeb-2c99891b3aa0","x-xss-protection":"1; mode=block","Content-Length":"30","Expires":"Wed, 12 Feb 2025 06:13:12 GMT","Cache-Control":"max-age=0, no-cache, no-store","Pragma":"no-cache","Date":"Wed, 12 Feb 2025 06:13:12 GMT","Connection":"keep-alive"},"reason":"OK","json_body":{"status":"ready","success":0}}`

## Get Number of Sent Reply Messages

Retrieves the count of reply messages sent via Line Messaging API on a specified date, requiring the 'date' parameter.

### Endpoint

- **URL:** `v2/bot/message/delivery/reply`
- **Method:** `GET`

### Input

| **Argument Name** | **Type** | **Required** | **Description**                                                                 |
| ----------------- | -------- | ------------ | ------------------------------------------------------------------------------- |
| `parameters.date` | string   | Required     | Date the messages were sent. Format- yyyyMMdd (e.g. 20191231), Timezone- UTC+9. |

### Input Example

`{"parameters":{"date":"20250131"}}`

### Output

| **Parameter** | **Type** | **Description**                      |
| ------------- | -------- | ------------------------------------ |
| `status_code` | number   | HTTP status code of the response     |
| `reason`      | string   | Response reason phrase               |
| `status`      | string   | Status value                         |
| `success`     | number   | Whether the operation was successful |

### Output Example

`{"status_code":200,"response_headers":{"Server":"legy","Content-Type":"application/json","x-content-type-options":"nosniff","x-frame-options":"DENY","x-line-request-id":"c1e87e66-b43a-4fa4-a672-3230e2ed059b","x-xss-protection":"1; mode=block","Content-Length":"30","Expires":"Mon, 03 Feb 2025 09:54:51 GMT","Cache-Control":"max-age=0, no-cache, no-store","Pragma":"no-cache","Date":"Mon, 03 Feb 2025 09:54:51 GMT","Connection":"keep-alive"},"reason":"OK","json_body":{"status":"ready","success":0}}`

## Get the Target Limit for Messages this Month

Retrieve the current month's messaging limits, including free and additional message counts, from Line Messaging API.

### Endpoint

- **URL:** `v2/bot/message/quota`
- **Method:** `GET`

### Output

| **Parameter** | **Type** | **Description**                  |
| ------------- | -------- | -------------------------------- |
| `status_code` | number   | HTTP status code of the response |
| `reason`      | string   | Response reason phrase           |
| `type`        | string   | Type of the resource             |
| `value`       | number   | Value for the parameter          |

### Output Example

`{"status_code":200,"response_headers":{"Server":"legy","Content-Type":"application/json","x-content-type-options":"nosniff","x-frame-options":"DENY","x-line-request-id":"0df9d9c5-f7df-4650-bf5a-75fc210fc7d7","x-xss-protection":"1; mode=block","Content-Length":"30","Expires":"Mon, 03 Feb 2025 09:51:06 GMT","Cache-Control":"max-age=0, no-cache, no-store","Pragma":"no-cache","Date":"Mon, 03 Feb 2025 09:51:06 GMT","Connection":"keep-alive"},"reason":"OK","json_body":{"type":"limited","value":500}}`

## Send Broadcast Message

Sends a broadcast message to all friends of the LINE Official Account using specified recipient and message details.

### Endpoint

- **URL:** `v2/bot/message/broadcast`
- **Method:** `POST`

### Input

| **Argument Name**          | **Type** | **Required** | **Description**                                                                                                           |
| -------------------------- | -------- | ------------ | ------------------------------------------------------------------------------------------------------------------------- |
| `headers`                  | object   | Optional     | HTTP headers for the request                                                                                              |
| `headers.X-Line-Retry-Key` | string   | Required     | UUID                                                                                                                      |
| `to`                       | string   | Optional     | ID of the target recipient. Use a userId, groupId, or roomId value returned in a webhook event object.                    |
| `messages`                 | array    | Optional     | Messages to send. By using the Validate message objects of a push message endpoint, you can validate the message objects. |
| `messages.type`            | string   | Optional     | Type of message to send.                                                                                                  |
| `messages.text`            | string   | Optional     | Message text.                                                                                                             |
| `notificationDisabled`     | boolean  | Optional     | The user doesn't receive a push notification when the message is sent if set to true.                                     |
| `customAggregationUnits`   | array    | Optional     | Name of aggregation unit.                                                                                                 |

### Input Example

`{"json_body":{"to":"U4af4980629...","messages":[{"type":"text","text":"Hello, world1"},{"type":"text","text":"Hello, world2"}],"notificationDisabled":false,"customAggregationUnits":["Promotion_a"]},"headers":{"X-Line-Retry-Key":"900e2954-b41a-4dc9-87f7-f7782d73368e"}}`

### Output

| **Parameter** | **Type** | **Description**                  |
| ------------- | -------- | -------------------------------- |
| `status_code` | number   | HTTP status code of the response |
| `reason`      | string   | Response reason phrase           |

### Output Example

`{"status_code":200,"response_headers":{"Server":"legy","Content-Type":"application/json","x-content-type-options":"nosniff","x-frame-options":"DENY","x-line-request-id":"900e2954-b41a-4dc9-87f7-f7782d73368e","x-xss-protection":"1; mode=block","Content-Length":"16","Expires":"Mon, 03 Feb 2025 09:51:53 GMT","Cache-Control":"max-age=0, no-cache, no-store","Pragma":"no-cache","Date":"Mon, 03 Feb 2025 09:51:53 GMT","Connection":"keep-alive"},"reason":"OK","json_body":{}}`

## Send Multicast Message

Efficiently sends identical messages to multiple users on Line, requiring recipient IDs and message content.

### Endpoint

- **URL:** `v2/bot/message/multicast`
- **Method:** `POST`

### Input

| **Argument Name**          | **Type** | **Required** | **Description**                                                                                                           |
| -------------------------- | -------- | ------------ | ------------------------------------------------------------------------------------------------------------------------- |
| `headers`                  | object   | Optional     | HTTP headers for the request                                                                                              |
| `headers.X-Line-Retry-Key` | string   | Required     | UUID                                                                                                                      |
| `to`                       | string   | Optional     | ID of the target recipient. Use a userId, groupId, or roomId value returned in a webhook event object.                    |
| `messages`                 | array    | Optional     | Messages to send. By using the Validate message objects of a push message endpoint, you can validate the message objects. |
| `messages.type`            | string   | Optional     | Type of message to send.                                                                                                  |
| `messages.text`            | string   | Optional     | Message text.                                                                                                             |
| `notificationDisabled`     | boolean  | Optional     | The user doesn't receive a push notification when the message is sent if set to true.                                     |
| `customAggregationUnits`   | array    | Optional     | Name of aggregation unit.                                                                                                 |

### Input Example

`{"json_body":{"to":"U4af4980629...","messages":[{"type":"text","text":"Hello, world1"},{"type":"text","text":"Hello, world2"}],"notificationDisabled":false,"customAggregationUnits":["Promotion_a"]},"headers":{"X-Line-Retry-Key":"900e2954-b41a-4dc9-87f7-f7782d73368e"}}`

### Output

| **Parameter** | **Type** | **Description**                  |
| ------------- | -------- | -------------------------------- |
| `status_code` | number   | HTTP status code of the response |
| `reason`      | string   | Response reason phrase           |
| `message`     | string   | Response message                 |

### Output Example

`{"status_code":200,"response_headers":{"Server":"legy","Content-Type":"application/json","x-content-type-options":"nosniff","x-frame-options":"DENY","x-line-request-id":"900e2954-b41a-4dc9-87f7-f7782d73368e","x-xss-protection":"1; mode=block","Content-Length":"16","Expires":"Mon, 03 Feb 2025 09:51:53 GMT","Cache-Control":"max-age=0, no-cache, no-store","Pragma":"no-cache","Date":"Mon, 03 Feb 2025 09:51:53 GMT","Connection":"keep-alive"},"reason":"OK","json_body":{"message":"The property, to[1], ...`

## Send Narrowcast Message

Send targeted messages to specific Line users based on attributes such as age, gender, OS, and region, or utilize retargeting audiences.

### Endpoint

- **URL:** `v2/bot/message/narrowcast`
- **Method:** `POST`

### Input

| **Argument Name**                   | **Type** | **Required** | **Description**                                                                                                                                                 |
| ----------------------------------- | -------- | ------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `headers`                           | object   | Optional     | HTTP headers for the request                                                                                                                                    |
| `headers.X-Line-Retry-Key`          | string   | Required     | UUID                                                                                                                                                            |
| `messages`                          | array    | Optional     | Messages to send. By using the Validate message objects of a push message endpoint, you can validate the message objects.                                       |
| `messages.type`                     | string   | Optional     | Type of message to send.                                                                                                                                        |
| `messages.text`                     | string   | Optional     | Message text.                                                                                                                                                   |
| `recipient`                         | object   | Optional     | Parameter for Send Narrowcast Message                                                                                                                           |
| `recipient.type`                    | string   | Required     | Type.                                                                                                                                                           |
| `recipient.and`                     | array    | Optional     | Create a new recipient object by taking the logical conjunction (AND) of the specified array of recipient objects.                                              |
| `recipient.and.type`                | string   | Required     | Type of the resource                                                                                                                                            |
| `recipient.and.audienceGroupId`     | number   | Required     | The audience ID. Create audiences with the manage audience API.                                                                                                 |
| `recipient.and.not`                 | object   | Optional     | Parameter for Send Narrowcast Message                                                                                                                           |
| `recipient.and.not.type`            | string   | Required     | Type.                                                                                                                                                           |
| `recipient.and.not.audienceGroupId` | number   | Optional     | The audience ID. Create audiences with the manage audience API.                                                                                                 |
| `filter`                            | object   | Optional     | Parameter for Send Narrowcast Message                                                                                                                           |
| `filter.demographic`                | object   | Optional     | Demographic filter objects represent criteria (e.g. age, gender, OS, region, and friendship duration) on which to filter the list of recipients                 |
| `filter.demographic.type`           | string   | Optional     | Type.                                                                                                                                                           |
| `filter.demographic.or`             | array    | Optional     | Parameter for Send Narrowcast Message                                                                                                                           |
| `filter.demographic.or.type`        | string   | Optional     | Type.                                                                                                                                                           |
| `filter.demographic.or.and`         | array    | Optional     | This lets you filter recipients with a given age range..                                                                                                        |
| `filter.demographic.or.and.type`    | string   | Required     | Type.                                                                                                                                                           |
| `filter.demographic.or.and.gte`     | string   | Optional     | Send messages to users at least as old as the specified age.                                                                                                    |
| `filter.demographic.or.and.lt`      | string   | Optional     | Send messages to users younger than the specified age.                                                                                                          |
| `filter.demographic.or.and.not`     | object   | Optional     | Create a new demographic filter object that excludes the specified array of demographic filter objects.                                                         |
| `limit`                             | object   | Optional     | You can set a limit on the maximum number of narrowcast messages that can be sent.                                                                              |
| `limit.max`                         | number   | Optional     | The maximum number of narrowcast messages to send. Use this parameter to limit the number of narrowcast messages sent. The recipients will be chosen at random. |

### Input Example

`{"json_body":{"messages":[{"type":"text","text":"test message"}],"recipient":{"type":"operator","and":[{"type":"audience","audienceGroupId":5614991017776},{"type":"operator","not":{"type":"audience","audienceGroupId":4389303728991}}]},"filter":{"demographic":{"type":"operator","or":[{"type":"operator","and":[{"type":"gender","oneOf":["male","female"]},{"type":"age","gte":"age_20","lt":"age_25"},{"type":"appType","oneOf":["android","ios"]},{"type":"area","oneOf":["jp_23","jp_05"]},{"type":"subscriptionPeriod","gte":"day_7","lt":"day_30"}]},{"type":"operator","and":[{"type":"age","gte":"age_35","lt":"age_40"},{"type":"operator","not":{"type":"gender","oneOf":["male"]}}]}]}},"limit":{"max":100,"upToRemainingQuota":true}},"headers":{"X-Line-Retry-Key":"900e2954-b41a-4dc9-87f7-f7782d73368e"}}`

### Output

| **Parameter** | **Type** | **Description**                  |
| ------------- | -------- | -------------------------------- |
| `status_code` | number   | HTTP status code of the response |
| `reason`      | string   | Response reason phrase           |
| `message`     | string   | Response message                 |

### Output Example

`{"status_code":200,"response_headers":{"Server":"legy","Content-Type":"application/json","x-content-type-options":"nosniff","x-frame-options":"DENY","x-line-request-id":"900e2954-b41a-4dc9-87f7-f7782d73368e","x-xss-protection":"1; mode=block","Content-Length":"16","Expires":"Mon, 03 Feb 2025 09:51:53 GMT","Cache-Control":"max-age=0, no-cache, no-store","Pragma":"no-cache","Date":"Mon, 03 Feb 2025 09:51:53 GMT","Connection":"keep-alive"},"reason":"OK","json_body":{"message":"Invalid audience grou...`

## Send Push Message

Sends a direct message to a Line user, group, or multi-person chat without user interaction, requiring 'to' and 'messages' parameters.

### Endpoint

- **URL:** `v2/bot/message/push`
- **Method:** `POST`

### Input

| **Argument Name**          | **Type** | **Required** | **Description**                                                                                                           |
| -------------------------- | -------- | ------------ | ------------------------------------------------------------------------------------------------------------------------- |
| `headers`                  | object   | Optional     | HTTP headers for the request                                                                                              |
| `headers.X-Line-Retry-Key` | string   | Required     | UUID                                                                                                                      |
| `to`                       | string   | Optional     | ID of the target recipient. Use a userId, groupId, or roomId value returned in a webhook event object.                    |
| `messages`                 | array    | Optional     | Messages to send. By using the Validate message objects of a push message endpoint, you can validate the message objects. |
| `messages.type`            | string   | Optional     | Type of message to send.                                                                                                  |
| `messages.text`            | string   | Optional     | Message text.                                                                                                             |
| `notificationDisabled`     | boolean  | Optional     | The user doesn't receive a push notification when the message is sent if set to true.                                     |
| `customAggregationUnits`   | array    | Optional     | Name of aggregation unit.                                                                                                 |

### Input Example

`{"json_body":{"to":"U4af4980629...","messages":[{"type":"text","text":"Hello, world1"},{"type":"text","text":"Hello, world2"}],"notificationDisabled":false,"customAggregationUnits":["Promotion_a"]},"headers":{"X-Line-Retry-Key":"900e2954-b41a-4dc9-87f7-f7782d73368e"}}`

### Output

| **Parameter**             | **Type** | **Description**                  |
| ------------------------- | -------- | -------------------------------- |
| `status_code`             | number   | HTTP status code of the response |
| `reason`                  | string   | Response reason phrase           |
| `sentMessages`            | array    | Response message                 |
| `sentMessages.id`         | string   | Unique identifier                |
| `sentMessages.quoteToken` | string   | Response message                 |

### Output Example

`{"status_code":200,"response_headers":{"Server":"legy","Content-Type":"application/json","x-content-type-options":"nosniff","x-frame-options":"DENY","x-line-request-id":"900e2954-b41a-4dc9-87f7-f7782d73368e","x-xss-protection":"1; mode=block","Content-Length":"16","Expires":"Mon, 03 Feb 2025 09:51:53 GMT","Cache-Control":"max-age=0, no-cache, no-store","Pragma":"no-cache","Date":"Mon, 03 Feb 2025 09:51:53 GMT","Connection":"keep-alive"},"reason":"OK","json_body":{"sentMessages":[{}]}}`

## Send Reply Message

Sends a custom response to events in Line chats using a replyToken and predefined messages.

### Endpoint

- **URL:** `v2/bot/message/reply`
- **Method:** `POST`

### Input

| **Argument Name**          | **Type** | **Required** | **Description**                                                                                          |
| -------------------------- | -------- | ------------ | -------------------------------------------------------------------------------------------------------- |
| `headers`                  | object   | Optional     | HTTP headers for the request                                                                             |
| `headers.X-Line-Retry-Key` | string   | Required     | UUID                                                                                                     |
| `replyToken`               | string   | Optional     | Reply token received via webhook.                                                                        |
| `notificationDisabled`     | boolean  | Optional     | The user doesn't receive a push notification when the message is sent if set to true.                    |
| `messages`                 | array    | Optional     | By using the Validate message objects of a reply message endpoint, you can validate the message objects. |
| `messages.type`            | string   | Optional     | Type of the resource                                                                                     |
| `messages.text`            | string   | Optional     | Response message                                                                                         |

### Input Example

`{"json_body":{"replyToken":"nHuyWiB7yP5Zw52FIkcQobQuGDXCTA","messages":[{"type":"text","text":"Hello, user"},{"type":"text","text":"May I help you?"}]},"headers":{"X-Line-Retry-Key":"900e2954-b41a-4dc9-87f7-f7782d73368e"}}`

### Output

| **Parameter**             | **Type** | **Description**                  |
| ------------------------- | -------- | -------------------------------- |
| `status_code`             | number   | HTTP status code of the response |
| `reason`                  | string   | Response reason phrase           |
| `sentMessages`            | array    | Response message                 |
| `sentMessages.id`         | string   | Unique identifier                |
| `sentMessages.quoteToken` | string   | Response message                 |

### Output Example

`{"status_code":200,"response_headers":{"Server":"legy","Content-Type":"application/json","x-content-type-options":"nosniff","x-frame-options":"DENY","x-line-request-id":"900e2954-b41a-4dc9-87f7-f7782d73368e","x-xss-protection":"1; mode=block","Content-Length":"16","Expires":"Mon, 03 Feb 2025 09:51:53 GMT","Cache-Control":"max-age=0, no-cache, no-store","Pragma":"no-cache","Date":"Mon, 03 Feb 2025 09:51:53 GMT","Connection":"keep-alive"},"reason":"OK","json_body":{"sentMessages":[{}]}}`

## Validate Message Objects of a Broadcast Message

Validates an array of message objects for the 'Send broadcast message' endpoint in Line Messaging API, excluding property values other than 'messages'.

### Endpoint

- **URL:** `v2/bot/message/validate/broadcast`
- **Method:** `POST`

### Input

| **Argument Name** | **Type** | **Required** | **Description**                       |
| ----------------- | -------- | ------------ | ------------------------------------- |
| `messages`        | array    | Optional     | Array of message objects to validate. |
| `messages.type`   | string   | Required     | Type of the resource                  |
| `messages.text`   | string   | Required     | Response message                      |

### Input Example

`{"json_body":{"messages":[{"type":"text","text":"Hello, world"}]}}`

### Output

| **Parameter** | **Type** | **Description**                  |
| ------------- | -------- | -------------------------------- |
| `status_code` | number   | HTTP status code of the response |
| `reason`      | string   | Response reason phrase           |

### Output Example

`{"status_code":200,"response_headers":{"Server":"legy","Content-Type":"application/json","x-content-type-options":"nosniff","x-frame-options":"DENY","x-line-request-id":"7c147a0a-a35e-4ca1-ada2-2cac14826023","x-xss-protection":"1; mode=block","Content-Length":"2","Expires":"Wed, 12 Feb 2025 06:39:55 GMT","Cache-Control":"max-age=0, no-cache, no-store","Pragma":"no-cache","Date":"Wed, 12 Feb 2025 06:39:55 GMT","Connection":"keep-alive"},"reason":"OK","json_body":{}}`

## Validate Message Objects of a Multicast Message

Validates an array of message objects for the 'messages' property in a multicast message request to ensure compliance with Line Messaging API.

### Endpoint

- **URL:** `v2/bot/message/validate/multicast`
- **Method:** `POST`

### Input

| **Argument Name** | **Type** | **Required** | **Description**                       |
| ----------------- | -------- | ------------ | ------------------------------------- |
| `messages`        | array    | Optional     | Array of message objects to validate. |
| `messages.type`   | string   | Required     | Type of the resource                  |
| `messages.text`   | string   | Required     | Response message                      |

### Input Example

`{"json_body":{"messages":[{"type":"text","text":"Hello, world"}]}}`

### Output

| **Parameter** | **Type** | **Description**                  |
| ------------- | -------- | -------------------------------- |
| `status_code` | number   | HTTP status code of the response |
| `reason`      | string   | Response reason phrase           |

### Output Example

`{"status_code":200,"response_headers":{"Server":"legy","Content-Type":"application/json","x-content-type-options":"nosniff","x-frame-options":"DENY","x-line-request-id":"9d28f8e6-1474-4a29-b7fb-da7e0584fad4","x-xss-protection":"1; mode=block","Content-Length":"2","Expires":"Wed, 12 Feb 2025 06:38:01 GMT","Cache-Control":"max-age=0, no-cache, no-store","Pragma":"no-cache","Date":"Wed, 12 Feb 2025 06:38:01 GMT","Connection":"keep-alive"},"reason":"OK","json_body":{}}`

## Validate Message Objects of a Narrowcast Message

Validates an array of message objects for the 'Send narrowcast message' endpoint in Line Messaging API, excluding property values outside 'messages'.

### Endpoint

- **URL:** `/v2/bot/message/validate/narrowcast`
- **Method:** `POST`

### Input

| **Argument Name** | **Type** | **Required** | **Description**                       |
| ----------------- | -------- | ------------ | ------------------------------------- |
| `messages`        | array    | Optional     | Array of message objects to validate. |
| `messages.type`   | string   | Required     | Type of the resource                  |
| `messages.text`   | string   | Required     | Response message                      |

### Input Example

`{"json_body":{"messages":[{"type":"text","text":"Hello, world"}]}}`

### Output

| **Parameter** | **Type** | **Description**                  |
| ------------- | -------- | -------------------------------- |
| `status_code` | number   | HTTP status code of the response |
| `reason`      | string   | Response reason phrase           |

### Output Example

`{"status_code":200,"response_headers":{"Server":"legy","Content-Type":"application/json","x-content-type-options":"nosniff","x-frame-options":"DENY","x-line-request-id":"ee4bcd93-d4fa-482e-be9d-a23056afa4d2","x-xss-protection":"1; mode=block","Content-Length":"2","Expires":"Wed, 12 Feb 2025 06:41:52 GMT","Cache-Control":"max-age=0, no-cache, no-store","Pragma":"no-cache","Date":"Wed, 12 Feb 2025 06:41:52 GMT","Connection":"keep-alive"},"reason":"OK","json_body":{}}`

## Validate Message Objects of a Push Message

Validates an array of message objects for the 'messages' property in a push message request to ensure compliance with Line Messaging API.

### Endpoint

- **URL:** `v2/bot/message/validate/push`
- **Method:** `POST`

### Input

| **Argument Name** | **Type** | **Required** | **Description**                       |
| ----------------- | -------- | ------------ | ------------------------------------- |
| `messages`        | array    | Optional     | Array of message objects to validate. |
| `messages.type`   | string   | Required     | Type of the resource                  |
| `messages.text`   | string   | Required     | Response message                      |

### Input Example

`{"json_body":{"messages":[{"type":"text","text":"Hello, world"}]}}`

### Output

| **Parameter** | **Type** | **Description**                  |
| ------------- | -------- | -------------------------------- |
| `status_code` | number   | HTTP status code of the response |
| `reason`      | string   | Response reason phrase           |

### Output Example

`{"status_code":200,"response_headers":{"Server":"legy","Content-Type":"application/json","x-content-type-options":"nosniff","x-frame-options":"DENY","x-line-request-id":"df4c46a1-18dd-4a87-9e1f-22713bda80a4","x-xss-protection":"1; mode=block","Content-Length":"2","Expires":"Wed, 12 Feb 2025 06:35:25 GMT","Cache-Control":"max-age=0, no-cache, no-store","Pragma":"no-cache","Date":"Wed, 12 Feb 2025 06:35:25 GMT","Connection":"keep-alive"},"reason":"OK","json_body":{}}`

## Validate Message Objects of a Reply Message

Validates an array of message objects for the 'messages' property in a reply message request to ensure compatibility with the Line Messaging API.

### Endpoint

- **URL:** `v2/bot/message/validate/reply`
- **Method:** `POST`

### Input

| **Argument Name** | **Type** | **Required** | **Description**                       |
| ----------------- | -------- | ------------ | ------------------------------------- |
| `messages`        | array    | Optional     | Array of message objects to validate. |
| `messages.type`   | string   | Required     | Type of the resource                  |
| `messages.text`   | string   | Required     | Response message                      |

### Input Example

`{"json_body":{"messages":[{"type":"text","text":"Hello, world"}]}}`

### Output

| **Parameter** | **Type** | **Description**                  |
| ------------- | -------- | -------------------------------- |
| `status_code` | number   | HTTP status code of the response |
| `reason`      | string   | Response reason phrase           |

### Output Example

`{"status_code":200,"response_headers":{"Server":"legy","Content-Type":"application/json","x-content-type-options":"nosniff","x-frame-options":"DENY","x-line-request-id":"cc912291-63ef-4ab0-a04d-5b0bbccedfd7","x-xss-protection":"1; mode=block","Content-Length":"2","Expires":"Wed, 12 Feb 2025 06:32:39 GMT","Cache-Control":"max-age=0, no-cache, no-store","Pragma":"no-cache","Date":"Wed, 12 Feb 2025 06:32:39 GMT","Connection":"keep-alive"},"reason":"OK","json_body":{}}`

# Response Headers

| **Header**             | **Description**                                            | **Example**                          |
| ---------------------- | ---------------------------------------------------------- | ------------------------------------ |
| Cache-Control          | Directives for caching mechanisms                          | max-age=0, no-cache, no-store        |
| Connection             | HTTP response header: Connection                           | keep-alive                           |
| Content-Length         | The length of the response body in bytes                   | 2                                    |
| Content-Type           | The media type of the resource                             | application/json                     |
| Date                   | The date and time at which the message was originated      | Wed, 12 Feb 2025 06:16:59 GMT        |
| Expires                | The date/time after which the response is considered stale | Wed, 12 Feb 2025 06:13:12 GMT        |
| Pragma                 | HTTP response header: Pragma                               | no-cache                             |
| Server                 | Information about the software used by the origin server   | legy                                 |
| x-content-type-options | HTTP response header: x-content-type-options               | nosniff                              |
| x-frame-options        | HTTP response header: x-frame-options                      | DENY                                 |
| x-line-request-id      | HTTP response header: x-line-request-id                    | df4c46a1-18dd-4a87-9e1f-22713bda80a4 |
| x-xss-protection       | HTTP response header: x-xss-protection                     | 1; mode=block                        |
