> ## Documentation Index
> Fetch the complete documentation index at: https://docs.heyy.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Send template message



## OpenAPI

````yaml /api-reference/openapi-v3.json post /messages/send_template
openapi: 3.1.0
info:
  title: Heyy API
  version: 3.0.0
servers:
  - url: https://api.heyy.io/v3
security:
  - bearerAuth: []
paths:
  /messages/send_template:
    post:
      summary: Send template message
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                chat:
                  anyOf:
                    - type: object
                      properties:
                        chatId:
                          type: string
                          format: uuid
                      required:
                        - chatId
                      additionalProperties: false
                    - type: object
                      properties:
                        channelId:
                          type: string
                          format: uuid
                        contactId:
                          type: string
                          format: uuid
                      required:
                        - channelId
                        - contactId
                      additionalProperties: false
                    - type: object
                      properties:
                        channelId:
                          type: string
                          format: uuid
                        phoneNumber:
                          type: string
                      required:
                        - channelId
                        - phoneNumber
                      additionalProperties: false
                    - type: object
                      properties:
                        channelId:
                          type: string
                          format: uuid
                        email:
                          type: string
                      required:
                        - channelId
                        - email
                      additionalProperties: false
                    - type: object
                      properties:
                        channelId:
                          type: string
                          format: uuid
                        handleId:
                          type: string
                      required:
                        - channelId
                        - handleId
                      additionalProperties: false
                messageTemplate:
                  type: object
                  properties:
                    id:
                      type: string
                      format: uuid
                    attachments:
                      type: array
                      items:
                        type: object
                        properties:
                          id:
                            type: string
                            format: uuid
                          fileId:
                            type: string
                            format: uuid
                        required:
                          - id
                          - fileId
                    variables:
                      type: object
                      additionalProperties:
                        type: string
                  required:
                    - id
                scheduledAt:
                  type: string
                  format: date-time
              required:
                - chat
                - messageTemplate
              additionalProperties: false
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - true
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                      createdAt:
                        type: string
                        format: date-time
                      updatedAt:
                        type: string
                        format: date-time
                      chatId:
                        type: string
                      channelId:
                        type: string
                      type:
                        type: string
                        enum:
                          - message
                          - note
                          - chat_open
                          - chat_close
                          - chat_snoozed
                          - chat_assigned
                          - vendor_comment
                          - ai_tool_call
                      sender:
                        type: string
                        enum:
                          - outbound
                          - inbound
                          - unknown
                          - system
                      sources:
                        type: array
                        items:
                          anyOf:
                            - type: object
                              properties:
                                type:
                                  type: string
                                  enum:
                                    - campaign
                                campaignExecutionId:
                                  type: string
                                  format: uuid
                              required:
                                - type
                                - campaignExecutionId
                              additionalProperties: false
                            - type: object
                              properties:
                                type:
                                  type: string
                                  enum:
                                    - automation
                                automationActionExecutionId:
                                  type: string
                                  format: uuid
                              required:
                                - type
                                - automationActionExecutionId
                              additionalProperties: false
                            - type: object
                              properties:
                                type:
                                  type: string
                                  enum:
                                    - inbox
                                userId:
                                  type: string
                                  format: uuid
                              required:
                                - type
                                - userId
                              additionalProperties: false
                            - type: object
                              properties:
                                type:
                                  type: string
                                  enum:
                                    - vendor
                              required:
                                - type
                              additionalProperties: false
                            - type: object
                              properties:
                                type:
                                  type: string
                                  enum:
                                    - api
                                apiKeyId:
                                  type: string
                              required:
                                - type
                                - apiKeyId
                              additionalProperties: false
                            - type: object
                              properties:
                                type:
                                  type: string
                                  enum:
                                    - ai_agent
                                aiAgentId:
                                  type: string
                              required:
                                - type
                                - aiAgentId
                              additionalProperties: false
                            - type: object
                              properties:
                                type:
                                  type: string
                                  enum:
                                    - system
                              required:
                                - type
                              additionalProperties: false
                      status:
                        type: string
                        enum:
                          - none
                          - pending
                          - sent
                          - delivered
                          - read
                          - scheduled
                          - deleted
                          - failed
                      scheduledAt:
                        type:
                          - string
                          - 'null'
                      content:
                        type: object
                        properties:
                          body:
                            type:
                              - string
                              - 'null'
                          attachments:
                            type: array
                            items:
                              anyOf:
                                - type: object
                                  properties:
                                    id:
                                      type: string
                                    type:
                                      type: string
                                      enum:
                                        - image
                                    file:
                                      type:
                                        - object
                                        - 'null'
                                      properties:
                                        id:
                                          type: string
                                        createdAt:
                                          type: string
                                        type:
                                          type: string
                                          enum:
                                            - image
                                            - video
                                            - audio
                                            - document
                                        name:
                                          type: string
                                        contentType:
                                          type: string
                                        url:
                                          type: string
                                        size:
                                          type: number
                                      required:
                                        - id
                                        - createdAt
                                        - type
                                        - name
                                        - contentType
                                        - url
                                        - size
                                  required:
                                    - id
                                    - type
                                - type: object
                                  properties:
                                    id:
                                      type: string
                                    type:
                                      type: string
                                      enum:
                                        - video
                                    file:
                                      type:
                                        - object
                                        - 'null'
                                      properties:
                                        id:
                                          type: string
                                        createdAt:
                                          type: string
                                        type:
                                          type: string
                                          enum:
                                            - image
                                            - video
                                            - audio
                                            - document
                                        name:
                                          type: string
                                        contentType:
                                          type: string
                                        url:
                                          type: string
                                        size:
                                          type: number
                                      required:
                                        - id
                                        - createdAt
                                        - type
                                        - name
                                        - contentType
                                        - url
                                        - size
                                  required:
                                    - id
                                    - type
                                - type: object
                                  properties:
                                    id:
                                      type: string
                                    type:
                                      type: string
                                      enum:
                                        - document
                                    file:
                                      type:
                                        - object
                                        - 'null'
                                      properties:
                                        id:
                                          type: string
                                        createdAt:
                                          type: string
                                        type:
                                          type: string
                                          enum:
                                            - image
                                            - video
                                            - audio
                                            - document
                                        name:
                                          type: string
                                        contentType:
                                          type: string
                                        url:
                                          type: string
                                        size:
                                          type: number
                                      required:
                                        - id
                                        - createdAt
                                        - type
                                        - name
                                        - contentType
                                        - url
                                        - size
                                  required:
                                    - id
                                    - type
                                - type: object
                                  properties:
                                    id:
                                      type: string
                                    type:
                                      type: string
                                      enum:
                                        - audio
                                    file:
                                      type:
                                        - object
                                        - 'null'
                                      properties:
                                        id:
                                          type: string
                                        createdAt:
                                          type: string
                                        type:
                                          type: string
                                          enum:
                                            - image
                                            - video
                                            - audio
                                            - document
                                        name:
                                          type: string
                                        contentType:
                                          type: string
                                        url:
                                          type: string
                                        size:
                                          type: number
                                      required:
                                        - id
                                        - createdAt
                                        - type
                                        - name
                                        - contentType
                                        - url
                                        - size
                                    isVoice:
                                      type: boolean
                                  required:
                                    - id
                                    - type
                                - type: object
                                  properties:
                                    id:
                                      type: string
                                    type:
                                      type: string
                                      enum:
                                        - location
                                    latitude:
                                      type:
                                        - number
                                        - 'null'
                                    longitude:
                                      type:
                                        - number
                                        - 'null'
                                    name:
                                      type:
                                        - string
                                        - 'null'
                                    address:
                                      type:
                                        - string
                                        - 'null'
                                  required:
                                    - id
                                    - type
                                - type: object
                                  properties:
                                    id:
                                      type: string
                                    type:
                                      type: string
                                      enum:
                                        - contact
                                    addresses:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          street:
                                            type: string
                                          city:
                                            type: string
                                          state:
                                            type: string
                                          zip:
                                            type: string
                                          country:
                                            type: string
                                          countryCode:
                                            type: string
                                          type:
                                            type: string
                                    birthday:
                                      type: string
                                    emails:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          email:
                                            type: string
                                          type:
                                            type: string
                                    name:
                                      type: object
                                      properties:
                                        formattedName:
                                          type: string
                                        firstName:
                                          type: string
                                        lastName:
                                          type: string
                                        middleName:
                                          type: string
                                        suffix:
                                          type: string
                                        prefix:
                                          type: string
                                    org:
                                      type: object
                                      properties:
                                        company:
                                          type: string
                                        department:
                                          type: string
                                        title:
                                          type: string
                                    phones:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          phone:
                                            type: string
                                          type:
                                            type: string
                                    urls:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          url:
                                            type: string
                                          type:
                                            type: string
                                  required:
                                    - id
                                    - type
                                - type: object
                                  properties:
                                    id:
                                      type: string
                                    type:
                                      type: string
                                      enum:
                                        - button
                                    buttonType:
                                      type: string
                                      enum:
                                        - quick_reply
                                        - url
                                        - phone_number
                                        - list_title
                                    text:
                                      type:
                                        - string
                                        - 'null'
                                    data:
                                      type:
                                        - object
                                        - 'null'
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - phone_number
                                            - static_url
                                            - dynamic_url
                                        phoneNumber:
                                          type: string
                                        url:
                                          type: string
                                        urlExtension:
                                          type: string
                                      required:
                                        - type
                                    payload:
                                      type:
                                        - string
                                        - 'null'
                                  required:
                                    - id
                                    - type
                                    - buttonType
                                    - text
                                - type: object
                                  properties:
                                    id:
                                      type: string
                                    type:
                                      type: string
                                      enum:
                                        - list_section
                                    title:
                                      type:
                                        - string
                                        - 'null'
                                    rows:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          id:
                                            type: string
                                          title:
                                            type: string
                                          description:
                                            type:
                                              - string
                                              - 'null'
                                        required:
                                          - id
                                          - title
                                          - description
                                  required:
                                    - id
                                    - type
                                    - title
                                    - rows
                                - type: object
                                  properties:
                                    id:
                                      type: string
                                    type:
                                      type: string
                                      enum:
                                        - quick_reply
                                    text:
                                      type: string
                                    payload:
                                      type: string
                                  required:
                                    - id
                                    - type
                                    - text
                                    - payload
                                - type: object
                                  properties:
                                    id:
                                      type: string
                                    type:
                                      type: string
                                      enum:
                                        - comment
                                    text:
                                      type: string
                                    commentId:
                                      type: string
                                    mediaId:
                                      type: string
                                    file:
                                      type:
                                        - object
                                        - 'null'
                                      properties:
                                        id:
                                          type: string
                                        createdAt:
                                          type: string
                                        type:
                                          type: string
                                          enum:
                                            - image
                                            - video
                                            - audio
                                            - document
                                        name:
                                          type: string
                                        contentType:
                                          type: string
                                        url:
                                          type: string
                                        size:
                                          type: number
                                      required:
                                        - id
                                        - createdAt
                                        - type
                                        - name
                                        - contentType
                                        - url
                                        - size
                                    mediaUrl:
                                      type: string
                                    mediaType:
                                      type: string
                                      enum:
                                        - IMAGE
                                        - VIDEO
                                        - CAROUSEL_ALBUM
                                    mediaProductType:
                                      type: string
                                      enum:
                                        - FEED
                                        - REELS
                                        - STORY
                                    platform:
                                      type: string
                                      enum:
                                        - instagram
                                        - facebook
                                  required:
                                    - id
                                    - type
                                    - text
                                - type: object
                                  properties:
                                    id:
                                      type: string
                                    type:
                                      type: string
                                      enum:
                                        - ai_tool_call
                                    toolCallId:
                                      type: string
                                    toolName:
                                      type: string
                                    input: {}
                                    output: {}
                                    providerDetails: {}
                                  required:
                                    - id
                                    - type
                                    - toolCallId
                                    - toolName
                                    - input
                                    - output
                                    - providerDetails
                                - type: object
                                  properties:
                                    id:
                                      type: string
                                    type:
                                      type: string
                                      enum:
                                        - referral
                                    source:
                                      type: string
                                      enum:
                                        - whatsapp
                                    sourceUrl:
                                      type: string
                                    sourceType:
                                      type: string
                                    sourceId:
                                      type: string
                                    headline:
                                      type: string
                                    body:
                                      type: string
                                    mediaType:
                                      type: string
                                    imageUrl:
                                      type: string
                                    videoUrl:
                                      type: string
                                    thumbnailUrl:
                                      type: string
                                    ctwaClid:
                                      type: string
                                  required:
                                    - id
                                    - type
                                    - source
                                - type: object
                                  properties:
                                    id:
                                      type: string
                                    type:
                                      type: string
                                      enum:
                                        - content_reference
                                    contentType:
                                      type: string
                                      enum:
                                        - story
                                    url:
                                      type: string
                                    externalId:
                                      type: string
                                  required:
                                    - id
                                    - type
                                    - contentType
                                    - url
                                - type: object
                                  properties:
                                    id:
                                      type: string
                                    type:
                                      type: string
                                      enum:
                                        - auth
                                  required:
                                    - id
                                    - type
                          header:
                            type:
                              - string
                              - 'null'
                          footer:
                            type:
                              - string
                              - 'null'
                          payload:
                            type: string
                      forwarded:
                        type: boolean
                      replyTo:
                        type: object
                        properties:
                          id:
                            type: string
                          vendorId:
                            type:
                              - string
                              - 'null'
                          sender:
                            type: string
                            enum:
                              - outbound
                              - inbound
                              - unknown
                              - system
                          type:
                            type: string
                            enum:
                              - text
                              - media
                              - audio
                              - location
                              - contact
                              - auth
                          timestamp:
                            type: string
                          text:
                            type:
                              - string
                              - 'null'
                        required:
                          - id
                          - vendorId
                          - sender
                          - type
                          - timestamp
                          - text
                      reactions:
                        type: array
                        items:
                          type: object
                          properties:
                            sender:
                              type: string
                              enum:
                                - outbound
                                - inbound
                                - unknown
                                - system
                            userId:
                              type: string
                            text:
                              type: string
                            timestamp:
                              type: string
                          required:
                            - sender
                            - text
                            - timestamp
                      errors:
                        type: array
                        items:
                          type: object
                          properties:
                            messageKey:
                              type: string
                            message:
                              type: string
                            vendorError:
                              type: object
                              properties:
                                code:
                                  type:
                                    - number
                                    - 'null'
                                title:
                                  type:
                                    - string
                                    - 'null'
                                type:
                                  type:
                                    - string
                                    - 'null'
                                message:
                                  type:
                                    - string
                                    - 'null'
                                errorData:
                                  type: object
                                  properties:
                                    messagingProduct:
                                      type: string
                                    details:
                                      type: string
                                fbtraceId:
                                  type:
                                    - string
                                    - 'null'
                          required:
                            - messageKey
                            - message
                      history:
                        type: array
                        items:
                          type: object
                          properties:
                            event:
                              type: string
                              enum:
                                - status_update
                            newStatus:
                              type: string
                              enum:
                                - none
                                - pending
                                - sent
                                - delivered
                                - read
                                - scheduled
                                - deleted
                                - failed
                            timestamp:
                              type: string
                          required:
                            - event
                            - newStatus
                            - timestamp
                      vendorId:
                        type:
                          - string
                          - 'null'
                      timestamp:
                        type: string
                      vendorDetails:
                        type:
                          - object
                          - 'null'
                        properties:
                          whatsapp:
                            type: object
                            properties:
                              context:
                                type: object
                                properties:
                                  frequentlyForwarded:
                                    type: boolean
                                  referredProduct:
                                    type: object
                                    properties:
                                      catalogId:
                                        type: string
                                      productRetailerId:
                                        type: string
                                    required:
                                      - catalogId
                                      - productRetailerId
                                required:
                                  - frequentlyForwarded
                              order:
                                type: object
                                properties:
                                  catalogId:
                                    type:
                                      - string
                                      - 'null'
                                  productItems:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        productRetailerId:
                                          type: string
                                        quantity:
                                          type: string
                                        itemPrice:
                                          type: string
                                        currency:
                                          type: string
                                      required:
                                        - productRetailerId
                                        - quantity
                                        - itemPrice
                                        - currency
                          instagram:
                            type: object
                            properties:
                              commentId:
                                type: string
                          messenger:
                            type: object
                            properties:
                              commentId:
                                type: string
                      metadata:
                        type:
                          - object
                          - 'null'
                        properties:
                          campaignContactId:
                            type: string
                          campaignExecutionId:
                            type: string
                      isSensitive:
                        type: boolean
                      aiGenerationId:
                        type:
                          - string
                          - 'null'
                      chat:
                        type: object
                        properties:
                          id:
                            type: string
                          createdAt:
                            type: string
                            format: date-time
                          updatedAt:
                            type: string
                            format: date-time
                          status:
                            type: string
                            enum:
                              - open
                              - closed
                              - snoozed
                          isUnread:
                            type: boolean
                          openUntil:
                            type:
                              - string
                              - 'null'
                          unreadCount:
                            type: number
                          channelId:
                            type: string
                          contactId:
                            type: string
                          handleId:
                            type: string
                          latestMessage:
                            type:
                              - object
                              - 'null'
                            properties:
                              id:
                                type: string
                              vendorId:
                                type:
                                  - string
                                  - 'null'
                              sender:
                                type: string
                                enum:
                                  - outbound
                                  - inbound
                                  - unknown
                                  - system
                              type:
                                type: string
                                enum:
                                  - text
                                  - media
                                  - audio
                                  - location
                                  - contact
                                  - auth
                              timestamp:
                                type: string
                              text:
                                type:
                                  - string
                                  - 'null'
                            required:
                              - id
                              - vendorId
                              - sender
                              - type
                              - timestamp
                              - text
                          assignedUserId:
                            type:
                              - string
                              - 'null'
                          assignedTeamId:
                            type:
                              - string
                              - 'null'
                          isSensitive:
                            type: boolean
                        required:
                          - id
                          - createdAt
                          - updatedAt
                          - status
                          - isUnread
                          - openUntil
                          - unreadCount
                          - channelId
                          - contactId
                          - handleId
                          - latestMessage
                          - assignedUserId
                          - assignedTeamId
                          - isSensitive
                        additionalProperties: false
                    required:
                      - id
                      - createdAt
                      - updatedAt
                      - chatId
                      - channelId
                      - type
                      - sender
                      - sources
                      - status
                      - scheduledAt
                      - content
                      - forwarded
                      - reactions
                      - errors
                      - history
                      - vendorId
                      - timestamp
                      - vendorDetails
                      - metadata
                      - isSensitive
                      - aiGenerationId
                    additionalProperties: false
                required:
                  - success
                  - data
                additionalProperties: false
              example:
                success: true
                data:
                  id: string
                  createdAt: '2024-01-01T00:00:00.000Z'
                  updatedAt: '2024-01-01T00:00:00.000Z'
                  chatId: string
                  channelId: string
                  type: message
                  sender: outbound
                  sources: []
                  status: none
                  scheduledAt: string
                  content:
                    body: string
                    attachments: []
                    header: string
                    footer: string
                    payload: string
                  forwarded: true
                  replyTo:
                    id: string
                    vendorId: string
                    sender: outbound
                    type: text
                    timestamp: string
                    text: string
                  reactions: []
                  errors: []
                  history: []
                  vendorId: string
                  timestamp: string
                  vendorDetails:
                    whatsapp:
                      context:
                        frequentlyForwarded: true
                        referredProduct:
                          catalogId: string
                          productRetailerId: string
                      order:
                        catalogId: string
                        productItems: []
                    instagram:
                      commentId: string
                    messenger:
                      commentId: string
                  metadata:
                    campaignContactId: string
                    campaignExecutionId: string
                  isSensitive: true
                  aiGenerationId: string
                  chat:
                    id: string
                    createdAt: '2024-01-01T00:00:00.000Z'
                    updatedAt: '2024-01-01T00:00:00.000Z'
                    status: open
                    isUnread: true
                    openUntil: string
                    unreadCount: 0
                    channelId: string
                    contactId: string
                    contact:
                      id: string
                      createdAt: '2024-01-01T00:00:00.000Z'
                      updatedAt: '2024-01-01T00:00:00.000Z'
                      firstName: string
                      lastName: string
                      fullName: string
                      isSubscribed: true
                      handles: []
                      labels: []
                      attributes: []
                      displayName: string
                      phoneNumber: string
                      email: string
                      chats: []
                      metadata: {}
                    handleId: string
                    handle:
                      id: string
                      createdAt: '2024-01-01T00:00:00.000Z'
                      updatedAt: '2024-01-01T00:00:00.000Z'
                      type: phone_number
                      isPrimary: true
                      value: string
                      extra: {}
                      hasChats: true
                    latestMessage:
                      id: string
                      vendorId: string
                      sender: outbound
                      type: text
                      timestamp: string
                      text: string
                    assignedUserId: string
                    assignedTeamId: string
                    isSensitive: true
        '400':
          description: Bad request. The request body or parameters are invalid.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  error:
                    type: object
                    properties:
                      messageKey:
                        type: string
                      message:
                        type: string
                      invalidParams:
                        type: object
                        additionalProperties:
                          type: object
                          properties:
                            key:
                              type: string
                            message:
                              type: string
                          required:
                            - key
                            - message
                required:
                  - success
                additionalProperties: false
              example:
                success: false
                error:
                  messageKey: invalid_body_params
                  message: Invalid body params
                  invalidParams:
                    email:
                      key: invalid_string
                      message: Invalid email
        '401':
          description: Unauthorized. A valid API key is required.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  error:
                    type: object
                    properties:
                      messageKey:
                        type: string
                      message:
                        type: string
                      invalidParams:
                        type: object
                        additionalProperties:
                          type: object
                          properties:
                            key:
                              type: string
                            message:
                              type: string
                          required:
                            - key
                            - message
                required:
                  - success
                additionalProperties: false
              example:
                success: false
                error:
                  messageKey: unauthorized
                  message: Unauthorized
        '402':
          description: >-
            Payment required. The current billing plan does not allow this
            request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  error:
                    type: object
                    properties:
                      messageKey:
                        type: string
                      message:
                        type: string
                      invalidParams:
                        type: object
                        additionalProperties:
                          type: object
                          properties:
                            key:
                              type: string
                            message:
                              type: string
                          required:
                            - key
                            - message
                required:
                  - success
                additionalProperties: false
              example:
                success: false
                error:
                  messageKey: insufficient_billing_plan
                  message: Insufficient billing plan
        '403':
          description: >-
            Forbidden. The API key does not have permission to perform this
            action.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  error:
                    type: object
                    properties:
                      messageKey:
                        type: string
                      message:
                        type: string
                      invalidParams:
                        type: object
                        additionalProperties:
                          type: object
                          properties:
                            key:
                              type: string
                            message:
                              type: string
                          required:
                            - key
                            - message
                required:
                  - success
                additionalProperties: false
              example:
                success: false
                error:
                  messageKey: forbidden
                  message: Forbidden
        '404':
          description: Not found. The requested resource does not exist.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  error:
                    type: object
                    properties:
                      messageKey:
                        type: string
                      message:
                        type: string
                      invalidParams:
                        type: object
                        additionalProperties:
                          type: object
                          properties:
                            key:
                              type: string
                            message:
                              type: string
                          required:
                            - key
                            - message
                required:
                  - success
                additionalProperties: false
              example:
                success: false
                error:
                  messageKey: contact_not_found
                  message: Contact not found
        '429':
          description: >-
            Too many requests. Retry after the time indicated by the
            X-RateLimit-Reset header.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  error:
                    type: object
                    properties:
                      messageKey:
                        type: string
                      message:
                        type: string
                      invalidParams:
                        type: object
                        additionalProperties:
                          type: object
                          properties:
                            key:
                              type: string
                            message:
                              type: string
                          required:
                            - key
                            - message
                required:
                  - success
                additionalProperties: false
              example:
                success: false
                error:
                  messageKey: too_many_requests
                  message: >-
                    Too many requests. Limit is applied per minute per tenant.
                    Please retry after the time indicated by the
                    X-RateLimit-Reset header.
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  error:
                    type: object
                    properties:
                      messageKey:
                        type: string
                      message:
                        type: string
                      invalidParams:
                        type: object
                        additionalProperties:
                          type: object
                          properties:
                            key:
                              type: string
                            message:
                              type: string
                          required:
                            - key
                            - message
                required:
                  - success
                additionalProperties: false
              example:
                success: false
                error:
                  messageKey: internal_error
                  message: Oops! Something went wrong
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````