LINE Message API

The Message API from LINE — 4 operation(s) for message.

OpenAPI Specification

line-message-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: LINE Messaging Channel Message API
  description: 'Partial OpenAPI 3.1 representation of the LINE Messaging API. LINE provides

    public APIs for chatbots and Official Accounts. Authentication uses Bearer

    channel access tokens issued per LINE channel. The authoritative OpenAPI

    documents are maintained by LINE at

    https://github.com/line/line-openapi (messaging-api.yml, webhook.yml,

    channel-access-token.yml, liff.yml, insight.yml, manage-audience.yml,

    shop.yml).

    '
  version: 1.0.0
  contact:
    name: LINE Developers
    url: https://developers.line.biz/en/reference/messaging-api/
servers:
- url: https://api.line.me/v2/bot
  description: LINE Messaging API host.
- url: https://api-data.line.me/v2/bot
  description: LINE Messaging Data API host (binary content fetch).
security:
- ChannelAccessToken: []
tags:
- name: Message
paths:
  /message/reply:
    post:
      summary: Send reply messages
      description: Sends reply messages to a user, group, or room in response to a webhook event using a reply token.
      operationId: replyMessage
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - replyToken
              - messages
              properties:
                replyToken:
                  type: string
                  description: Reply token received from the webhook event.
                messages:
                  type: array
                  description: Up to five messages to send.
                  maxItems: 5
                  items:
                    $ref: '#/components/schemas/Message'
                notificationDisabled:
                  type: boolean
                  default: false
      responses:
        '200':
          description: Reply accepted.
        '400':
          description: Invalid request.
      tags:
      - Message
  /message/push:
    post:
      summary: Send push messages
      description: Sends push messages to a user, group, or room at any time.
      operationId: pushMessage
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - to
              - messages
              properties:
                to:
                  type: string
                  description: ID of the target recipient (user, group, or room).
                messages:
                  type: array
                  maxItems: 5
                  items:
                    $ref: '#/components/schemas/Message'
                notificationDisabled:
                  type: boolean
                  default: false
      responses:
        '200':
          description: Push accepted.
      tags:
      - Message
  /message/multicast:
    post:
      summary: Send multicast messages
      description: Sends push messages to multiple users at once.
      operationId: multicastMessage
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - to
              - messages
              properties:
                to:
                  type: array
                  maxItems: 500
                  items:
                    type: string
                messages:
                  type: array
                  maxItems: 5
                  items:
                    $ref: '#/components/schemas/Message'
                notificationDisabled:
                  type: boolean
                  default: false
      responses:
        '200':
          description: Multicast accepted.
      tags:
      - Message
  /message/broadcast:
    post:
      summary: Send broadcast messages
      description: Sends push messages to all users who have added the LINE Official Account as a friend.
      operationId: broadcastMessage
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - messages
              properties:
                messages:
                  type: array
                  maxItems: 5
                  items:
                    $ref: '#/components/schemas/Message'
                notificationDisabled:
                  type: boolean
                  default: false
      responses:
        '200':
          description: Broadcast accepted.
      tags:
      - Message
components:
  schemas:
    Message:
      type: object
      description: A LINE message object. Concrete subtypes include text, image, video, audio, location, sticker, imagemap, template, and flex.
      required:
      - type
      properties:
        type:
          type: string
          enum:
          - text
          - image
          - video
          - audio
          - location
          - sticker
          - imagemap
          - template
          - flex
        text:
          type: string
        quickReply:
          type: object
  securitySchemes:
    ChannelAccessToken:
      type: http
      scheme: bearer
      bearerFormat: ChannelAccessToken
      description: LINE channel access token passed as a Bearer token in the Authorization header.