The authority level for all audiences linked to a channel
PUBLIC
: The default authority level. Audiences will be available in channels other than the one where you created the audience. For example, it will be available in LINE Official Account Manager, LINE Ad Manager, and all channels the bot is linked to.PRIVATE
: Audiences will be available only in the channel where you created the audience.An array of audience data.
true when this is not the last page.
The current page number.
Of the audiences you can get with the specified condition, the number of audiences with the update permission set to READ_WRITE.
The number of audiences on the current page.
The total number of audiences that can be returned with the specified filter.
The audience ID. Create audiences with the manage audience API.
Length of audio file (milliseconds)
URL of audio file
The audience ID.
How the audience was created. If omitted, all audiences are included.
When the audience was created (in UNIX time).
The audience's name.
The value specified when creating an audience for uploading user IDs to indicate the type of accounts that will be given as recipients. One of:
Audience's update permission. Audiences linked to the same channel will be READ_WRITE.
Response body of get bot info.
Bot's basic ID
Bot's response mode set in the LINE Official Account Manager. One of:
Bot's display name
Automatic read setting for messages. If the bot's response mode is "Bot", auto is returned. If the response mode is "Chat", manual is returned.
Profile image URL. "https" image URL. Not included in the response if the bot doesn't have a profile image.
Bot's premium ID. Not included in the response if the premium ID isn't set.
Bot's user ID
Buttons template
Template with an image, title, text, and multiple action buttons.
Because of the height limitation for buttons template messages, the lower part of the text display area will get cut off if the height limitation is exceeded. For this reason, depending on the character width, the message text may not be fully displayed even when it is within the character limits.
Action when tapped
Action when image, title or text area is tapped.
Aspect ratio of the image. One of:
rectangle
: 1.51:1square
: 1:1Default: rectangle
Background color of the image. Specify a RGB color value. Default: #FFFFFF
(white)
Size of the image. One of:
cover
: The image fills the entire image area. Parts of the image that do not fit in the area are not displayed.contain
: The entire image is displayed in the image area. A background is displayed in the unused areas to the left and right of vertical images and in the areas above and below horizontal images.Default: cover
Message text
Image URL
Title
This action can be configured only with quick reply buttons. When a button associated with this action is tapped, the camera screen in LINE is opened.
Label for the action
This action can be configured only with quick reply buttons. When a button associated with this action is tapped, the camera roll screen in LINE is opened.
Label for the action
Carousel template
Template with multiple columns which can be cycled like a carousel. The columns are shown in order when scrolling horizontally.
Because of the height limitation for carousel template messages, the lower part of the text display area will get cut off if the height limitation is exceeded. For this reason, depending on the character width, the message text may not be fully displayed even when it is within the character limits.
Keep the number of actions consistent for all columns. If you use an image or title for a column, make sure to do the same for all other columns.
Array of columns
Aspect ratio of the image. One of:
rectangle
: 1.51:1square
: 1:1Applies to all columns. Default: rectangle
Size of the image. One of:
Applies to all columns. Default: cover.
Action when tapped
Action when image, title or text area is tapped.
Background color of the image. Specify a RGB color value. The default value is #FFFFFF
(white).
Message text
Image URL
Title
Confirm template
Template with two action buttons.
Because of the height limitation for confirm template messages, the lower part of the text display area will get cut off if the height limitation is exceeded. For this reason, depending on the character width, the message text may not be fully displayed even when it is within the character limits.
Array of action objects
Message text
The URL clicked by the user. If empty, users who clicked any URL in the message are added to the list of recipients.
The description to register for the job (in jobs[].description
).
When a control associated with this action is tapped, a postback event is returned via webhook with the date and time selected by the user from the date and time selection dialog. The datetime picker action does not support time zones.
String returned via webhook in the postback.data
property of the postback event
Initial value of date or time.
Label for the action
Largest date or time value that can be selected. Must be greater than the min
value.
Smallest date or time value that can be selected. Must be less than the max
value.
Action mode
Demographic filter objects
Demographic filter objects represent criteria (e.g. age, gender, OS, region, and friendship duration) on which to filter the list of recipients. You can filter recipients based on a combination of different criteria using logical operator objects.
ID for a LINE emoji inside a set. See LINE Available Emoji List: https://d.line-scdn.net/r/devcenter/sendable_line_emoji_list.pdf.
Index position for a character in text, with the first character being at position 0. The specified position must correspond to a $ character, which serves as a placeholder for the LINE emoji. If you specify a position that doesn't contain a $ character, the API returns HTTP 400 Bad request. See the text message example for details.
Product ID for a set of LINE emoji. See LINE Available Emoji List: https://d.line-scdn.net/r/devcenter/sendable_line_emoji_list.pdf.
Logical operator objects
Use logical AND, OR, and NOT operators to combine multiple recipient objects together.
Objects for the block style
Background color of the block. Use a hexadecimal color code.
true
to place a separator above the block.true
will be ignored for the first block in a container because you
cannot place a separator above the first block.false
.Color of the separator. Use a hexadecimal color code.
This is a component that defines the layout of child components. You can also include a box in a box.
This is a container that contains one message bubble. It can contain four blocks: header, hero, body, and footer.
The maximum size of JSON data that defines a bubble is 10 KB.
For more information about using each block, see Block.
Action performed when this image is tapped. Specify an action object. This property is supported on the following versions of LINE.
LINE for iOS and Android: 8.11.0 and later
Body block. Specify a Box.
Text directionality and the order of components in horizontal boxes in the container. Specify one of the following values:
ltr
: Left to rightrtl
: Right to leftThe default value is ltr
.
Footer block. Specify a Box.
Header block. Specify a Box.
Hero block. Specify a box or an image.
The size of the bubble. You can specify one of the following values: nano, micro, kilo, mega, or giga. The default value is mega.
Style of each block. Specify a bubble style.
This component draws a button.
When the user taps a button, a specified action is performed.
Carousel
A carousel is a container that contains multiple bubbles as child elements. Users can scroll horizontally through the bubbles.
The maximum size of JSON data that defines a carousel is 50 KB.
【Bubble width】
A carousel cannot contain bubbles of different widths (size property). Each bubble in a carousel should have the same width.
【Bubble height】
The body of each bubble will stretch to match the bubble with the greatest height in the carousel. However, bubbles with no body will not change height.
Bubbles in the carousel.
Components are objects that compose a Flex Message container. Here are the types of components available:
See the followings for the components' JSON data samples and usage.
A container is the top-level structure of a Flex Message. Here are the types of containers available.
See Flex Message elements for the containers' JSON data samples and usage.
This is an invisible component to fill extra space between components.
flex
property is fixed to 1.spacing
property of the parent box will be ignored for fillers.The ratio of the width or height of this component within the parent box. For more information, see Width and height of components.
This component draws an icon.
This component draws an image.
Flex Message
Flex Messages are messages with a customizable layout. You can customize the layout freely based on the specification for CSS Flexible Box (CSS Flexbox). For more information, see Sending Flex Messages in the API documentation.
Alternative text
Flex Message container
This component draws a separator between components in the parent box.
Color of the separator. Use a hexadecimal color code.
Minimum space between this box and the previous component in the parent box.
none
does not set a space while the other values set a space whose
size increases in the order of listing.spacing
property of the parent
box.margin
property will be ignored.This is an invisible component that places a fixed-size space at the beginning or end of the box.
Size of the space.
The size increases in the order of listing.
The default value is md
.
This component renders multiple text strings with different designs in one row. You can specify the color, size, weight, and decoration for the font. Span is set to contents
property in Text.
Font color. Use a hexadecimal color code.
Decoration of the text. Specify one of the following values:
none
: No decoration
underline
: Underline
line-through
: Strikethrough
The default value is none
.
Note: The decoration set in the decoration
property of the text cannot be overwritten by the decoration
property of the span.
Font size. You can specify one of the following values: xxs
, xs
, sm
, md
, lg
, xl
, xxl
, 3xl
, 4xl
, or 5xl
. The size increases in the order of listing. The default value is md
.
Style of the text. Specify one of the following values:
normal
: Normalitalic
: ItalicThe default value is normal
.
Text. If the wrap
property of the parent text is set to true
, you can use a new line character (\n
) to begin on a new line.
Font weight. You can specify one of the following values: regular
or bold
. Specifying bold
makes the font bold. The default value is regular
.
Percentage per age group
Percentage by OS
Percentage per area
true
if friend demographic information is available.
Percentage per gender
Percentage per friendship duration
How the audience was created. If omitted, all audiences are included.
OA_MANAGER
: Return only audiences created with LINE Official Account Manager.MESSAGING_API
: Return only audiences created with Messaging API.The name of the audience(s) to return. You can search for partial matches. This is case-insensitive, meaning AUDIENCE
and audience
are considered identical.
true
: Get public audiences created in all channels linked to the same bot.false
: Get audiences created in the same channel.The page to return when getting (paginated) results. Must be 1
or higher.
The number of audiences per page. Default: 20
The status of the audience(s) to return. One of:
IN_PROGRESS
: Pending. It may take several hours for the status to change to READY
.READY
: Ready to accept messages.FAILED
: An error occurred while creating the audience.EXPIRED
: Expired. Audiences are automatically deleted a month after they expire.Group Summary
Group ID
Group Name
Group icon URL
Action when image is tapped
Image URL
Image carousel template
Template with multiple images which can be cycled like a carousel. The images are shown in order when scrolling horizontally.
Array of columns
Defines the size of a tappable area. The top left is used as the origin of the area. Set these properties based on the baseSize.width
property and the baseSize.height
property.
Height of the tappable area
Width of the tappable area
Horizontal position relative to the left edge of the area. Value must be 0 or higher.
Vertical position relative to the top of the area. Value must be 0 or higher.
Defined tappable area
Label for the action. Spoken when the accessibility feature is enabled on the client device.
Message to send
Defined tappable area
Label for the action. Spoken when the accessibility feature is enabled on the client device.
The available schemes are http, https, line, and tel. For more information about the LINE URL scheme, see Using the LINE URL scheme.
Height of the video area
Width of the video area
Horizontal position of the video area relative to the left edge of the imagemap area. Value must be 0 or higher.
Vertical position of the video area relative to the top of the imagemap area. Value must be 0 or higher.
Label. Displayed after the video is finished. Max character limit: 30
Webpage URL. Called when the label displayed after the video is tapped. Max character limit: 1000 The available schemes are http, https, line, and tel. For more information about the LINE URL scheme, see Using the LINE URL scheme.
URL of the video file
Note: A very wide or tall video may be cropped when played in some environments.
URL of the preview image
Image URL (Max character limit: 1000)
Preview image URL (Max character limit: 1000)
Imagemap message
Imagemap messages are messages configured with an image that has multiple tappable areas. You can assign one tappable area for the entire image or different tappable areas on divided areas of the image.
You can also play a video on the image and display a label with a hyperlink after the video is finished.
Imagemap action objects
Object which specifies the actions and tappable areas of an imagemap.
When an area is tapped, the user is redirected to the URI specified in uri
and the message specified in message
is sent.
Alternative text
Height of base image. Set to the height that corresponds to a width of 1040 pixels.
Width of base image in pixels. Set to 1040.
Base URL of the image
HTTPS
over TLS
1.2 or laterCalculation status. One of:
ready
: Calculation has finished; the numbers are up-to-date.unready
: We haven't finished calculating the number of sent messages for the specified date
. Calculation usually takes about a day. Please try again later.out_of_service
: The specified date
is earlier than the date on which we first started calculating sent messages. Different APIs have different date. Check them at the document.Name of the LIFF app
LIFF app ID
true
if the LIFF app supports Bluetooth® Low Energy for LINE Things. false
otherwise.
Size of the LIFF app view. Specify one of the following values:
compact
: 50% of device screen height.tall
: 80% of device screen height.full
: 100% of device screen height.URL of the server on which the LIFF app is deployed (endpoint URL). The URL scheme must be https. Specify only the domain in this URL, without paths or query parameters.
LINE Notify Config
LINE Notify Notification URL origin
LINE Notify Service Client ID
LINE Notify Service Client Secret
LINE Notify Authentication URL origin
LINE Notify Service Callback URL
Maximum size of 2048×2048px JPEG
Maximum size of 240×240px JPEG
If omitted, the value defaults to false.
Sticker ID.
Package ID.
Address
Latitude
Longitude
Title
This action can be configured only with quick reply buttons. When a button associated with this action is tapped, the location screen in LINE is opened.
Label for the action
Address
Latitude
Longitude
Title
Message objects
JSON object which contains the contents of the message you send.
When a control associated with this action is tapped, the string in the text
property is sent as a message from the user.
Label for the action
Text sent when the action is performed
Common properties for messages
The following properties can be specified in all the message objects.
These properties are used for the quick reply feature. Supported on LINE 8.11.0 and later for iOS and Android. For more information, see Using quick replies.
Demographic filter object. You can use friends' attributes to filter the list of recipients.
If this is omitted, messages are sent to everyone—including users with attribute values of "unknown".
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.
Recipient object. You can specify recipients of the message using up to 10 audiences.
If this is omitted, messages will be sent to all users who have added your LINE Official Account as a friend.
The number of sent messages in the current month
The bottom offset. For more information, see Offset in the API documentation.
The right offset. For more information, see Offset in the API documentation.
The left offset. For more information, see Offset in the API documentation.
The top offset. For more information, see Offset in the API documentation.
Reference position for placing this box. Specify one of the following values:
relative
: Use the previous box as reference.absolute
: Use the top left of parent element as reference.The default value is relative. For more information, see Offset in the API documentation.
Name of the LIFF app
LIFF app ID
When a control associated with this action is tapped, a postback event is returned via webhook with the specified string in the data property.
String returned via webhook in the postback.data property of the postback event
Text displayed in the chat as a message sent by the user when the action is performed. Required for quick reply buttons. Optional for the other message types.
Label for the action
【Deprecated】 Text displayed in the chat as a message sent by the user when the action is performed. Returned from the server through a webhook. This property shouldn't be used with quick reply buttons.
This is a container that contains quick reply buttons.
If a version of LINE that doesn't support the quick reply feature receives a message that contains quick reply buttons, only the message is displayed.
This is a quick reply option that is displayed as a button.
Recipient objects
Recipient objects represent audiences. You can specify recipients based on a combination of criteria using logical operator objects. You can specify up to 10 recipient objects per request.
Array of area objects which define the coordinates and size of tappable areas
Text displayed in the chat bar
Name of the rich menu. This value can be used to help manage your rich menus and is not displayed to users.
true
to display the rich menu by default. Otherwise, false
.
size object which contains the width and height of the rich menu displayed in the chat. Rich menu images must be one of the following sizes (pixels): 2500x1686, 2500x843, 1200x810, 1200x405, 800x540, 800x270
When sending a message from the LINE Official Account, you can specify the sender.name
and the sender.iconUrl
properties in Message objects.
URL of the image to display as an icon when sending a message
Display name. Certain words such as LINE may not be used.
Package ID for a set of stickers. For information on package IDs, see the Sticker list.
Sticker ID. For a list of sticker IDs for stickers that can be sent with the Messaging API, see the Sticker list.
One of the following values to indicate whether a target limit is set or not.
none
: This indicates that a target limit is not set.limited
: This indicates that a target limit is set.The target limit for additional messages in the current month.
This property is returned when the type
property has a value of limited
.
Template messages are messages with predefined layouts which you can customize. For more information, see Template messages.
The following template types are available:
Alternative text
A Buttons, Confirm, Carousel, or Image Carousel object.
Response body of test webhook endpoint.
Details of the response.
Reason for the response.
The HTTP status code. If the webhook response isn't received, the status code is set to zero or a negative number.
Result of the communication from the LINE platform to the webhook URL.
Time of the event in milliseconds
One or more LINE emoji. Max: 20 LINE emoji
Message text. You can include the following emoji:
Unicode emoji LINE emoji (Use a $ character as a placeholder and specify details in the emojis property) (Deprecated) LINE original emoji (Unicode code point table for LINE original emoji)
Max character limit: 5000
When a control associated with this action is tapped, the URI specified in the uri
property is opened.
Label for the action
URI opened when the action is performed (Max character limit: 1000)
The available schemes are http
, https
, line
, and tel
. For more information about the LINE URL scheme, see Using the LINE URL scheme.
User Profile
User's display name
Profile image URL. "https" image URL. Not included in the response if the user doesn't have a profile image.
User's status message. Not included in the response if the user doesn't have a status message.
User ID
URL of video file
A very wide or tall video may be cropped when played in some environments.
URL of preview image
Response body of get webhook endpoint info.
Webhook usage status. Send a webhook event from the LINE platform to the webhook URL only if enabled.
Webhook URL
Generated using TypeDoc
A user ID or IFA.