--- openapi: 3.0.0 info: title: LINE Messaging API version: "0.0.1" description: This document describes LINE Messaging API. servers: - url: "https://api.line.me" security: - Bearer: [] tags: - name: messaging-api - name: messaging-api-blob paths: # Webhook "/v2/bot/channel/webhook/endpoint": get: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#get-webhook-endpoint-information tags: - messaging-api operationId: getWebhookEndpoint description: "Get webhook endpoint information" responses: "200": description: "OK" content: "application/json": schema: "$ref": "#/components/schemas/GetWebhookEndpointResponse" examples: ACTIVE: summary: "If the webhook URL was set and the webhook usage is enabled" value: endpoint: https://example.com/test active: true INACTIVE: summary: "If the webhook URL was set and the webhook usage is disabled" value: endpoint: https://example.com/test active: false put: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#set-webhook-endpoint-url tags: - messaging-api operationId: setWebhookEndpoint description: "Set webhook endpoint URL" requestBody: content: application/json: schema: "$ref": "#/components/schemas/SetWebhookEndpointRequest" required: true responses: "200": description: "OK" "/v2/bot/channel/webhook/test": post: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#test-webhook-endpoint tags: - messaging-api operationId: testWebhookEndpoint description: "Test webhook endpoint" requestBody: content: application/json: schema: "$ref": "#/components/schemas/TestWebhookEndpointRequest" responses: "200": description: "OK" content: "application/json": schema: "$ref": "#/components/schemas/TestWebhookEndpointResponse" example: success: true timestamp: "2020-09-30T05:38:20.031Z" statusCode: 200 reason: OK detail: "200" # Webhook content "/v2/bot/message/{messageId}/content": get: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#get-content servers: - url: "https://api-data.line.me" tags: - messaging-api-blob operationId: getMessageContent description: "Download image, video, and audio data sent from users." parameters: - name: messageId in: path required: true description: "Message ID of video or audio" schema: type: string responses: "200": description: "OK" content: "*/*": schema: description: "blob response" type: string format: binary "/v2/bot/message/{messageId}/content/preview": get: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#get-image-or-video-preview servers: - url: "https://api-data.line.me" tags: - messaging-api-blob operationId: getMessageContentPreview description: "Get a preview image of the image or video" parameters: - name: messageId in: path required: true description: "Message ID of image or video" schema: type: string responses: "200": description: "OK" content: "*/*": schema: type: string format: binary description: "blob response" "/v2/bot/message/{messageId}/content/transcoding": get: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#verify-video-or-audio-preparation-status servers: - url: "https://api-data.line.me" tags: - messaging-api-blob operationId: getMessageContentTranscodingByMessageId description: "Verify the preparation status of a video or audio for getting" parameters: - name: messageId in: path required: true description: "Message ID of video or audio" schema: type: string responses: "200": description: "OK" content: "application/json": schema: "$ref": "#/components/schemas/GetMessageContentTranscodingResponse" example: status: processing # Messaging "/v2/bot/message/reply": post: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#send-reply-message tags: - messaging-api operationId: replyMessage description: "Send reply message" requestBody: content: application/json: schema: "$ref": "#/components/schemas/ReplyMessageRequest" required: true responses: "200": description: "OK" content: "application/json": schema: "$ref": "#/components/schemas/ReplyMessageResponse" "400": description: "Bad request" content: "application/json": schema: "$ref": "#/components/schemas/ErrorResponse" "429": description: "Too Many Requests" content: "application/json": schema: "$ref": "#/components/schemas/ErrorResponse" "/v2/bot/message/push": post: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#send-push-message tags: - messaging-api operationId: pushMessage description: "Sends a message to a user, group chat, or multi-person chat at any time." parameters: - name: X-Line-Retry-Key in: header required: false schema: type: string format: uuid description: |+ Retry key. Specifies the UUID in hexadecimal format (e.g., `123e4567-e89b-12d3-a456-426614174000`) generated by any method. The retry key isn't generated by LINE. Each developer must generate their own retry key. requestBody: content: application/json: schema: "$ref": "#/components/schemas/PushMessageRequest" required: true responses: "200": description: "OK" content: "application/json": schema: "$ref": "#/components/schemas/PushMessageResponse" "400": description: "Bad Request" content: "application/json": schema: "$ref": "#/components/schemas/ErrorResponse" "403": description: "Forbidden" content: "application/json": schema: "$ref": "#/components/schemas/ErrorResponse" "409": description: "Conflict" content: "application/json": schema: "$ref": "#/components/schemas/ErrorResponse" "429": description: "Too Many Requests" content: "application/json": schema: "$ref": "#/components/schemas/ErrorResponse" "/v2/bot/message/multicast": post: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#send-multicast-message tags: - messaging-api operationId: multicast description: "An API that efficiently sends the same message to multiple user IDs. You can't send messages to group chats or multi-person chats." parameters: - name: X-Line-Retry-Key in: header required: false schema: type: string format: uuid description: |+ Retry key. Specifies the UUID in hexadecimal format (e.g., `123e4567-e89b-12d3-a456-426614174000`) generated by any method. The retry key isn't generated by LINE. Each developer must generate their own retry key. requestBody: content: application/json: schema: "$ref": "#/components/schemas/MulticastRequest" required: true responses: "200": description: "OK" content: "application/json": schema: "$ref": "#/components/schemas/MulticastResponse" "400": description: "Bad Request" content: "application/json": schema: "$ref": "#/components/schemas/ErrorResponse" "403": description: "Forbidden" content: "application/json": schema: "$ref": "#/components/schemas/ErrorResponse" "409": description: "Conflict" content: "application/json": schema: "$ref": "#/components/schemas/ErrorResponse" "429": description: "Too Many Requests" content: "application/json": schema: "$ref": "#/components/schemas/ErrorResponse" "/v2/bot/message/narrowcast": post: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#send-narrowcast-message tags: - messaging-api operationId: narrowcast description: "Send narrowcast message" parameters: - name: X-Line-Retry-Key in: header required: false schema: type: string format: uuid description: |+ Retry key. Specifies the UUID in hexadecimal format (e.g., `123e4567-e89b-12d3-a456-426614174000`) generated by any method. The retry key isn't generated by LINE. Each developer must generate their own retry key. requestBody: content: application/json: schema: "$ref": "#/components/schemas/NarrowcastRequest" required: true responses: "202": description: "Accepted" content: "application/json": schema: "$ref": "#/components/schemas/NarrowcastResponse" "400": description: "Bad Request" content: "application/json": schema: "$ref": "#/components/schemas/ErrorResponse" "403": description: "Forbidden" content: "application/json": schema: "$ref": "#/components/schemas/ErrorResponse" "409": description: "Conflict" content: "application/json": schema: "$ref": "#/components/schemas/ErrorResponse" "429": description: "Too Many Requests" content: "application/json": schema: "$ref": "#/components/schemas/ErrorResponse" "/v2/bot/message/progress/narrowcast": get: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#get-narrowcast-progress-status tags: - messaging-api operationId: getNarrowcastProgress description: "Gets the status of a narrowcast message." parameters: - name: requestId in: query required: true schema: type: string description: "The narrowcast message's request ID. Each Messaging API request has a request ID." responses: "200": description: "OK" content: "application/json": schema: "$ref": "#/components/schemas/NarrowcastProgressResponse" example: phase: waiting acceptedTime: 2020-12-03T10:15:30.121Z "/v2/bot/message/broadcast": post: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#send-broadcast-message tags: - messaging-api operationId: broadcast description: "Sends a message to multiple users at any time." parameters: - name: X-Line-Retry-Key in: header required: false schema: type: string format: uuid description: |+ Retry key. Specifies the UUID in hexadecimal format (e.g., `123e4567-e89b-12d3-a456-426614174000`) generated by any method. The retry key isn't generated by LINE. Each developer must generate their own retry key. requestBody: content: application/json: schema: "$ref": "#/components/schemas/BroadcastRequest" required: true responses: "200": description: "OK" content: "application/json": schema: "$ref": "#/components/schemas/BroadcastResponse" "400": description: "Bad Request" content: "application/json": schema: "$ref": "#/components/schemas/ErrorResponse" "403": description: "Forbidden" content: "application/json": schema: "$ref": "#/components/schemas/ErrorResponse" "409": description: "Conflict" content: "application/json": schema: "$ref": "#/components/schemas/ErrorResponse" "429": description: "Too Many Requests" content: "application/json": schema: "$ref": "#/components/schemas/ErrorResponse" # Quota "/v2/bot/message/quota": get: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#get-quota tags: - messaging-api operationId: getMessageQuota description: "Gets the target limit for sending messages in the current month. The total number of the free messages and the additional messages is returned." responses: "200": description: "OK" content: "application/json": schema: "$ref": "#/components/schemas/MessageQuotaResponse" example: "type": "limited" "value": 1000 "/v2/bot/message/quota/consumption": get: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#get-consumption tags: - messaging-api operationId: getMessageQuotaConsumption description: "Gets the number of messages sent in the current month." responses: "200": description: "OK" content: "application/json": schema: "$ref": "#/components/schemas/QuotaConsumptionResponse" example: "totalUsage": 500 # Delivery "/v2/bot/message/delivery/reply": get: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#get-number-of-reply-messages tags: - messaging-api operationId: getNumberOfSentReplyMessages description: "Get number of sent reply messages" parameters: - name: date in: query required: true schema: type: string description: |+ Date the messages were sent Format: `yyyyMMdd` (e.g. `20191231`) Timezone: UTC+9 responses: "200": description: "OK" content: "application/json": schema: "$ref": "#/components/schemas/NumberOfMessagesResponse" example: "status": "ready" "success": 10000 "/v2/bot/message/delivery/push": get: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#get-number-of-push-messages tags: - messaging-api operationId: getNumberOfSentPushMessages description: "Get number of sent push messages" parameters: - name: date in: query required: true schema: type: string description: |+ Date the messages were sent Format: `yyyyMMdd` (e.g. `20191231`) Timezone: UTC+9 responses: "200": description: "OK" content: "application/json": schema: "$ref": "#/components/schemas/NumberOfMessagesResponse" example: "status": "ready" "success": 10000 "/v2/bot/message/delivery/multicast": get: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#get-number-of-multicast-messages tags: - messaging-api operationId: getNumberOfSentMulticastMessages description: "Get number of sent multicast messages" parameters: - name: date in: query required: true schema: type: string description: |+ Date the messages were sent Format: `yyyyMMdd` (e.g. `20191231`) Timezone: UTC+9 responses: "200": description: "OK" content: "application/json": schema: "$ref": "#/components/schemas/NumberOfMessagesResponse" example: status: ready success: 10000 "/v2/bot/message/delivery/broadcast": get: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#get-number-of-broadcast-messages tags: - messaging-api operationId: getNumberOfSentBroadcastMessages description: "Get number of sent broadcast messages" parameters: - name: date in: query required: true schema: type: string format: "^[0-9]{8}$" description: |+ Date the messages were sent Format: yyyyMMdd (e.g. 20191231) Timezone: UTC+9 responses: "200": description: "OK" content: "application/json": schema: "$ref": "#/components/schemas/NumberOfMessagesResponse" example: status: ready success: 10000 # Message validation "/v2/bot/message/validate/reply": post: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#validate-message-objects-of-reply-message tags: - messaging-api operationId: validateReply description: "Validate message objects of a reply message" requestBody: content: application/json: schema: "$ref": "#/components/schemas/ValidateMessageRequest" required: true responses: "200": description: "OK" "/v2/bot/message/validate/push": post: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#validate-message-objects-of-push-message tags: - messaging-api operationId: validatePush description: "Validate message objects of a push message" requestBody: content: application/json: schema: "$ref": "#/components/schemas/ValidateMessageRequest" required: true responses: "200": description: "OK" "/v2/bot/message/validate/multicast": post: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#validate-message-objects-of-multicast-message tags: - messaging-api operationId: validateMulticast description: "Validate message objects of a multicast message" requestBody: content: application/json: schema: "$ref": "#/components/schemas/ValidateMessageRequest" required: true responses: "200": description: "OK" "/v2/bot/message/validate/narrowcast": post: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#validate-message-objects-of-narrowcast-message tags: - messaging-api operationId: validateNarrowcast description: "Validate message objects of a narrowcast message" requestBody: content: application/json: schema: "$ref": "#/components/schemas/ValidateMessageRequest" required: true responses: "200": description: "OK" "/v2/bot/message/validate/broadcast": post: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#validate-message-objects-of-broadcast-message tags: - messaging-api operationId: validateBroadcast description: "Validate message objects of a broadcast message" requestBody: content: application/json: schema: "$ref": "#/components/schemas/ValidateMessageRequest" required: true responses: "200": description: "OK" # Aggregation Unit "/v2/bot/message/aggregation/info": get: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#get-number-of-units-used-this-month tags: - messaging-api operationId: getAggregationUnitUsage description: "Get number of units used this month" responses: "200": description: "OK" content: "application/json": schema: "$ref": "#/components/schemas/GetAggregationUnitUsageResponse" example: numOfCustomAggregationUnits: 22 "/v2/bot/message/aggregation/list": get: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#get-name-list-of-units-used-this-month tags: - messaging-api operationId: getAggregationUnitNameList description: "Get name list of units used this month" parameters: - name: limit in: query required: false schema: type: string description: |+ The maximum number of aggregation units you can get per request. - name: start in: query required: false schema: type: string description: |+ Value of the continuation token found in the next property of the JSON object returned in the response. If you can't get all the aggregation units in one request, include this parameter to get the remaining array. responses: "200": description: "OK" content: "application/json": schema: "$ref": "#/components/schemas/GetAggregationUnitNameListResponse" example: customAggregationUnits: - promotion_a - promotion_b next: jxEWCEEP... # Users "/v2/bot/profile/{userId}": get: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#get-profile tags: - messaging-api operationId: getProfile description: "Get profile" parameters: - name: userId in: path required: true schema: type: string description: "User ID" responses: "200": description: "OK" content: "application/json": schema: "$ref": "#/components/schemas/UserProfileResponse" example: displayName: LINE taro userId: U4af4980629... language: en pictureUrl: https://obs.line-apps.com/... statusMessage: Hello, LINE! "/v2/bot/followers/ids": get: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#get-follower-ids tags: - messaging-api operationId: getFollowers description: "Get a list of users who added your LINE Official Account as a friend" parameters: - name: start in: query required: false description: |+ Value of the continuation token found in the next property of the JSON object returned in the response. Include this parameter to get the next array of user IDs. schema: type: string - name: limit in: query required: false description: "The maximum number of user IDs to retrieve in a single request." schema: type: integer format: int32 default: 300 maximum: 1000 responses: "200": description: "OK" content: "application/json": schema: "$ref": "#/components/schemas/GetFollowersResponse" example: userIds: - U4af4980629... - U0c229f96c4... - U95afb1d4df... next: yANU9IA... # Bot "/v2/bot/info": get: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#get-bot-info tags: - messaging-api operationId: getBotInfo description: "Get bot info" responses: "200": description: "OK" content: "application/json": schema: "$ref": "#/components/schemas/BotInfoResponse" example: userId: Ub9952f8... basicId: "@216ru..." displayName: Example name pictureUrl: https://obs.line-apps.com/... chatMode: chat markAsReadMode: manual # Group "/v2/bot/group/{groupId}/member/{userId}": get: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#get-group-member-profile tags: - messaging-api operationId: getGroupMemberProfile description: "Get group chat member profile" parameters: - name: groupId in: path required: true schema: type: string description: "Group ID" - name: userId in: path required: true schema: type: string description: "User ID" responses: "200": description: "OK" content: "application/json": schema: "$ref": "#/components/schemas/GroupUserProfileResponse" example: "displayName": "LINE taro" "userId": "U4af4980629..." "pictureUrl": "https://obs.line-apps.com/..." "/v2/bot/room/{roomId}/member/{userId}": get: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#get-room-member-profile tags: - messaging-api operationId: getRoomMemberProfile description: "Get multi-person chat member profile" parameters: - name: roomId in: path required: true schema: type: string description: "Room ID" - name: userId in: path required: true schema: type: string description: "User ID" responses: "200": description: "OK" content: "application/json": schema: "$ref": "#/components/schemas/RoomUserProfileResponse" example: displayName: LINE taro userId: U4af4980629... pictureUrl: https://obs.line-apps.com/... "/v2/bot/group/{groupId}/members/ids": get: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#get-group-member-user-ids tags: - messaging-api operationId: getGroupMembersIds description: "Get group chat member user IDs" parameters: - name: groupId in: path required: true schema: type: string description: "Group ID" - name: start in: query required: false schema: type: string description: |+ Value of the continuation token found in the `next` property of the JSON object returned in the response. Include this parameter to get the next array of user IDs for the members of the group. responses: "200": description: "OK" content: "application/json": schema: "$ref": "#/components/schemas/MembersIdsResponse" example: memberIds: - U4af4980629... - U0c229f96c4... - U95afb1d4df... next: jxEWCEEP... "/v2/bot/room/{roomId}/members/ids": get: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#get-room-member-user-ids tags: - messaging-api operationId: getRoomMembersIds description: "Get multi-person chat member user IDs" parameters: - name: roomId in: path required: true schema: type: string description: "Room ID" - name: start in: query required: false schema: type: string description: |+ Value of the continuation token found in the `next` property of the JSON object returned in the response. Include this parameter to get the next array of user IDs for the members of the group. responses: "200": description: "OK" content: "application/json": schema: "$ref": "#/components/schemas/MembersIdsResponse" example: memberIds: - U4af4980629... - U0c229f96c4... - U95afb1d4df... next: jxEWCEEP... "/v2/bot/group/{groupId}/leave": post: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#leave-group tags: - messaging-api operationId: leaveGroup description: "Leave group chat" parameters: - name: groupId in: path required: true schema: type: string description: "Group ID" responses: "200": description: "OK" "400": description: "Bad Request" content: "application/json": schema: "$ref": "#/components/schemas/ErrorResponse" "404": description: "Not Found" content: "application/json": schema: "$ref": "#/components/schemas/ErrorResponse" "/v2/bot/room/{roomId}/leave": post: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#leave-room tags: - messaging-api operationId: leaveRoom description: "Leave multi-person chat" parameters: - name: roomId in: path required: true schema: type: string description: "Room ID" responses: "200": description: "OK" "/v2/bot/group/{groupId}/summary": get: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#get-group-summary tags: - messaging-api operationId: getGroupSummary description: "Get group chat summary" parameters: - name: groupId in: path required: true schema: type: string description: "Group ID" responses: "200": description: "OK" content: "application/json": schema: "$ref": "#/components/schemas/GroupSummaryResponse" example: groupId: Ca56f94637c... groupName: Group name pictureUrl: https://profile.line-scdn.net/abcdefghijklmn "/v2/bot/group/{groupId}/members/count": get: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#get-members-group-count tags: - messaging-api operationId: getGroupMemberCount description: "Get number of users in a group chat" parameters: - name: groupId in: path required: true schema: type: string description: "Group ID" responses: "200": description: "OK" content: "application/json": schema: "$ref": "#/components/schemas/GroupMemberCountResponse" example: count: 3 "/v2/bot/room/{roomId}/members/count": get: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#get-members-room-count tags: - messaging-api operationId: getRoomMemberCount description: "Get number of users in a multi-person chat" parameters: - name: roomId in: path required: true schema: type: string description: "Room ID" responses: "200": description: "OK" content: "application/json": schema: "$ref": "#/components/schemas/RoomMemberCountResponse" example: count: 3 # RichMenu "/v2/bot/richmenu": post: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#create-rich-menu tags: - messaging-api operationId: createRichMenu description: "Create rich menu" requestBody: content: application/json: schema: "$ref": "#/components/schemas/RichMenuRequest" required: true responses: "200": description: "OK" content: "application/json": schema: "$ref": "#/components/schemas/RichMenuIdResponse" example: "richMenuId": "{richMenuId}" "/v2/bot/richmenu/validate": post: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#validate-rich-menu-object tags: - messaging-api operationId: validateRichMenuObject description: "Validate rich menu object" requestBody: content: application/json: schema: "$ref": "#/components/schemas/RichMenuRequest" required: true responses: "200": description: "OK" "/v2/bot/richmenu/{richMenuId}/content": get: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#download-rich-menu-image servers: - url: "https://api-data.line.me" tags: - messaging-api-blob operationId: getRichMenuImage description: "Download rich menu image." parameters: - name: richMenuId in: path required: true description: "ID of the rich menu with the image to be downloaded" schema: type: string responses: "200": description: "OK" content: "*/*": schema: type: string format: binary description: "blob response" post: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#upload-rich-menu-image servers: - url: "https://api-data.line.me" tags: - messaging-api-blob operationId: setRichMenuImage description: "Upload rich menu image" parameters: - name: richMenuId in: path required: true description: "The ID of the rich menu to attach the image to" schema: type: string requestBody: required: true content: "*/*": schema: description: "blob request" type: string format: binary responses: "200": description: "OK" "/v2/bot/richmenu/{richMenuId}": parameters: - name: richMenuId in: path required: true schema: type: string description: "ID of a rich menu" get: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#get-rich-menu tags: - messaging-api operationId: getRichMenu description: "Gets a rich menu via a rich menu ID." responses: "200": description: "OK" content: "application/json": schema: "$ref": "#/components/schemas/RichMenuResponse" example: richMenuId: "{richMenuId}" size: width: 2500 height: 1686 name: nice rich menu chatBarText: click selected: false areas: - bounds: x: 0 y: 0 width: 2500 height: 1686 action: type: postback data: action=buy&itemid=123 delete: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#delete-rich-menu tags: - messaging-api operationId: deleteRichMenu description: "Deletes a rich menu." responses: "200": description: "OK" "/v2/bot/richmenu/list": get: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#get-rich-menu-list tags: - messaging-api operationId: getRichMenuList description: "Get rich menu list" responses: "200": description: "OK" content: "application/json": schema: "$ref": "#/components/schemas/RichMenuListResponse" example: richmenus: - richMenuId: "{richMenuId}" size: width: 2500 height: 1686 selected: false name: nice rich menu chatBarText: click areas: - bounds: x: 0 y: 0 width: 2500 height: 1686 action: type: postback data: action=buy&itemid=123 # Default RichMenu "/v2/bot/user/all/richmenu/{richMenuId}": post: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#set-default-rich-menu tags: - messaging-api operationId: setDefaultRichMenu description: "Set default rich menu" parameters: - name: richMenuId in: path required: true schema: type: string description: "ID of a rich menu" responses: "200": description: "OK" "/v2/bot/user/all/richmenu": get: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#get-default-rich-menu-id tags: - messaging-api operationId: getDefaultRichMenuId description: "Gets the ID of the default rich menu set with the Messaging API." responses: "200": description: "OK" content: "application/json": schema: "$ref": "#/components/schemas/RichMenuIdResponse" example: richMenuId: "{richMenuId}" delete: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#cancel-default-rich-menu tags: - messaging-api operationId: cancelDefaultRichMenu description: "Cancel default rich menu" responses: "200": description: "OK" # RichMenu Alias "/v2/bot/richmenu/alias": post: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#create-rich-menu-alias tags: - messaging-api operationId: createRichMenuAlias description: "Create rich menu alias" requestBody: content: application/json: schema: "$ref": "#/components/schemas/CreateRichMenuAliasRequest" required: true responses: "200": description: "OK" "400": description: "Bad Request" content: "application/json": schema: "$ref": "#/components/schemas/ErrorResponse" "/v2/bot/richmenu/alias/{richMenuAliasId}": get: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#get-rich-menu-alias-by-id tags: - messaging-api operationId: getRichMenuAlias description: "Get rich menu alias information" parameters: - name: richMenuAliasId in: path required: true schema: type: string description: "The rich menu alias ID whose information you want to obtain." responses: "200": description: "OK" content: "application/json": schema: "$ref": "#/components/schemas/RichMenuAliasResponse" example: richMenuAliasId: richmenu-alias-a richMenuId: richmenu-88c05ef6921ae53f8b58a25f3a65faf7 post: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#update-rich-menu-alias tags: - messaging-api operationId: updateRichMenuAlias description: "Update rich menu alias" parameters: - name: richMenuAliasId in: path required: true schema: type: string description: "The rich menu alias ID you want to update." requestBody: content: application/json: schema: "$ref": "#/components/schemas/UpdateRichMenuAliasRequest" required: true responses: "200": description: "OK" "400": description: "Bad Request" content: "application/json": schema: "$ref": "#/components/schemas/ErrorResponse" delete: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#delete-rich-menu-alias tags: - messaging-api operationId: deleteRichMenuAlias description: "Delete rich menu alias" parameters: - name: richMenuAliasId in: path required: true schema: type: string description: "Rich menu alias ID that you want to delete." responses: "200": description: "OK" "400": description: "Bad Request" content: "application/json": schema: "$ref": "#/components/schemas/ErrorResponse" "/v2/bot/richmenu/alias/list": get: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#get-rich-menu-alias-list tags: - messaging-api operationId: getRichMenuAliasList description: "Get list of rich menu alias" responses: "200": description: "OK" content: "application/json": schema: "$ref": "#/components/schemas/RichMenuAliasListResponse" examples: TWO_ALIASES: summary: "If you have 2 rich menu aliases" value: aliases: - richMenuAliasId: richmenu-alias-a richMenuId: richmenu-862e6ad6c267d2ddf3f42bc78554f6a4 - richMenuAliasId: richmenu-alias-b richMenuId: richmenu-88c05ef6921ae53f8b58a25f3a65faf7 NO_ALIASES: summary: "If you have 0 rich menu alias" value: aliases: [ ] # User RichMenu "/v2/bot/user/{userId}/richmenu": parameters: - name: userId in: path required: true schema: type: string description: "User ID. Found in the `source` object of webhook event objects. Do not use the LINE ID used in LINE." get: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#get-rich-menu-id-of-user tags: - messaging-api operationId: getRichMenuIdOfUser description: "Get rich menu ID of user" responses: "200": description: "OK" content: "application/json": schema: "$ref": "#/components/schemas/RichMenuIdResponse" example: "richMenuId": "{richMenuId}" delete: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#unlink-rich-menu-from-user tags: - messaging-api operationId: unlinkRichMenuIdFromUser description: "Unlink rich menu from user" responses: "200": description: "OK" "/v2/bot/user/{userId}/richmenu/{richMenuId}": post: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#link-rich-menu-to-user tags: - messaging-api operationId: linkRichMenuIdToUser description: "Link rich menu to user." parameters: - name: userId in: path required: true schema: type: string description: "User ID. Found in the `source` object of webhook event objects. Do not use the LINE ID used in LINE." - name: richMenuId in: path required: true schema: type: string description: "ID of a rich menu" responses: "200": description: "OK" "/v2/bot/richmenu/bulk/link": post: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#link-rich-menu-to-users tags: - messaging-api operationId: linkRichMenuIdToUsers description: "Link rich menu to multiple users" requestBody: content: application/json: schema: "$ref": "#/components/schemas/RichMenuBulkLinkRequest" required: true responses: "202": description: "Accepted" "/v2/bot/richmenu/bulk/unlink": post: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#unlink-rich-menu-from-users tags: - messaging-api operationId: unlinkRichMenuIdFromUsers description: "Unlink rich menus from multiple users" requestBody: content: application/json: schema: "$ref": "#/components/schemas/RichMenuBulkUnlinkRequest" required: true responses: "202": description: "Accepted" "/v2/bot/richmenu/batch": post: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#batch-control-rich-menus-of-users tags: - messaging-api operationId: richMenuBatch description: |+ You can use this endpoint to batch control the rich menu linked to the users using the endpoint such as Link rich menu to user. The following operations are available: 1. Replace a rich menu with another rich menu for all users linked to a specific rich menu 2. Unlink a rich menu for all users linked to a specific rich menu 3. Unlink a rich menu for all users linked the rich menu requestBody: content: application/json: schema: "$ref": "#/components/schemas/RichMenuBatchRequest" required: true responses: "202": description: "Accepted" "/v2/bot/richmenu/validate/batch": post: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#validate-batch-control-rich-menus-request tags: - messaging-api operationId: validateRichMenuBatchRequest description: "Validate a request body of the Replace or unlink the linked rich menus in batches endpoint." requestBody: content: application/json: schema: "$ref": "#/components/schemas/RichMenuBatchRequest" required: true responses: "200": description: "OK" "/v2/bot/richmenu/progress/batch": get: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#get-batch-control-rich-menus-progress-status tags: - messaging-api operationId: getRichMenuBatchProgress description: "Get the status of Replace or unlink a linked rich menus in batches." parameters: - name: requestId in: query required: true schema: type: string description: "A request ID used to batch control the rich menu linked to the user. Each Messaging API request has a request ID." responses: "200": description: "OK" content: "application/json": schema: "$ref": "#/components/schemas/RichMenuBatchProgressResponse" example: phase: ongoing acceptedTime: 2023-07-04T10:15:30.121Z # Account link "/v2/bot/user/{userId}/linkToken": post: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#issue-link-token tags: - messaging-api operationId: issueLinkToken description: "Issue link token" parameters: - name: userId in: path required: true schema: type: string description: |+ User ID for the LINE account to be linked. Found in the `source` object of account link event objects. Do not use the LINE ID used in LINE. responses: "200": description: "OK" content: "application/json": schema: "$ref": "#/components/schemas/IssueLinkTokenResponse" example: linkToken: NMZTNuVrPTqlr2IF8Bnymkb7rXfYv5EY # Optional APIs "/v2/bot/message/markAsRead": post: externalDocs: url: https://developers.line.biz/en/reference/partner-docs/#mark-messages-from-users-as-read tags: - messaging-api operationId: markMessagesAsRead description: "Mark messages from users as read" requestBody: content: application/json: schema: "$ref": "#/components/schemas/MarkMessagesAsReadRequest" example: chat: userId: Uxxxxxxxxxxxxxxxxxx required: true responses: "200": description: "OK" "/bot/pnp/push": post: externalDocs: url: https://developers.line.biz/en/reference/partner-docs/#send-line-notification-message tags: - messaging-api operationId: pushMessagesByPhone description: "Send LINE notification message" parameters: - name: X-Line-Delivery-Tag in: header required: false schema: type: string minLength: 16 maxLength: 100 description: "String returned in the delivery.data property of the delivery completion event via Webhook." requestBody: content: application/json: schema: "$ref": "#/components/schemas/PnpMessagesRequest" required: true responses: "200": description: "OK" "422": description: "Unprocessable Entity" content: "application/json": schema: "$ref": "#/components/schemas/ErrorResponse" "/v2/bot/message/delivery/pnp": get: externalDocs: url: https://developers.line.biz/en/reference/partner-docs/#get-number-of-sent-line-notification-messages tags: - messaging-api operationId: getPNPMessageStatistics description: "Get number of sent LINE notification messages" parameters: - name: date in: query required: true schema: type: string pattern: "^[0-9]{8}$" description: |+ Date the message was sent Format: `yyyyMMdd` (Example:`20211231`) Time zone: UTC+9 responses: "200": description: "OK" content: "application/json": schema: "$ref": "#/components/schemas/NumberOfMessagesResponse" example: status: ready success: 3 # Membership "/v2/bot/membership/subscription/{userId}": get: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#get-a-users-membership-subscription-status tags: - messaging-api operationId: getMembershipSubscription description: "Get a user's membership subscription." parameters: - name: userId in: path required: true schema: type: string description: "User ID" responses: "200": description: "OK" content: application/json: schema: "$ref": "#/components/schemas/GetMembershipSubscriptionResponse" example: subscriptions: - membership: membershipId: 3189 title: "Basic Plan" description: "You will receive messages and photos every Saturday." benefits: - "Members Only Messages" - "Members Only Photos" price: 500.00 currency: "JPY" user: membershipNo: 1 joinedTime: 1707214784 nextBillingDate: "2024-02-08" totalSubscriptionMonths: 1 "400": description: "An invalid user ID is specified." content: application/json: schema: "$ref": "#/components/schemas/ErrorResponse" "404": description: "Unable to get information about the membership to which the user subscribes." content: application/json: schema: "$ref": "#/components/schemas/ErrorResponse" "/v2/bot/membership/list": get: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#get-membership-plans tags: - messaging-api operationId: getMembershipList description: "Get a list of memberships." responses: "200": description: "OK" content: application/json: schema: "$ref": "#/components/schemas/MembershipListResponse" example: memberships: - membershipId: 3189 title: "Basic Plan" description: "You will receive messages and photos every Saturday." benefits: - "Members Only Messages" - "Members Only Photos" price: 500.00 currency: "JPY" memberCount: 1 memberLimit: null isInAppPurchase: true isPublished: true - membershipId: 3213 title: "Premium Plan" description: "Invitation to a special party." benefits: - "Members Only Party" price: 1500.00 currency: "JPY" memberCount: 0 memberLimit: null isInAppPurchase: false isPublished: true "404": description: "Unable to get information about the memberships." content: application/json: schema: "$ref": "#/components/schemas/ErrorResponse" "/v2/bot/membership/{membershipId}/users/ids": get: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#get-membership-user-ids tags: - messaging-api operationId: getJoinedMembershipUsers description: "Get a list of user IDs who joined the membership." parameters: - name: start in: query required: false description: |+ A continuation token to get next remaining membership user IDs. Returned only when there are remaining user IDs that weren't returned in the userIds property in the previous request. The continuation token expires in 24 hours (86,400 seconds). schema: type: string - name: limit in: query required: false description: |+ The max number of items to return for this API call. The value is set to 300 by default, but the max acceptable value is 1000. schema: type: integer format: int32 default: 300 maximum: 1000 minimum: 1 - name: membershipId in: path required: true schema: type: integer description: "Membership plan ID." responses: "200": description: "OK" content: application/json: schema: "$ref": "#/components/schemas/GetJoinedMembershipUsersResponse" example: userIds: - U4af4980629... - U0c229f96c4... - U95afb1d4df... next: jxEWCEEP... "400": description: "`start` is incorrect or expired, or `limit` is under 1 or over 1000." content: application/json: schema: "$ref": "#/components/schemas/ErrorResponse" "404": description: "Membership ID is not owned by the bot or does not exist." content: application/json: schema: "$ref": "#/components/schemas/ErrorResponse" # Coupon "/v2/bot/coupon": get: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#get-coupons-list tags: - messaging-api operationId: listCoupon description: "Get a paginated list of coupons." parameters: - in: query name: status required: false schema: uniqueItems: true type: array items: type: string enum: - DRAFT - RUNNING - CLOSED description: "Filter coupons by their status." - in: query name: start required: false schema: type: string description: "Pagination token to retrieve the next page of results." - in: query name: limit required: false schema: maximum: 100 minimum: 1 type: integer format: int32 default: 20 description: "Maximum number of coupons to return per request." responses: "200": description: "OK" content: "application/json": schema: $ref: "#/components/schemas/MessagingApiPagerCouponListResponse" "400": description: "Bad Request" content: "application/json": schema: "$ref": "#/components/schemas/ErrorResponse" post: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#create-coupon tags: - messaging-api operationId: createCoupon description: "Create a new coupon. Define coupon details such as type, title, and validity period." requestBody: content: application/json: schema: $ref: "#/components/schemas/CouponCreateRequest" responses: "200": description: "OK" content: "application/json": schema: $ref: "#/components/schemas/CouponCreateResponse" "400": description: "Bad Request" content: "application/json": schema: "$ref": "#/components/schemas/ErrorResponse" "/v2/bot/coupon/{couponId}": get: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#get-coupon tags: - messaging-api operationId: getCouponDetail description: "Get coupon detail" parameters: - in: path name: couponId required: true schema: type: string responses: "200": description: "OK" content: "application/json": schema: $ref: "#/components/schemas/CouponResponse" "400": description: "Bad Request" content: "application/json": schema: "$ref": "#/components/schemas/ErrorResponse" "404": description: "Not Found" content: "application/json": schema: "$ref": "#/components/schemas/ErrorResponse" "/v2/bot/coupon/{couponId}/close": put: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#discontinue-coupon tags: - messaging-api operationId: closeCoupon description: "Close coupon" parameters: - in: path name: couponId required: true schema: type: string responses: "200": description: "OK" "400": description: "Bad Request" content: "application/json": schema: "$ref": "#/components/schemas/ErrorResponse" "404": description: "Not Found" content: "application/json": schema: "$ref": "#/components/schemas/ErrorResponse" "410": description: "Gone" content: "application/json": schema: "$ref": "#/components/schemas/ErrorResponse" "/v2/bot/chat/loading/start": post: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#display-a-loading-indicator tags: - messaging-api operationId: showLoadingAnimation description: "Display a loading animation in one-on-one chats between users and LINE Official Accounts." requestBody: content: application/json: schema: "$ref": "#/components/schemas/ShowLoadingAnimationRequest" required: true responses: "202": description: "Accepted" content: "application/json": schema: "$ref": "#/components/schemas/ShowLoadingAnimationResponse" "400": description: "An invalid chat ID is specified, or the loadingSeconds value is invalid." content: application/json: schema: "$ref": "#/components/schemas/ErrorResponse" "/v2/bot/chat/markAsRead": post: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#mark-as-read tags: - messaging-api operationId: markMessagesAsReadByToken description: "Mark messages from users as read by token" requestBody: content: application/json: schema: "$ref": "#/components/schemas/MarkMessagesAsReadByTokenRequest" example: markAsReadToken: nz0x74mZT2mRn... required: true responses: "200": description: "OK" "400": description: "An invalid markAsReadToken is specified. Tokens must be used by the bot that received them via Webhook." content: "application/json": schema: "$ref": "#/components/schemas/ErrorResponse" components: securitySchemes: Bearer: type: http scheme: bearer description: "Channel access token" schemas: # Webhook GetWebhookEndpointResponse: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#get-webhook-endpoint-information required: - endpoint - active type: object properties: endpoint: type: string format: uri description: "Webhook URL" active: type: boolean description: |+ Webhook usage status. Send a webhook event from the LINE Platform to the webhook URL only if enabled. `true`: Webhook usage is enabled. `false`: Webhook usage is disabled. SetWebhookEndpointRequest: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#set-webhook-endpoint-url required: - endpoint type: object properties: endpoint: maxLength: 500 minLength: 0 type: string format: uri description: "A valid webhook URL." TestWebhookEndpointRequest: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#test-webhook-endpoint type: object properties: endpoint: maxLength: 500 minLength: 0 type: string format: uri description: "A webhook URL to be validated." TestWebhookEndpointResponse: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#test-webhook-endpoint required: - statusCode - timestamp - reason - detail type: object properties: success: type: boolean description: "Result of the communication from the LINE platform to the webhook URL." timestamp: type: string format: date-time description: |+ Time of the event in milliseconds. Even in the case of a redelivered webhook, it represents the time the event occurred, not the time it was redelivered. statusCode: type: integer format: int32 description: "The HTTP status code. If the webhook response isn't received, the status code is set to zero or a negative number." reason: type: string description: "Reason for the response." detail: type: string description: "Details of the response." # Webhook content GetMessageContentTranscodingResponse: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#verify-video-or-audio-preparation-status description: "Transcoding response" required: - status type: object properties: status: type: string description: |+ The preparation status. One of: `processing`: Preparing to get content. `succeeded`: Ready to get the content. You can get the content sent by users. `failed`: Failed to prepare to get the content. enum: - processing - succeeded - failed # Messaging ReplyMessageRequest: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#send-reply-message required: - messages - replyToken type: object properties: replyToken: type: string description: "replyToken received via webhook." messages: description: "List of messages." maxItems: 5 minItems: 1 type: array items: "$ref": "#/components/schemas/Message" notificationDisabled: "$ref": "#/components/schemas/NotificationDisabled" ReplyMessageResponse: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#send-reply-message-response required: - sentMessages type: object properties: sentMessages: description: "Array of sent messages." maxItems: 5 minItems: 1 type: array items: "$ref": "#/components/schemas/SentMessage" SentMessage: required: - id type: object properties: id: type: string description: "ID of the sent message." quoteToken: type: string description: |+ Quote token of the message. Only included when a message object that can be specified as a quote target was sent as a push or reply message. PushMessageRequest: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#send-push-message required: - messages - to type: object properties: to: type: string description: "ID of the receiver." messages: description: "List of Message objects." maxItems: 5 minItems: 1 type: array items: "$ref": "#/components/schemas/Message" notificationDisabled: "$ref": "#/components/schemas/NotificationDisabled" customAggregationUnits: description: |+ List of aggregation unit name. Case-sensitive. This functions can only be used by corporate users who have submitted the required applications. type: array items: type: string NotificationDisabled: type: boolean default: false description: |+ `true`: The user doesn’t receive a push notification when a message is sent. `false`: The user receives a push notification when the message is sent (unless they have disabled push notifications in LINE and/or their device). The default value is false. PushMessageResponse: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#send-push-message-response required: - sentMessages type: object properties: sentMessages: description: "Array of sent messages." maxItems: 5 minItems: 1 type: array items: "$ref": "#/components/schemas/SentMessage" MulticastRequest: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#send-multicast-message required: - messages - to type: object properties: messages: maxItems: 5 minItems: 1 type: array description: "Messages to send" items: "$ref": "#/components/schemas/Message" to: maxItems: 500 minItems: 1 type: array description: "Array of user IDs. Use userId values which are returned in webhook event objects. Do not use LINE IDs found on LINE." items: type: string notificationDisabled: "$ref": "#/components/schemas/NotificationDisabled" customAggregationUnits: type: array maxItems: 1 description: "Name of aggregation unit. Case-sensitive." items: type: string maxLength: 30 minLength: 1 pattern: "^[a-zA-Z0-9_]{1,30}$" MulticastResponse: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#send-multicast-response type: object NarrowcastRequest: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#send-narrowcast-message required: - messages type: object properties: messages: maxItems: 5 minItems: 1 type: array items: "$ref": "#/components/schemas/Message" description: "List of Message objects." recipient: "$ref": "#/components/schemas/Recipient" filter: "$ref": "#/components/schemas/Filter" limit: "$ref": "#/components/schemas/Limit" notificationDisabled: "$ref": "#/components/schemas/NotificationDisabled" NarrowcastResponse: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#send-narrowcast-response type: object Recipient: type: object description: "Recipient" properties: type: description: "Type of recipient" type: string discriminator: propertyName: type mapping: operator: "#/components/schemas/OperatorRecipient" audience: "#/components/schemas/AudienceRecipient" redelivery: "#/components/schemas/RedeliveryRecipient" OperatorRecipient: type: object allOf: - "$ref": "#/components/schemas/Recipient" - type: object properties: and: type: array items: "$ref": "#/components/schemas/Recipient" description: |+ Create a new recipient object by taking the logical conjunction (AND) of the specified array of recipient objects. or: type: array items: "$ref": "#/components/schemas/Recipient" description: |+ Create a new recipient object by taking the logical disjunction (OR) of the specified array of recipient objects. not: # Create a new recipient object that excludes the specified recipient object. "$ref": "#/components/schemas/Recipient" AudienceRecipient: type: object allOf: - "$ref": "#/components/schemas/Recipient" - type: object properties: audienceGroupId: type: integer format: int64 RedeliveryRecipient: type: object allOf: - "$ref": "#/components/schemas/Recipient" - type: object properties: requestId: type: string Filter: type: object description: "Filter for narrowcast" properties: demographic: $ref: "#/components/schemas/DemographicFilter" DemographicFilter: type: object description: "Demographic filter" properties: type: type: string description: "Type of demographic filter" discriminator: propertyName: type mapping: age: "#/components/schemas/AgeDemographicFilter" appType: "#/components/schemas/AppTypeDemographicFilter" area: "#/components/schemas/AreaDemographicFilter" gender: "#/components/schemas/GenderDemographicFilter" operator: "#/components/schemas/OperatorDemographicFilter" subscriptionPeriod: "#/components/schemas/SubscriptionPeriodDemographicFilter" AgeDemographicFilter: type: object allOf: - "$ref": "#/components/schemas/DemographicFilter" - type: object properties: gte: "$ref": "#/components/schemas/AgeDemographic" lt: "$ref": "#/components/schemas/AgeDemographic" AgeDemographic: type: string enum: - age_15 - age_20 - age_25 - age_30 - age_35 - age_40 - age_45 - age_50 - age_55 - age_60 - age_65 - age_70 AppTypeDemographicFilter: type: object allOf: - "$ref": "#/components/schemas/DemographicFilter" - type: object properties: oneOf: type: array items: "$ref": "#/components/schemas/AppTypeDemographic" AppTypeDemographic: type: string enum: - ios - android AreaDemographicFilter: type: object allOf: - "$ref": "#/components/schemas/DemographicFilter" - type: object properties: oneOf: type: array items: "$ref": "#/components/schemas/AreaDemographic" AreaDemographic: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#send-narrowcast-message type: string enum: - jp_01 - jp_02 - jp_03 - jp_04 - jp_05 - jp_06 - jp_07 - jp_08 - jp_09 - jp_10 - jp_11 - jp_12 - jp_13 - jp_14 - jp_15 - jp_16 - jp_17 - jp_18 - jp_19 - jp_20 - jp_21 - jp_22 - jp_23 - jp_24 - jp_25 - jp_26 - jp_27 - jp_28 - jp_29 - jp_30 - jp_31 - jp_32 - jp_33 - jp_34 - jp_35 - jp_36 - jp_37 - jp_38 - jp_39 - jp_40 - jp_41 - jp_42 - jp_43 - jp_44 - jp_45 - jp_46 - jp_47 - tw_01 - tw_02 - tw_03 - tw_04 - tw_05 - tw_06 - tw_07 - tw_08 - tw_09 - tw_10 - tw_11 - tw_12 - tw_13 - tw_14 - tw_15 - tw_16 - tw_17 - tw_18 - tw_19 - tw_20 - tw_21 - tw_22 - th_01 - th_02 - th_03 - th_04 - th_05 - th_06 - th_07 - th_08 - id_01 - id_02 - id_03 - id_04 - id_05 - id_06 - id_07 - id_08 - id_09 - id_10 - id_11 - id_12 x-enum-varnames: - HOKKAIDO - AOMORI - IWATE - MIYAGI - AKITA - YAMAGATA - FUKUSHIMA - IBARAKI - TOCHIGI - GUNMA - SAITAMA - CHIBA - TOKYO - KANAGAWA - NIIGATA - TOYAMA - ISHIKAWA - FUKUI - YAMANASHI - NAGANO - GIFU - SHIZUOKA - AICHI - MIE - SHIGA - KYOTO - OSAKA - HYOUGO - NARA - WAKAYAMA - TOTTORI - SHIMANE - OKAYAMA - HIROSHIMA - YAMAGUCHI - TOKUSHIMA - KAGAWA - EHIME - KOUCHI - FUKUOKA - SAGA - NAGASAKI - KUMAMOTO - OITA - MIYAZAKI - KAGOSHIMA - OKINAWA - TAIPEI_CITY - NEW_TAIPEI_CITY - TAOYUAN_CITY - TAICHUNG_CITY - TAINAN_CITY - KAOHSIUNG_CITY - KEELUNG_CITY - HSINCHU_CITY - CHIAYI_CITY - HSINCHU_COUNTY - MIAOLI_COUNTY - CHANGHUA_COUNTY - NANTOU_COUNTY - YUNLIN_COUNTY - CHIAYI_COUNTY - PINGTUNG_COUNTY - YILAN_COUNTY - HUALIEN_COUNTY - TAITUNG_COUNTY - PENGHU_COUNTY - KINMEN_COUNTY - LIENCHIANG_COUNTY - BANGKOK - PATTAYA - NORTHERN - CENTRAL - SOUTHERN - EASTERN - NORTHEASTERN - WESTERN - BALI - BANDUNG - BANJARMASIN - JABODETABEK - MAKASSAR - MEDAN - PALEMBANG - SAMARINDA - SEMARANG - SURABAYA - YOGYAKARTA - LAINNYA x-enum-descriptions: - "jp_01: 北海道 // Hokkaido" - "jp_02: 青森県 // Aomori" - "jp_03: 岩手県 // Iwate" - "jp_04: 宮城県 // Miyagi" - "jp_05: 秋田県 // Akita" - "jp_06: 山形県 // Yamagata" - "jp_07: 福島県 // Fukushima" - "jp_08: 茨城県 // Ibaraki" - "jp_09: 栃木県 // Tochigi" - "jp_10: 群馬県 // Gunma" - "jp_11: 埼玉県 // Saitama" - "jp_12: 千葉県 // Chiba" - "jp_13: 東京都 // Tokyo" - "jp_14: 神奈川県 // Kanagawa" - "jp_15: 新潟県 // Niigata" - "jp_16: 富山県 // Toyama" - "jp_17: 石川県 // Ishikawa" - "jp_18: 福井県 // Fukui" - "jp_19: 山梨県 // Yamanashi" - "jp_20: 長野県 // Nagano" - "jp_21: 岐阜県 // Gifu" - "jp_22: 静岡県 // Shizuoka" - "jp_23: 愛知県 // Aichi" - "jp_24: 三重県 // Mie" - "jp_25: 滋賀県 // Shiga" - "jp_26: 京都府 // Kyoto" - "jp_27: 大阪府 // Osaka" - "jp_28: 兵庫県 // Hyougo" - "jp_29: 奈良県 // Nara" - "jp_30: 和歌山県 // Wakayama" - "jp_31: 鳥取県 // Tottori" - "jp_32: 島根県 // Shimane" - "jp_33: 岡山県 // Okayama" - "jp_34: 広島県 // Hiroshima" - "jp_35: 山口県 // Yamaguchi" - "jp_36: 徳島県 // Tokushima" - "jp_37: 香川県 // Kagawa" - "jp_38: 愛媛県 // Ehime" - "jp_39: 高知県 // Kouchi" - "jp_40: 福岡県 // Fukuoka" - "jp_41: 佐賀県 // Saga" - "jp_42: 長崎県 // Nagasaki" - "jp_43: 熊本県 // Kumamoto" - "jp_44: 大分県 // Oita" - "jp_45: 宮崎県 // Miyazaki" - "jp_46: 鹿児島県 // Kagoshima" - "jp_47: 沖縄県 // Okinawa" - "tw_01: 台北市 // Taipei City" - "tw_02: 新北市 // New Taipei City" - "tw_03: 桃園市 // Taoyuan City" - "tw_04: 台中市 // Taichung City" - "tw_05: 台南市 // Tainan City" - "tw_06: 高雄市 // Kaohsiung City" - "tw_07: 基隆市 // Keelung City" - "tw_08: 新竹市 // Hsinchu City" - "tw_09: 嘉義市 // Chiayi City" - "tw_10: 新竹県 // Hsinchu County" - "tw_11: 苗栗県 // Miaoli County" - "tw_12: 彰化県 // Changhua County" - "tw_13: 南投県 // Nantou County" - "tw_14: 雲林県 // Yunlin County" - "tw_15: 嘉義県 // Chiayi County" - "tw_16: 屏東県 // Pingtung County" - "tw_17: 宜蘭県 // Yilan County" - "tw_18: 花蓮県 // Hualien County" - "tw_19: 台東県 // Taitung County" - "tw_20: 澎湖県 // Penghu County" - "tw_21: 金門県 // Kinmen County" - "tw_22: 連江県 // Lienchiang County" - "th_01: バンコク // Bangkok" - "th_02: パタヤ // Pattaya" - "th_03: 北部 // Northern" - "th_04: 中央部 // Central" - "th_05: 南部 // Southern" - "th_06: 東部 // Eastern" - "th_07: 東北部 // NorthEastern" - "th_08: 西部 // Western" - "id_01: バリ // Bali" - "id_02: バンドン // Bandung" - "id_03: バンジャルマシン // Banjarmasin" - "id_04: ジャボデタベック (ジャカルタ首都圏) // Jabodetabek" - "id_06: マカッサル // Makassar" - "id_07: メダン // Medan" - "id_08: パレンバン // Palembang" - "id_09: サマリンダ // Samarinda" - "id_10: スマラン // Semarang" - "id_11: スラバヤ // Surabaya" - "id_12: ジョグジャカルタ // Yogyakarta" - "id_05: その他のエリア // Lainnya" GenderDemographicFilter: type: object allOf: - "$ref": "#/components/schemas/DemographicFilter" - type: object properties: oneOf: type: array items: "$ref": "#/components/schemas/GenderDemographic" GenderDemographic: type: string enum: - male - female OperatorDemographicFilter: type: object allOf: - "$ref": "#/components/schemas/DemographicFilter" - type: object properties: and: type: array items: "$ref": "#/components/schemas/DemographicFilter" or: type: array items: "$ref": "#/components/schemas/DemographicFilter" not: "$ref": "#/components/schemas/DemographicFilter" SubscriptionPeriodDemographicFilter: type: object allOf: - "$ref": "#/components/schemas/DemographicFilter" - type: object properties: gte: "$ref": "#/components/schemas/SubscriptionPeriodDemographic" lt: "$ref": "#/components/schemas/SubscriptionPeriodDemographic" SubscriptionPeriodDemographic: type: string enum: - day_7 - day_30 - day_90 - day_180 - day_365 Limit: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#send-narrowcast-message type: object description: "Limit of the Narrowcast" properties: max: minimum: 1 type: integer format: int32 description: |+ 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. upToRemainingQuota: type: boolean default: false description: |+ If true, the message will be sent within the maximum number of deliverable messages. The default value is `false`. Targets will be selected at random. forbidPartialDelivery: type: boolean default: false description: |+ This option prevents messages from being delivered to only a subset of the target audience. If true, the narrowcast request success but fails asynchronously. You can check whether message delivery was canceled by retrieving the narrowcast message progress. This property can be set to true only if upToRemainingQuota is set to true. NarrowcastProgressResponse: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#get-narrowcast-progress-status required: - phase - acceptedTime type: object properties: phase: type: string enum: - waiting - sending - succeeded - failed description: |+ The current status. One of: `waiting`: Messages are not yet ready to be sent. They are currently being filtered or processed in some way. `sending`: Messages are currently being sent. `succeeded`: Messages were sent successfully. This may not mean the messages were successfully received. `failed`: Messages failed to be sent. Use the failedDescription property to find the cause of the failure. successCount: type: integer format: int64 description: "The number of users who successfully received the message." failureCount: type: integer format: int64 description: "The number of users who failed to send the message." targetCount: type: integer format: int64 description: "The number of intended recipients of the message." failedDescription: type: string description: "The reason the message failed to be sent. This is only included with a `phase` property value of `failed`." errorCode: type: integer format: int64 description: |+ Error summary. This is only included with a phase property value of failed. One of: `1`: An internal error occurred. `2`: An error occurred because there weren't enough recipients. `3`: A conflict error of requests occurs because a request that has already been accepted is retried. `4`: An audience of less than 50 recipients is included as a condition of sending. `5`: Message delivery has been canceled to prevent messages from being delivered only to a subset of the target audience. acceptedTime: type: string format: date-time description: |+ Narrowcast message request accepted time in milliseconds. Format: ISO 8601 (e.g. 2020-12-03T10:15:30.121Z) Timezone: UTC completedTime: type: string format: date-time description: |+ Processing of narrowcast message request completion time in milliseconds. Returned when the phase property is succeeded or failed. Format: ISO 8601 (e.g. 2020-12-03T10:15:30.121Z) Timezone: UTC BroadcastRequest: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#send-broadcast-message required: - messages type: object properties: messages: maxItems: 5 minItems: 1 type: array items: "$ref": "#/components/schemas/Message" description: "List of Message objects." notificationDisabled: "$ref": "#/components/schemas/NotificationDisabled" BroadcastResponse: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#send-broadcast-response type: object # Quota MessageQuotaResponse: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#get-quota required: - type type: object properties: type: "$ref": "#/components/schemas/QuotaType" value: type: integer format: int64 description: |+ The target limit for sending messages in the current month. This property is returned when the `type` property has a value of `limited`. QuotaType: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#get-quota type: string enum: - none - limited description: "One of the following values to indicate whether a target limit is set or not." QuotaConsumptionResponse: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#get-consumption required: - totalUsage type: object properties: totalUsage: type: integer format: int64 description: "The number of sent messages in the current month" # Delivery NumberOfMessagesResponse: required: - status type: object properties: status: type: string enum: - ready - unready - unavailable_for_privacy - out_of_service description: |+ Aggregation process status. One of: `ready`: The number of messages can be obtained. `unready`: We haven't finished calculating the number of sent messages for the specified in date. For example, this property is returned when the delivery date or a future date is specified. Calculation usually takes about a day. `unavailable_for_privacy`: The total number of messages on the specified day is less than 20. `out_of_service`: The specified date is earlier than the date on which we first started calculating sent messages (March 31, 2018). success: type: integer format: int64 description: |+ The number of messages delivered using the phone number on the date specified in `date`. The response has this property only when the value of `status` is `ready`. # Messaging validation ValidateMessageRequest: required: - messages type: object properties: messages: maxItems: 5 minItems: 1 type: array items: "$ref": "#/components/schemas/Message" description: "Array of message objects to validate" # Aggregation Unit GetAggregationUnitUsageResponse: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#get-number-of-units-used-this-month required: - numOfCustomAggregationUnits type: object properties: numOfCustomAggregationUnits: type: integer format: int64 description: "Number of aggregation units used this month." GetAggregationUnitNameListResponse: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#get-name-list-of-units-used-this-month required: - customAggregationUnits type: object properties: customAggregationUnits: type: array items: type: string description: "An array of strings indicating the names of aggregation units used this month." next: type: string description: |+ A continuation token to get the next array of unit names. Returned only when there are remaining aggregation units that weren't returned in customAggregationUnits in the original request. # Users UserProfileResponse: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#get-profile required: - displayName - userId type: object properties: displayName: type: string description: "User's display name" userId: type: string description: "User ID" pictureUrl: type: string format: uri description: "Profile image URL. `https` image URL. Not included in the response if the user doesn't have a profile image." statusMessage: type: string description: "User's status message. Not included in the response if the user doesn't have a status message." language: type: string description: "User's language, as a BCP 47 language tag. Not included in the response if the user hasn't yet consented to the LINE Privacy Policy." example: en GetFollowersResponse: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#get-follower-ids required: - userIds type: object properties: userIds: type: array maxItems: 1000 description: |+ An array of strings indicating user IDs of users that have added the LINE Official Account as a friend. Only users of LINE for iOS and LINE for Android are included in `userIds`. items: type: string next: type: string description: |+ A continuation token to get the next array of user IDs. Returned only when there are remaining user IDs that weren't returned in `userIds` in the original request. The number of user IDs in the `userIds` element doesn't have to reach the maximum number specified by `limit` for the `next` property to be included in the response. # Bot BotInfoResponse: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#get-bot-info required: - userId - basicId - displayName - chatMode - markAsReadMode type: object properties: userId: type: string description: "Bot's user ID" basicId: type: string description: "Bot's basic ID" premiumId: type: string description: "Bot's premium ID. Not included in the response if the premium ID isn't set." displayName: type: string description: "Bot's display name" pictureUrl: type: string format: uri description: "Profile image URL. `https` image URL. Not included in the response if the bot doesn't have a profile image." chatMode: type: string enum: - chat - bot description: |+ Chat settings set in the LINE Official Account Manager. One of: `chat`: Chat is set to "On". `bot`: Chat is set to "Off". markAsReadMode: type: string enum: - auto - manual description: |+ Automatic read setting for messages. If the chat is set to "Off", auto is returned. If the chat is set to "On", manual is returned. `auto`: Auto read setting is enabled. `manual`: Auto read setting is disabled. # Group/Room GroupUserProfileResponse: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#get-group-member-profile required: - displayName - userId type: object properties: displayName: type: string description: "User's display name" userId: type: string description: "User ID" pictureUrl: type: string format: uri description: "Profile image URL. `https` image URL. Not included in the response if the user doesn't have a profile image." RoomUserProfileResponse: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#get-room-member-profile required: - displayName - userId type: object properties: displayName: type: string description: "User's display name" userId: type: string description: "User ID" pictureUrl: type: string format: uri description: "Profile image URL. `https` image URL. Not included in the response if the user doesn't have a profile image." MembersIdsResponse: # https://developers.line.biz/en/reference/messaging-api/#get-group-member-user-ids # https://developers.line.biz/en/reference/messaging-api/#get-room-member-user-ids required: - memberIds type: object properties: memberIds: type: array description: "List of user IDs of members in the group chat. Only users of LINE for iOS and LINE for Android are included in `memberIds`." items: type: string maxItems: 100 next: type: string description: |+ A continuation token to get the next array of user IDs of the members in the group chat. Returned only when there are remaining user IDs that were not returned in `memberIds` in the original request. GroupSummaryResponse: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#get-group-summary required: - groupId - groupName type: object properties: groupId: type: string description: "Group ID" groupName: type: string description: "Group name" pictureUrl: type: string format: uri description: "Group icon URL. Not included in the response if the user doesn't set a group profile icon." GroupMemberCountResponse: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#get-members-group-count required: - count type: object properties: count: type: integer format: int32 description: "The count of members in the group chat. The number returned excludes the LINE Official Account." RoomMemberCountResponse: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#get-members-room-count required: - count type: object properties: count: type: integer format: int32 description: "The count of members in the multi-person chat. The number returned excludes the LINE Official Account." # RichMenu RichMenuRequest: type: object properties: size: "$ref": "#/components/schemas/RichMenuSize" selected: type: boolean description: "`true` to display the rich menu by default. Otherwise, `false`." name: type: string description: "Name of the rich menu. This value can be used to help manage your rich menus and is not displayed to users." maxLength: 300 chatBarText: type: string description: "Text displayed in the chat bar" maxLength: 14 areas: type: array description: "Array of area objects which define the coordinates and size of tappable areas" items: "$ref": "#/components/schemas/RichMenuArea" RichMenuSize: type: object description: "Rich menu size" properties: width: maximum: 2147483647 minimum: 1 type: integer format: int64 description: "width" height: maximum: 2147483647 minimum: 1 type: integer format: int64 description: "height" RichMenuArea: type: object description: "Rich menu area" properties: bounds: "$ref": "#/components/schemas/RichMenuBounds" action: "$ref": "#/components/schemas/Action" RichMenuBounds: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#bounds-object type: object description: "Rich menu bounds" properties: x: maximum: 2147483647 minimum: 0 type: integer format: int64 description: "Horizontal position relative to the top-left corner of the area." y: maximum: 2147483647 minimum: 0 type: integer format: int64 description: "Vertical position relative to the top-left corner of the area." width: maximum: 2147483647 minimum: 1 type: integer format: int64 description: "Width of the area." height: maximum: 2147483647 minimum: 1 type: integer format: int64 description: "Height of the area." RichMenuIdResponse: # https://developers.line.biz/en/reference/messaging-api/#create-rich-menu # https://developers.line.biz/en/reference/messaging-api/#get-rich-menu-id-of-user # https://developers.line.biz/en/reference/messaging-api/#get-default-rich-menu-id required: - richMenuId type: object properties: richMenuId: type: string description: "Rich menu ID" RichMenuResponse: # https://developers.line.biz/en/reference/messaging-api/#get-rich-menu # https://developers.line.biz/en/reference/messaging-api/#get-rich-menu-list required: - richMenuId - size - selected - name - chatBarText - areas type: object properties: richMenuId: type: string description: "ID of a rich menu" size: "$ref": "#/components/schemas/RichMenuSize" selected: type: boolean description: "`true` to display the rich menu by default. Otherwise, `false`." name: type: string description: "Name of the rich menu. This value can be used to help manage your rich menus and is not displayed to users." maxLength: 300 chatBarText: type: string description: "Text displayed in the chat bar" maxLength: 14 areas: type: array items: "$ref": "#/components/schemas/RichMenuArea" description: "Array of area objects which define the coordinates and size of tappable areas" maxItems: 20 RichMenuListResponse: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#get-rich-menu-list required: - richmenus type: object properties: richmenus: type: array items: "$ref": "#/components/schemas/RichMenuResponse" description: "Rich menus" # RichMenu Alias CreateRichMenuAliasRequest: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#create-rich-menu-alias required: - richMenuAliasId - richMenuId type: object properties: richMenuAliasId: type: string description: "Rich menu alias ID, which can be any ID, unique for each channel." maxLength: 32 minLength: 1 pattern: "^[a-z0-9_-]{1,32}$" richMenuId: type: string description: "The rich menu ID to be associated with the rich menu alias." RichMenuAliasResponse: required: - richMenuAliasId - richMenuId type: object properties: richMenuAliasId: type: string description: "Rich menu alias ID." richMenuId: type: string description: "The rich menu ID associated with the rich menu alias." UpdateRichMenuAliasRequest: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#update-rich-menu-alias required: - richMenuId type: object properties: richMenuId: type: string description: "The rich menu ID to be associated with the rich menu alias." RichMenuAliasListResponse: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#get-rich-menu-alias-list required: - aliases type: object properties: aliases: type: array items: "$ref": "#/components/schemas/RichMenuAliasResponse" description: "Rich menu aliases." # User RichMenu RichMenuBulkLinkRequest: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#link-rich-menu-to-users required: - richMenuId - userIds type: object properties: richMenuId: type: string description: "ID of a rich menu" userIds: maxItems: 500 minItems: 1 type: array items: type: string description: "Array of user IDs. Found in the `source` object of webhook event objects. Do not use the LINE ID used in LINE." RichMenuBulkUnlinkRequest: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#unlink-rich-menu-from-users required: - userIds type: object properties: userIds: maxItems: 500 minItems: 1 type: array items: type: string description: "Array of user IDs. Found in the `source` object of webhook event objects. Do not use the LINE ID used in LINE." RichMenuBatchRequest: type: object required: - operations properties: operations: type: array items: "$ref": "#/components/schemas/RichMenuBatchOperation" description: "Array of Rich menu operation object..." maxItems: 1000 resumeRequestKey: type: string description: "Key for retry. Key value is a string matching the regular expression pattern" maxLength: 100 minLength: 1 pattern: "^[a-zA-Z0-9_-]{1,100}$" RichMenuBatchOperation: description: "Rich menu operation object represents the batch operation to the rich menu linked to the user." externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#batch-control-rich-menus-of-users-operations required: - type type: object properties: type: type: string description: "The type of operation to the rich menu linked to the user. One of link, unlink, or unlinkAll." discriminator: propertyName: type mapping: link: "#/components/schemas/RichMenuBatchLinkOperation" unlink: "#/components/schemas/RichMenuBatchUnlinkOperation" unlinkAll: "#/components/schemas/RichMenuBatchUnlinkAllOperation" RichMenuBatchLinkOperation: description: "Replace the rich menu with the rich menu specified in the `to` property for all users linked to the rich menu specified in the `from` property." type: object required: - from - to allOf: - "$ref": "#/components/schemas/RichMenuBatchOperation" - type: object properties: from: type: string to: type: string RichMenuBatchUnlinkOperation: description: "Unlink the rich menu for all users linked to the rich menu specified in the `from` property." type: object required: - from allOf: - "$ref": "#/components/schemas/RichMenuBatchOperation" - type: object properties: from: type: string RichMenuBatchUnlinkAllOperation: description: "Unlink the rich menu from all users linked to the rich menu." type: object allOf: - "$ref": "#/components/schemas/RichMenuBatchOperation" RichMenuBatchProgressResponse: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#get-batch-control-rich-menus-progress-status-response required: - phase - acceptedTime type: object properties: phase: "$ref": "#/components/schemas/RichMenuBatchProgressPhase" acceptedTime: type: string format: date-time description: |+ The accepted time in milliseconds of the request of batch control the rich menu. Format: ISO 8601 (e.g. 2023-06-08T10:15:30.121Z) Timezone: UTC completedTime: type: string format: date-time description: |+ The completed time in milliseconds of rich menu batch control. Returned when the phase property is succeeded or failed. Format: ISO 8601 (e.g. 2023-06-08T10:15:30.121Z) Timezone: UTC RichMenuBatchProgressPhase: type: string description: |+ The current status. One of: `ongoing`: Rich menu batch control is in progress. `succeeded`: Rich menu batch control is complete. `failed`: Rich menu batch control failed. This means that the rich menu for one or more users couldn't be controlled. There may also be users whose operations have been successfully completed. enum: - ongoing - succeeded - failed # Account link IssueLinkTokenResponse: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#issue-link-token required: - linkToken type: object properties: linkToken: type: string description: |+ Link token. Link tokens are valid for 10 minutes and can only be used once. # Optional APIs MarkMessagesAsReadRequest: externalDocs: url: https://developers.line.biz/en/reference/partner-docs/#mark-messages-from-users-as-read required: - chat type: object properties: chat: "$ref": "#/components/schemas/ChatReference" ChatReference: externalDocs: url: https://developers.line.biz/en/reference/partner-docs/#mark-messages-from-users-as-read required: - userId type: object description: "Chat reference" properties: userId: type: string description: "The target user ID" PnpMessagesRequest: externalDocs: url: https://developers.line.biz/en/reference/partner-docs/#send-line-notification-message required: - messages - to type: object properties: messages: maxItems: 5 minItems: 1 type: array items: "$ref": "#/components/schemas/Message" description: "Message to be sent." to: type: string description: "Message destination. Specify a phone number that has been normalized to E.164 format and hashed with SHA256." notificationDisabled: "$ref": "#/components/schemas/NotificationDisabled" # Message objects Message: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#message-common-properties required: - type type: object properties: type: type: string description: "Type of message" quickReply: "$ref": "#/components/schemas/QuickReply" sender: "$ref": "#/components/schemas/Sender" discriminator: propertyName: type mapping: text: "#/components/schemas/TextMessage" textV2: "#/components/schemas/TextMessageV2" sticker: "#/components/schemas/StickerMessage" image: "#/components/schemas/ImageMessage" video: "#/components/schemas/VideoMessage" audio: "#/components/schemas/AudioMessage" location: "#/components/schemas/LocationMessage" imagemap: "#/components/schemas/ImagemapMessage" template: "#/components/schemas/TemplateMessage" flex: "#/components/schemas/FlexMessage" coupon: "#/components/schemas/CouponMessage" QuickReply: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#items-object type: object description: "Quick reply" properties: items: type: array maxItems: 13 items: "$ref": "#/components/schemas/QuickReplyItem" description: "Quick reply button objects." QuickReplyItem: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#items-object type: object properties: imageUrl: type: string format: uri description: "URL of the icon that is displayed at the beginning of the button" maxLength: 2000 action: "$ref": "#/components/schemas/Action" type: type: string description: "`action`" default: "action" Sender: type: object description: "Change icon and display name" properties: name: type: string description: "Display name. Certain words such as `LINE` may not be used." maxLength: 20 iconUrl: type: string format: uri description: "URL of the image to display as an icon when sending a message" maxLength: 2000 TextMessage: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#text-message type: object required: - text allOf: - "$ref": "#/components/schemas/Message" - type: object properties: text: type: string emojis: type: array items: "$ref": "#/components/schemas/Emoji" quoteToken: type: string description: "Quote token of the message you want to quote." Emoji: type: object properties: index: type: integer format: int32 productId: type: string emojiId: type: string TextMessageV2: externalDocs: url: "https://developers.line.biz/en/reference/messaging-api/#text-message-v2" type: object required: - text allOf: - "$ref": "#/components/schemas/Message" - type: object properties: text: type: string substitution: type: object additionalProperties: $ref: "#/components/schemas/SubstitutionObject" description: "A mapping that specifies substitutions for parts enclosed in {} within the `text` field." quoteToken: type: string description: "Quote token of the message you want to quote." SubstitutionObject: description: "An object that defines the replacement value for a placeholder in the text." type: object properties: type: description: "Type of substitution object" type: string discriminator: propertyName: type mapping: mention: "#/components/schemas/MentionSubstitutionObject" emoji: "#/components/schemas/EmojiSubstitutionObject" required: - type MentionSubstitutionObject: externalDocs: url: "https://developers.line.biz/en/reference/messaging-api/#text-message-v2-mention-object" description: "An object representing a mention substitution." allOf: - $ref: "#/components/schemas/SubstitutionObject" - type: object properties: mentionee: $ref: "#/components/schemas/MentionTarget" required: - mentionee MentionTarget: type: object properties: type: description: "Target to be mentioned" type: string discriminator: propertyName: type mapping: user: "#/components/schemas/UserMentionTarget" all: "#/components/schemas/AllMentionTarget" required: - type UserMentionTarget: externalDocs: url: "https://developers.line.biz/en/reference/messaging-api/#text-message-v2-mentionee-user" allOf: - $ref: "#/components/schemas/MentionTarget" - type: object properties: userId: type: string required: - userId AllMentionTarget: externalDocs: url: "https://developers.line.biz/en/reference/messaging-api/#text-message-v2-mentionee-all" allOf: - $ref: "#/components/schemas/MentionTarget" EmojiSubstitutionObject: externalDocs: url: "https://developers.line.biz/en/reference/messaging-api/#text-message-v2-emoji-object" description: "An object representing a emoji substitution." allOf: - $ref: "#/components/schemas/SubstitutionObject" - type: object properties: productId: type: string emojiId: type: string required: - productId - emojiId StickerMessage: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#sticker-message type: object required: - packageId - stickerId allOf: - "$ref": "#/components/schemas/Message" - type: object properties: packageId: type: string stickerId: type: string quoteToken: type: string description: "Quote token of the message you want to quote." ImageMessage: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#image-message required: - originalContentUrl - previewImageUrl type: object allOf: - "$ref": "#/components/schemas/Message" - type: object properties: originalContentUrl: type: string format: uri previewImageUrl: type: string format: uri VideoMessage: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#video-message type: object required: - originalContentUrl - previewImageUrl allOf: - "$ref": "#/components/schemas/Message" - type: object properties: originalContentUrl: type: string format: uri previewImageUrl: type: string format: uri trackingId: type: string AudioMessage: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#audio-message type: object required: - originalContentUrl - duration allOf: - "$ref": "#/components/schemas/Message" - type: object properties: originalContentUrl: type: string format: uri duration: type: integer format: int64 LocationMessage: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#location-message required: - title - address - latitude - longitude type: object allOf: - "$ref": "#/components/schemas/Message" - type: object properties: title: type: string address: type: string latitude: type: number format: double longitude: type: number format: double ImagemapMessage: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#imagemap-message type: object required: - baseUrl - altText - baseSize - actions allOf: - "$ref": "#/components/schemas/Message" - type: object properties: baseUrl: type: string format: uri altText: type: string baseSize: "$ref": "#/components/schemas/ImagemapBaseSize" actions: type: array items: "$ref": "#/components/schemas/ImagemapAction" video: "$ref": "#/components/schemas/ImagemapVideo" ImagemapBaseSize: type: object required: - width - height properties: height: type: integer format: int32 width: type: integer format: int32 ImagemapAction: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#imagemap-action-objects required: - type - area type: object properties: type: type: string area: "$ref": "#/components/schemas/ImagemapArea" discriminator: propertyName: type mapping: message: "#/components/schemas/MessageImagemapAction" uri: "#/components/schemas/URIImagemapAction" clipboard: "#/components/schemas/ClipboardImagemapAction" MessageImagemapAction: type: object required: - text allOf: - "$ref": "#/components/schemas/ImagemapAction" - type: object properties: text: type: string label: type: string URIImagemapAction: type: object required: - linkUri allOf: - "$ref": "#/components/schemas/ImagemapAction" - type: object properties: linkUri: type: string label: type: string ClipboardImagemapAction: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#imagemap-clipboard-action-object type: object required: - clipboardText allOf: - "$ref": "#/components/schemas/ImagemapAction" - type: object properties: clipboardText: description: |+ Text that is copied to the clipboard. Max character limit: 1000 maxLength: 1000 minLength: 1 type: string label: type: string ImagemapArea: type: object required: - x - y - width - height properties: x: type: integer format: int32 y: type: integer format: int32 width: type: integer format: int32 height: type: integer format: int32 ImagemapVideo: type: object properties: originalContentUrl: type: string format: uri previewImageUrl: type: string format: uri area: "$ref": "#/components/schemas/ImagemapArea" externalLink: "$ref": "#/components/schemas/ImagemapExternalLink" ImagemapExternalLink: type: object properties: linkUri: type: string format: uri label: type: string TemplateMessage: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#template-messages type: object required: - altText - template allOf: - "$ref": "#/components/schemas/Message" - type: object properties: altText: type: string template: "$ref": "#/components/schemas/Template" Template: required: - type type: object properties: type: type: string discriminator: propertyName: type mapping: buttons: "#/components/schemas/ButtonsTemplate" confirm: "#/components/schemas/ConfirmTemplate" carousel: "#/components/schemas/CarouselTemplate" image_carousel: "#/components/schemas/ImageCarouselTemplate" ButtonsTemplate: type: object required: - text - actions allOf: - "$ref": "#/components/schemas/Template" - type: object properties: thumbnailImageUrl: type: string format: uri imageAspectRatio: type: string imageSize: type: string imageBackgroundColor: type: string title: type: string text: type: string defaultAction: "$ref": "#/components/schemas/Action" actions: type: array items: "$ref": "#/components/schemas/Action" TemplateImageAspectRatio: type: string description: |+ Aspect ratio of the image. This is only for the `imageAspectRatio` in ButtonsTemplate. Specify one of the following values: `rectangle`: 1.51:1 `square`: 1:1 enum: - rectangle - square TemplateImageSize: type: string description: |+ Size of the image. This is only for the `imageSize` in ButtonsTemplate. Specify one of the following values: `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. enum: - cover - contain ConfirmTemplate: type: object required: - text - actions allOf: - "$ref": "#/components/schemas/Template" - type: object properties: text: type: string actions: type: array items: "$ref": "#/components/schemas/Action" CarouselTemplate: type: object required: - columns allOf: - "$ref": "#/components/schemas/Template" - type: object properties: columns: type: array items: "$ref": "#/components/schemas/CarouselColumn" imageAspectRatio: type: string imageSize: type: string CarouselColumn: description: "Column object for carousel template." type: object required: - text - actions properties: thumbnailImageUrl: type: string format: uri imageBackgroundColor: type: string title: type: string text: type: string defaultAction: "$ref": "#/components/schemas/Action" actions: type: array items: "$ref": "#/components/schemas/Action" ImageCarouselTemplate: type: object required: - columns allOf: - "$ref": "#/components/schemas/Template" - type: object properties: columns: type: array items: "$ref": "#/components/schemas/ImageCarouselColumn" ImageCarouselColumn: type: object required: - imageUrl - action properties: imageUrl: type: string format: uri action: "$ref": "#/components/schemas/Action" CouponMessage: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#coupon-message required: - couponId type: object allOf: - "$ref": "#/components/schemas/Message" - type: object properties: couponId: type: string description: "Unique identifier of the coupon." deliveryTag: type: string maxLength: 30 description: "Delivery route tag information. It can be used for analysis in LINE OA Manager." FlexMessage: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#flex-message type: object required: - altText - contents allOf: - "$ref": "#/components/schemas/Message" - type: object properties: altText: type: string contents: "$ref": "#/components/schemas/FlexContainer" FlexContainer: required: - type type: object properties: type: type: string discriminator: propertyName: type mapping: bubble: "#/components/schemas/FlexBubble" carousel: "#/components/schemas/FlexCarousel" FlexBubble: type: object allOf: - "$ref": "#/components/schemas/FlexContainer" - type: object properties: direction: type: string enum: - ltr - rtl styles: "$ref": "#/components/schemas/FlexBubbleStyles" header: "$ref": "#/components/schemas/FlexBox" hero: "$ref": "#/components/schemas/FlexComponent" body: "$ref": "#/components/schemas/FlexBox" footer: "$ref": "#/components/schemas/FlexBox" size: type: string enum: - nano - micro - deca - hecto - kilo - mega - giga action: "$ref": "#/components/schemas/Action" FlexCarousel: type: object required: - contents allOf: - "$ref": "#/components/schemas/FlexContainer" - type: object properties: contents: type: array items: "$ref": "#/components/schemas/FlexBubble" FlexBubbleStyles: type: object properties: header: "$ref": "#/components/schemas/FlexBlockStyle" hero: "$ref": "#/components/schemas/FlexBlockStyle" body: "$ref": "#/components/schemas/FlexBlockStyle" footer: "$ref": "#/components/schemas/FlexBlockStyle" FlexBlockStyle: type: object properties: backgroundColor: type: string separator: type: boolean separatorColor: type: string FlexComponent: required: - type type: object properties: type: type: string discriminator: propertyName: type mapping: box: "#/components/schemas/FlexBox" button: "#/components/schemas/FlexButton" image: "#/components/schemas/FlexImage" video: "#/components/schemas/FlexVideo" icon: "#/components/schemas/FlexIcon" text: "#/components/schemas/FlexText" span: "#/components/schemas/FlexSpan" separator: "#/components/schemas/FlexSeparator" filler: "#/components/schemas/FlexFiller" FlexBox: type: object required: - layout - contents allOf: - "$ref": "#/components/schemas/FlexComponent" - properties: layout: type: string enum: - horizontal - vertical - baseline flex: type: integer format: int32 contents: type: array items: "$ref": "#/components/schemas/FlexComponent" spacing: type: string margin: type: string position: type: string enum: - relative - absolute offsetTop: type: string offsetBottom: type: string offsetStart: type: string offsetEnd: type: string backgroundColor: type: string borderColor: type: string borderWidth: type: string cornerRadius: type: string width: type: string maxWidth: type: string height: type: string maxHeight: type: string paddingAll: type: string paddingTop: type: string paddingBottom: type: string paddingStart: type: string paddingEnd: type: string action: "$ref": "#/components/schemas/Action" justifyContent: type: string enum: - center - flex-start - flex-end - space-between - space-around - space-evenly alignItems: type: string enum: - center - flex-start - flex-end background: "$ref": "#/components/schemas/FlexBoxBackground" FlexBoxBorderWidth: type: string description: |+ Width of box border. This is only for `borderWidth` in FlexBox. A value of none means that borders are not rendered; the other values are listed in order of increasing width. enum: - none - light - normal - medium - semi-bold - bold FlexBoxCornerRadius: type: string description: |+ Radius at the time of rounding the corners of the box. This is only for `cornerRadius` in FlexBox. A value of none means that corners are not rounded; the other values are listed in order of increasing radius. enum: - none - xs - sm - md - lg - xl - xxl FlexBoxSpacing: type: string description: |+ You can specify the minimum space between two components with the `spacing` property of the parent box component, in pixels or with a keyword. FlexBoxSpacing just provides only keywords. enum: - none - xs - sm - md - lg - xl - xxl FlexMargin: type: string description: |+ You can specify the minimum space before a child component with the `margin` property of the child component, in pixels or with a keyword. FlexMargin just provides only keywords. enum: - none - xs - sm - md - lg - xl - xxl FlexBoxPadding: type: string description: |+ Padding can be specified in pixels, percentage (to the parent box width) or with a keyword. FlexBoxPadding just provides only keywords. enum: - none - xs - sm - md - lg - xl - xxl FlexImageSize: type: string description: |+ You can set the width of an Flex image component with the `size` property, in pixels, as a percentage, or with a keyword. FlexImageSize just provides only keywords. enum: - xxs - xs - sm - md - lg - xl - xxl - 3xl - 4xl - 5xl - full FlexIconSize: type: string description: |+ You can set the width of an Flex icon component with the `size` property, in pixels, as a percentage, or with a keyword. FlexIconSize just provides only keywords. enum: - xxs - xs - sm - md - lg - xl - xxl - 3xl - 4xl - 5xl FlexTextFontSize: type: string description: |+ Font size in the `size` property of the Flex text component. You can specify the size in pixels or with a keyword. FlexTextFontSize just provides only keywords. enum: - xxs - xs - sm - md - lg - xl - xxl - 3xl - 4xl - 5xl FlexSpanSize: type: string description: |+ Font size in the `size` property of the Flex span component. You can specify the size in pixels or with a keyword. FlexSpanSize just provides only keywords. enum: - xxs - xs - sm - md - lg - xl - xxl - 3xl - 4xl - 5xl FlexOffset: type: string description: |+ You can specify the offset of a component with the `offset*` property, in pixels or with a keyword. You can also specify the percentage to the box width for `offsetStart` and `offsetEnd` and to the box height for `offsetTop` and `offsetBottom`. FlexOffset just provides only keywords. enum: - none - xs - sm - md - lg - xl - xxl FlexButton: type: object required: - action allOf: - "$ref": "#/components/schemas/FlexComponent" - type: object properties: flex: type: integer format: int32 color: type: string style: type: string enum: - primary - secondary - link action: "$ref": "#/components/schemas/Action" gravity: type: string enum: - top - bottom - center margin: type: string position: type: string enum: - relative - absolute offsetTop: type: string offsetBottom: type: string offsetStart: type: string offsetEnd: type: string height: type: string enum: - md - sm adjustMode: type: string enum: - shrink-to-fit scaling: type: boolean FlexImage: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#f-image type: object required: - type - url allOf: - "$ref": "#/components/schemas/FlexComponent" - type: object properties: url: type: string format: uri description: |+ Image URL (Max character limit: 2000) Protocol: HTTPS (TLS 1.2 or later) Image format: JPEG or PNG Maximum image size: 1024×1024 pixels Maximum file size: 10 MB (300 KB when the animated property is true) flex: type: integer format: int32 description: "The ratio of the width or height of this component within the parent box." margin: type: string description: |+ The minimum amount of space to include before this component in its parent container. position: type: string enum: - relative - absolute description: |+ Reference for offsetTop, offsetBottom, offsetStart, and offsetEnd. 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. offsetTop: type: string description: "Offset." offsetBottom: type: string description: "Offset." offsetStart: type: string description: "Offset." offsetEnd: type: string description: "Offset." align: type: string enum: - start - end - center description: |+ Alignment style in horizontal direction. gravity: type: string enum: - top - bottom - center description: "Alignment style in vertical direction." size: type: string default: md description: |+ The maximum image width. This is md by default. aspectRatio: type: string description: |+ Aspect ratio of the image. `{width}:{height}` format. Specify the value of `{width}` and `{height}` in the range from `1` to `100000`. However, you cannot set `{height}` to a value that is more than three times the value of `{width}`. The default value is `1:1`. aspectMode: type: string enum: - fit - cover description: |+ The display style of the image if the aspect ratio of the image and that specified by the aspectRatio property do not match. backgroundColor: type: string description: "Background color of the image. Use a hexadecimal color code." action: "$ref": "#/components/schemas/Action" animated: type: boolean default: false description: |+ When this is `true`, an animated image (APNG) plays. You can specify a value of true up to 10 images in a single message. You can't send messages that exceed this limit. This is `false` by default. Animated images larger than 300 KB aren't played back. FlexVideo: type: object required: - url - previewUrl - altContent allOf: - "$ref": "#/components/schemas/FlexComponent" - type: object properties: url: type: string format: uri previewUrl: type: string format: uri altContent: "$ref": "#/components/schemas/FlexComponent" aspectRatio: type: string action: "$ref": "#/components/schemas/Action" FlexIcon: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#icon type: object required: - url allOf: - "$ref": "#/components/schemas/FlexComponent" - type: object properties: url: type: string format: uri size: type: string aspectRatio: type: string margin: type: string position: type: string enum: - relative - absolute offsetTop: type: string offsetBottom: type: string offsetStart: type: string offsetEnd: type: string scaling: type: boolean FlexText: type: object allOf: - "$ref": "#/components/schemas/FlexComponent" - type: object properties: flex: type: integer format: int32 text: type: string size: type: string align: type: string enum: - start - end - center gravity: type: string enum: - top - bottom - center color: type: string weight: type: string enum: - regular - bold style: type: string enum: - normal - italic decoration: type: string enum: - none - underline - line-through wrap: type: boolean lineSpacing: type: string margin: type: string position: type: string enum: - relative - absolute offsetTop: type: string offsetBottom: type: string offsetStart: type: string offsetEnd: type: string action: "$ref": "#/components/schemas/Action" maxLines: type: integer format: int32 contents: type: array items: "$ref": "#/components/schemas/FlexSpan" adjustMode: type: string enum: - shrink-to-fit scaling: type: boolean FlexSpan: type: object allOf: - "$ref": "#/components/schemas/FlexComponent" - type: object properties: text: type: string size: type: string color: type: string weight: type: string enum: - regular - bold style: type: string enum: - normal - italic decoration: type: string enum: - none - underline - line-through FlexSeparator: type: object allOf: - "$ref": "#/components/schemas/FlexComponent" - type: object properties: margin: type: string color: type: string FlexFiller: type: object allOf: - "$ref": "#/components/schemas/FlexComponent" - type: object properties: flex: type: integer format: int32 FlexBoxBackground: required: - type type: object properties: type: type: string discriminator: propertyName: type mapping: linearGradient: "#/components/schemas/FlexBoxLinearGradient" FlexBoxLinearGradient: type: object allOf: - "$ref": "#/components/schemas/FlexBoxBackground" - type: object properties: angle: type: string startColor: type: string endColor: type: string centerColor: type: string centerPosition: type: string # Action objects Action: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#action-objects description: "Action" type: object properties: type: type: string description: "Type of action" label: type: string description: "Label for the action." discriminator: propertyName: type mapping: camera: "#/components/schemas/CameraAction" cameraRoll: "#/components/schemas/CameraRollAction" clipboard: "#/components/schemas/ClipboardAction" datetimepicker: "#/components/schemas/DatetimePickerAction" location: "#/components/schemas/LocationAction" message: "#/components/schemas/MessageAction" postback: "#/components/schemas/PostbackAction" richmenuswitch: "#/components/schemas/RichMenuSwitchAction" uri: "#/components/schemas/URIAction" CameraAction: type: object allOf: - "$ref": "#/components/schemas/Action" CameraRollAction: type: object allOf: - "$ref": "#/components/schemas/Action" ClipboardAction: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#clipboard-action type: object allOf: - "$ref": "#/components/schemas/Action" - type: object required: - clipboardText properties: clipboardText: description: |+ Text that is copied to the clipboard. Max character limit: 1000 maxLength: 1000 minLength: 1 type: string DatetimePickerAction: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#datetime-picker-action type: object allOf: - "$ref": "#/components/schemas/Action" - type: object properties: data: maxLength: 300 minLength: 0 type: string mode: type: string enum: - date - time - datetime initial: type: string max: type: string min: type: string LocationAction: type: object allOf: - "$ref": "#/components/schemas/Action" MessageAction: type: object allOf: - "$ref": "#/components/schemas/Action" - type: object properties: text: type: string PostbackAction: type: object allOf: - "$ref": "#/components/schemas/Action" - type: object properties: data: maxLength: 300 minLength: 0 type: string displayText: type: string text: type: string inputOption: type: string enum: - closeRichMenu - openRichMenu - openKeyboard - openVoice fillInText: type: string RichMenuSwitchAction: type: object allOf: - "$ref": "#/components/schemas/Action" - type: object properties: data: maxLength: 300 minLength: 0 type: string richMenuAliasId: maxLength: 32 minLength: 0 type: string URIAction: type: object allOf: - "$ref": "#/components/schemas/Action" - type: object properties: uri: type: string format: uri altUri: "$ref": "#/components/schemas/AltUri" AltUri: type: object properties: desktop: maxLength: 1000 minLength: 0 type: string # Membership GetMembershipSubscriptionResponse: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#get-a-users-membership-subscription-status description: "A user's membership subscription status" required: - subscriptions type: object properties: subscriptions: type: array minItems: 0 description: "List of subscription information" items: "$ref": "#/components/schemas/Subscription" MembershipListResponse: description: "List of memberships" required: - memberships type: object properties: memberships: type: array minItems: 0 description: "List of membership information" items: "$ref": "#/components/schemas/Membership" GetJoinedMembershipUsersResponse: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#get-membership-user-ids description: "List of users who have joined the membership" required: - userIds type: object properties: userIds: type: array maxItems: 1000 description: |+ A list of user IDs who joined the membership. Users who have not agreed to the bot user agreement, are not following the bot, or are not active will be excluded. If there are no users in the membership, an empty list will be returned. items: type: string next: type: string description: |+ A continuation token to get next remaining membership user IDs. Returned only when there are remaining user IDs that weren't returned in the userIds property in the previous request. The continuation token expires in 24 hours (86,400 seconds). Subscription: description: "An array of memberships." required: - membership - user type: object properties: membership: "$ref": "#/components/schemas/SubscribedMembershipPlan" user: "$ref": "#/components/schemas/SubscribedMembershipUser" SubscribedMembershipPlan: description: "Object containing information about the membership plan." type: object required: - membershipId - title - description - benefits - price - currency properties: membershipId: type: integer description: "Membership plan ID." title: type: string description: "Membership plan name." description: type: string description: "Membership plan description." benefits: type: array minItems: 1 items: type: string description: "List of membership plan perks." price: type: number format: double example: 500.00 description: "Monthly fee for membership plan. (e.g. 1500.00)" currency: type: string description: "The currency of membership.price." enum: - JPY - TWD - THB SubscribedMembershipUser: description: "Object containing user membership subscription information." type: object required: - membershipNo - joinedTime - nextBillingDate - totalSubscriptionMonths properties: membershipNo: type: integer description: "The user's member number in the membership plan." joinedTime: type: integer description: "UNIX timestamp at which the user subscribed to the membership." nextBillingDate: type: string description: | Next payment date for membership plan. - Format: yyyy-MM-dd (e.g. 2024-02-08) - Timezone: UTC+9 totalSubscriptionMonths: type: integer description: "The period of time in months that the user has been subscribed to a membership plan. If a user previously canceled and then re-subscribed to the same membership plan, only the period after the re-subscription will be counted." Membership: required: - membershipId - title - description - benefits - price - currency - memberCount - memberLimit - isInAppPurchase - isPublished type: object properties: membershipId: type: integer description: "Membership plan ID." title: type: string description: "Membership plan name." description: type: string description: "Membership plan description." benefits: type: array minItems: 1 items: type: string description: "List of membership plan perks." price: type: number format: double example: 500.00 description: "Monthly fee for membership plan. (e.g. 1500.00)" currency: type: string description: "The currency of membership.price." enum: - JPY - TWD - THB memberCount: type: integer example: 100 description: "Number of members subscribed to the membership plan." memberLimit: type: integer nullable: true example: 1000 description: "The upper limit of members who can subscribe. If no upper limit is set, it will be null." isInAppPurchase: type: boolean description: "Payment method for users who subscribe to a membership plan." isPublished: type: boolean description: "Membership plan status." # Coupon APIs CouponCreateRequest: description: "Request object for creating a coupon. Contains all configurable coupon properties." required: - acquisitionCondition - endTimestamp - maxUseCountPerTicket - startTimestamp - title - visibility - timezone type: object properties: acquisitionCondition: $ref: "#/components/schemas/AcquisitionConditionRequest" barcodeImageUrl: type: string description: "URL of the barcode image associated with the coupon. Used for in-store redemption." couponCode: type: string description: "Unique code to be presented by the user to redeem the coupon. Optional." description: maxLength: 1000 minLength: 0 type: string description: "Detailed description of the coupon. Displayed to users." endTimestamp: type: integer format: int64 description: "Coupon expiration time (epoch seconds). Coupon cannot be used after this time." imageUrl: type: string description: "URL of the main image representing the coupon. Displayed in the coupon list." maxUseCountPerTicket: type: integer format: int32 maximum: 1 description: "Maximum number of times a single coupon ticket can be used. Use -1 to indicate no limit." startTimestamp: type: integer format: int64 description: "Coupon start time (epoch seconds). Coupon can be used from this time." title: maxLength: 60 minLength: 1 type: string description: "Title of the coupon. Displayed in the coupon list." usageCondition: maxLength: 100 minLength: 0 type: string description: "Conditions for using the coupon. Shown to users." reward: $ref: "#/components/schemas/CouponRewardRequest" visibility: type: string description: "Visibility of the coupon. Determines who can see or acquire the coupon." enum: - UNLISTED - PUBLIC timezone: type: string description: "Timezone for interpreting start and end timestamps." enum: - ETC_GMT_MINUS_12 - ETC_GMT_MINUS_11 - PACIFIC_HONOLULU - AMERICA_ANCHORAGE - AMERICA_LOS_ANGELES - AMERICA_PHOENIX - AMERICA_CHICAGO - AMERICA_NEW_YORK - AMERICA_CARACAS - AMERICA_SANTIAGO - AMERICA_ST_JOHNS - AMERICA_SAO_PAULO - ETC_GMT_MINUS_2 - ATLANTIC_CAPE_VERDE - EUROPE_LONDON - EUROPE_PARIS - EUROPE_ISTANBUL - EUROPE_MOSCOW - ASIA_TEHRAN - ASIA_TBILISI - ASIA_KABUL - ASIA_TASHKENT - ASIA_COLOMBO - ASIA_KATHMANDU - ASIA_ALMATY - ASIA_RANGOON - ASIA_BANGKOK - ASIA_TAIPEI - ASIA_TOKYO - AUSTRALIA_DARWIN - AUSTRALIA_SYDNEY - ASIA_VLADIVOSTOK - ETC_GMT_PLUS_12 - PACIFIC_TONGATAPU AcquisitionConditionRequest: type: object required: - type properties: type: type: string description: "Determines how the coupon is distributed or used." discriminator: propertyName: type mapping: normal: "#/components/schemas/NormalAcquisitionConditionRequest" lottery: "#/components/schemas/LotteryAcquisitionConditionRequest" NormalAcquisitionConditionRequest: type: object allOf: - "$ref": "#/components/schemas/AcquisitionConditionRequest" LotteryAcquisitionConditionRequest: type: object allOf: - "$ref": "#/components/schemas/AcquisitionConditionRequest" - type: object required: - lotteryProbability - maxAcquireCount properties: lotteryProbability: maximum: 99 minimum: 1 type: integer format: int32 description: "Probability (1-99) of winning the coupon in lottery-type campaigns." maxAcquireCount: type: integer format: int32 maximum: 999999 description: "Maximum number of coupons that can be issued in total. Use -1 to indicate no limit" CouponRewardRequest: type: object required: - type properties: type: type: string description: "Type of coupon. Determines the benefit provided." discriminator: propertyName: type mapping: cashBack: "#/components/schemas/CouponCashBackRewardRequest" discount: "#/components/schemas/CouponDiscountRewardRequest" free: "#/components/schemas/CouponFreeRewardRequest" gift: "#/components/schemas/CouponGiftRewardRequest" others: "#/components/schemas/CouponOthersRewardRequest" CouponCashBackRewardRequest: type: object allOf: - "$ref": "#/components/schemas/CouponRewardRequest" - type: object properties: priceInfo: $ref: "#/components/schemas/CashBackPriceInfoRequest" CouponDiscountRewardRequest: type: object allOf: - "$ref": "#/components/schemas/CouponRewardRequest" - type: object properties: priceInfo: $ref: "#/components/schemas/DiscountPriceInfoRequest" CouponFreeRewardRequest: type: object allOf: - "$ref": "#/components/schemas/CouponRewardRequest" CouponGiftRewardRequest: type: object allOf: - "$ref": "#/components/schemas/CouponRewardRequest" CouponOthersRewardRequest: type: object allOf: - "$ref": "#/components/schemas/CouponRewardRequest" CashBackPriceInfoRequest: type: object required: - type properties: type: type: string discriminator: propertyName: type mapping: fixed: "#/components/schemas/CashBackFixedPriceInfoRequest" percentage: "#/components/schemas/CashBackPercentagePriceInfoRequest" CashBackFixedPriceInfoRequest: type: object allOf: - "$ref": "#/components/schemas/CashBackPriceInfoRequest" - type: object properties: fixedAmount: type: integer format: int64 CashBackPercentagePriceInfoRequest: type: object allOf: - "$ref": "#/components/schemas/CashBackPriceInfoRequest" - type: object properties: percentage: maximum: 99 minimum: 1 type: integer format: int32 description: "Specifies the cashback rate as a percentage. Must be an integer between 1 and 99." DiscountPriceInfoRequest: type: object required: - type properties: type: type: string discriminator: propertyName: type mapping: fixed: "#/components/schemas/DiscountFixedPriceInfoRequest" percentage: "#/components/schemas/DiscountPercentagePriceInfoRequest" explicit: "#/components/schemas/DiscountExplicitPriceInfoRequest" DiscountFixedPriceInfoRequest: type: object allOf: - "$ref": "#/components/schemas/DiscountPriceInfoRequest" - type: object properties: fixedAmount: type: integer format: int64 DiscountPercentagePriceInfoRequest: type: object allOf: - "$ref": "#/components/schemas/DiscountPriceInfoRequest" - type: object properties: percentage: maximum: 99 minimum: 1 type: integer format: int32 description: "Specifies the discount rate as a percentage. Must be an integer between 1 and 99." DiscountExplicitPriceInfoRequest: type: object allOf: - "$ref": "#/components/schemas/DiscountPriceInfoRequest" - type: object properties: priceAfterDiscount: type: integer format: int64 originalPrice: type: integer format: int64 CouponCreateResponse: description: "Response object returned after creating a coupon. Contains the coupon ID." required: - couponId type: object properties: couponId: type: string description: "Unique identifier of the coupon." CouponResponse: description: "Detailed information about a coupon, including all properties and current status." type: object properties: acquisitionCondition: $ref: "#/components/schemas/AcquisitionConditionResponse" barcodeImageUrl: type: string description: "URL of the barcode image associated with the coupon. Used for in-store redemption." format: uri couponCode: type: string description: "Unique code to be presented by the user to redeem the coupon." description: type: string description: "Detailed description of the coupon. Displayed to users." endTimestamp: type: integer description: "Coupon expiration time (epoch seconds). Coupon cannot be used after this time." format: int64 imageUrl: type: string description: "URL of the main image representing the coupon. Displayed in the coupon list." format: uri maxAcquireCount: type: integer format: int64 description: "Maximum number of coupons that can be issued in total." maxUseCountPerTicket: type: integer format: int32 description: "Maximum number of times a single coupon ticket can be used." maxTicketPerUser: type: integer format: int64 description: "Maximum number of coupon tickets a single user can acquire." startTimestamp: type: integer description: "Coupon start time (epoch seconds). Coupon can be used from this time." format: int64 title: type: string description: "Title of the coupon. Displayed in the coupon list." usageCondition: type: string description: "Conditions for using the coupon. Shown to users." reward: $ref: "#/components/schemas/CouponRewardResponse" visibility: type: string description: "Visibility of the coupon. Determines who can see or acquire the coupon." enum: - UNLISTED - PUBLIC - PRIVATE timezone: type: string description: "Timezone for interpreting start and end timestamps." enum: - ETC_GMT_MINUS_12 - ETC_GMT_MINUS_11 - PACIFIC_HONOLULU - AMERICA_ANCHORAGE - AMERICA_LOS_ANGELES - AMERICA_PHOENIX - AMERICA_CHICAGO - AMERICA_NEW_YORK - AMERICA_CARACAS - AMERICA_SANTIAGO - AMERICA_ST_JOHNS - AMERICA_SAO_PAULO - ETC_GMT_MINUS_2 - ATLANTIC_CAPE_VERDE - EUROPE_LONDON - EUROPE_PARIS - EUROPE_ISTANBUL - EUROPE_MOSCOW - ASIA_TEHRAN - ASIA_TBILISI - ASIA_KABUL - ASIA_TASHKENT - ASIA_COLOMBO - ASIA_KATHMANDU - ASIA_ALMATY - ASIA_RANGOON - ASIA_BANGKOK - ASIA_TAIPEI - ASIA_TOKYO - AUSTRALIA_DARWIN - AUSTRALIA_SYDNEY - ASIA_VLADIVOSTOK - ETC_GMT_PLUS_12 - PACIFIC_TONGATAPU couponId: type: string description: "Unique identifier of the coupon." createdTimestamp: type: integer description: "Created timestamp (seconds) of the coupon." format: int64 status: type: string description: "Current status of the coupon." enum: - DRAFT - RUNNING - CLOSED AcquisitionConditionResponse: type: object required: - type properties: type: type: string description: "Determines how the coupon is distributed or used." discriminator: propertyName: type mapping: normal: "#/components/schemas/NormalAcquisitionConditionResponse" lottery: "#/components/schemas/LotteryAcquisitionConditionResponse" referral: "#/components/schemas/ReferralAcquisitionConditionResponse" NormalAcquisitionConditionResponse: type: object allOf: - "$ref": "#/components/schemas/AcquisitionConditionResponse" LotteryAcquisitionConditionResponse: type: object allOf: - "$ref": "#/components/schemas/AcquisitionConditionResponse" - type: object properties: lotteryProbability: type: integer format: int32 maxAcquireCount: type: integer format: int32 ReferralAcquisitionConditionResponse: type: object allOf: - "$ref": "#/components/schemas/AcquisitionConditionResponse" CouponRewardResponse: type: object required: - type properties: type: type: string description: "Type of coupon. Determines the benefit provided." discriminator: propertyName: type mapping: cashBack: "#/components/schemas/CouponCashBackRewardResponse" discount: "#/components/schemas/CouponDiscountRewardResponse" free: "#/components/schemas/CouponFreeRewardResponse" gift: "#/components/schemas/CouponGiftRewardResponse" others: "#/components/schemas/CouponOthersRewardResponse" CouponCashBackRewardResponse: type: object allOf: - "$ref": "#/components/schemas/CouponRewardResponse" - type: object properties: priceInfo: $ref: "#/components/schemas/CashBackPriceInfoResponse" CouponDiscountRewardResponse: type: object allOf: - "$ref": "#/components/schemas/CouponRewardResponse" - type: object properties: priceInfo: $ref: "#/components/schemas/DiscountPriceInfoResponse" CouponFreeRewardResponse: type: object allOf: - "$ref": "#/components/schemas/CouponRewardResponse" CouponGiftRewardResponse: type: object allOf: - "$ref": "#/components/schemas/CouponRewardResponse" CouponOthersRewardResponse: type: object allOf: - "$ref": "#/components/schemas/CouponRewardResponse" CashBackPriceInfoResponse: type: object required: - type properties: type: type: string discriminator: propertyName: type mapping: fixed: "#/components/schemas/CashBackFixedPriceInfoResponse" percentage: "#/components/schemas/CashBackPercentagePriceInfoResponse" CashBackFixedPriceInfoResponse: type: object allOf: - "$ref": "#/components/schemas/CashBackPriceInfoResponse" - type: object properties: currency: type: string description: "Currency code (e.g., JPY, THB, TWD)." enum: - JPY - THB - TWD fixedAmount: type: integer format: int64 CashBackPercentagePriceInfoResponse: type: object allOf: - "$ref": "#/components/schemas/CashBackPriceInfoResponse" - type: object properties: percentage: type: integer format: int32 DiscountPriceInfoResponse: type: object required: - type properties: type: type: string discriminator: propertyName: type mapping: fixed: "#/components/schemas/DiscountFixedPriceInfoResponse" percentage: "#/components/schemas/DiscountPercentagePriceInfoResponse" explicit: "#/components/schemas/DiscountExplicitPriceInfoResponse" DiscountFixedPriceInfoResponse: type: object allOf: - "$ref": "#/components/schemas/DiscountPriceInfoResponse" - type: object properties: currency: type: string description: "Currency code (e.g., JPY, THB, TWD)." enum: - JPY - THB - TWD fixedAmount: type: integer format: int64 DiscountPercentagePriceInfoResponse: type: object allOf: - "$ref": "#/components/schemas/DiscountPriceInfoResponse" - type: object properties: percentage: type: integer format: int32 DiscountExplicitPriceInfoResponse: type: object allOf: - "$ref": "#/components/schemas/DiscountPriceInfoResponse" - type: object properties: currency: type: string description: "Currency code (e.g., JPY, THB, TWD)." enum: - JPY - THB - TWD priceAfterDiscount: type: integer format: int64 originalPrice: type: integer format: int64 MessagingApiPagerCouponListResponse: description: "Paginated response object containing a list of coupons." required: - items type: object properties: items: type: array items: $ref: "#/components/schemas/CouponListResponse" description: "List of coupon summary objects." next: type: string description: "Token for fetching the next page of results." CouponListResponse: description: "Summary information about a coupon, used in coupon lists." required: - couponId - title type: object properties: couponId: type: string description: "Unique identifier of the coupon." title: type: string description: "Title of the coupon. Displayed in the coupon list." ShowLoadingAnimationRequest: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#display-a-loading-indicator-request-body required: - chatId type: object properties: chatId: type: string description: "User ID of the target user for whom the loading animation is to be displayed." loadingSeconds: type: integer format: int32 maximum: 60 minimum: 5 description: |+ The number of seconds to display the loading indicator. It must be a multiple of 5. The maximum value is 60 seconds. ShowLoadingAnimationResponse: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#display-a-loading-indicator-response type: object MarkMessagesAsReadByTokenRequest: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#mark-as-read-request-body required: - markAsReadToken type: object properties: markAsReadToken: type: string description: "Token used to mark messages as read." # Error response ErrorResponse: externalDocs: url: https://developers.line.biz/en/reference/messaging-api/#error-responses type: object required: - message properties: message: type: string description: "Message containing information about the error." details: type: array items: $ref: "#/components/schemas/ErrorDetail" description: "An array of error details. If the array is empty, this property will not be included in the response." sentMessages: description: "Array of sent messages." maxItems: 5 minItems: 1 type: array items: "$ref": "#/components/schemas/SentMessage" ErrorDetail: type: object properties: message: type: string description: "Details of the error. Not included in the response under certain situations." property: type: string description: "Location of where the error occurred. Returns the JSON field name or query parameter name of the request. Not included in the response under certain situations."