openapi: 3.1.0
info:
  title: WhatsApp API
  version: '3.0'
  description: >-
    Pinnacle Partners WhatsApp Solution API for messaging, media, templates, payments, catalogues, business accounts,
    and QR codes.
servers:
  - url: https://partnersv1.pinbot.ai/v3
paths:
  /{phone_number_id}/messages:
    post:
      operationId: send-authentication-template-message
      summary: Send Authentication Template Message
      description: This API is used to send an authentication template message.
      tags:
        - Templates
      security:
        - apiKey: []
      parameters:
        - name: phone_number_id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                to:
                  type: string
                type:
                  type: string
                template:
                  type: object
                  properties:
                    name:
                      type: string
                    language:
                      type: object
                      properties:
                        code:
                          type: string
                    components:
                      type: array
                      items:
                        type: object
                        properties:
                          type:
                            type: string
                          parameters:
                            type: array
                            items:
                              type: object
                              properties:
                                text:
                                  type: string
                                type:
                                  type: string
                recipient_type:
                  type: string
                messaging_product:
                  type: string
            example:
              to: '{{recipient_no}}'
              type: template
              template:
                name: zero_tap_ttt_vk_fff
                language:
                  code: en_US
                components:
                  - type: body
                    parameters:
                      - text: '84984519'
                        type: text
                  - type: button
                    index: '0'
                    sub_type: url
                    parameters:
                      - text: '8498451119'
                        type: text
              recipient_type: individual
              messaging_product: whatsapp
      responses:
        '200':
          description: The request was successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  raw_example:
                    type: string
              example:
                raw_example: |-
                  {
                  "messaging_product": "whatsapp",

                  "contacts": [
                  {
                  "input": "9175XXXXXXXX",
                  "wa_id": "9175XXXXXXXX"
                  }
                  ],
                  "messages": [
                  {
                  "id":
                  "wamid.HBgMOTE3OTcyODkyNzEyFQIAERgSQzAwRDEzNkQ1NDFFNkM3NkEzAA=
                  ="
                  }
                  ]
                  }

                  Business APIs Batch -3 (PARTNERS)
        '400':
          description: Bad request or invalid parameters.
          content:
            application/json:
              schema:
                type: object
                properties:
                  raw_example:
                    type: string
        '401':
          description: API key is missing or invalid.
          content:
            application/json:
              schema:
                type: object
                properties:
                  raw_example:
                    type: string
        '403':
          description: The request is not authorized for this resource.
          content:
            application/json:
              schema:
                type: object
                properties:
                  raw_example:
                    type: string
        '404':
          description: The requested resource was not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  raw_example:
                    type: string
        '500':
          description: The server encountered an error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  raw_example:
                    type: string
  /{phone_number_id}/media:
    post:
      operationId: upload-media
      summary: UPLOAD MEDIA
      description: This API is used to upload the media on your
      tags:
        - Media
      security:
        - apiKey: []
      parameters:
        - name: phone_number_id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - sheet
              properties:
                sheet:
                  type: string
                  format: binary
            example:
              sheet: <MEDIA_FILE_TO_BE_UPLOADED>
      responses:
        '200':
          description: The request was successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  response:
                    type: object
                    properties:
                      id:
                        type: string
              example:
                response:
                  id: '{{mediaid}}'
        '400':
          description: Bad request or invalid parameters.
          content:
            application/json:
              schema:
                type: object
                properties:
                  response:
                    type: object
                    properties:
                      id:
                        type: string
        '401':
          description: API key is missing or invalid.
          content:
            application/json:
              schema:
                type: object
                properties:
                  response:
                    type: object
                    properties:
                      id:
                        type: string
        '403':
          description: The request is not authorized for this resource.
          content:
            application/json:
              schema:
                type: object
                properties:
                  response:
                    type: object
                    properties:
                      id:
                        type: string
        '404':
          description: The requested resource was not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  response:
                    type: object
                    properties:
                      id:
                        type: string
        '500':
          description: The server encountered an error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  response:
                    type: object
                    properties:
                      id:
                        type: string
  /downloadMedia/{mediaid}:
    post:
      operationId: download-media-directly
      summary: DOWNLOAD MEDIA DIRECTLY
      description: This API is used to download the media by passing the mediaid as parameter in the URL.
      tags:
        - Media
      security:
        - apiKey: []
      parameters:
        - name: mediaid
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                phone_number_id:
                  type: string
                  x-parameter-in: query
            example:
              phone_number_id: '{phone_number_id}'
      responses:
        '200':
          description: The request was successful.
          content:
            application/json:
              schema:
                type: object
                properties: {}
        '400':
          description: Bad request or invalid parameters.
          content:
            application/json:
              schema:
                type: object
                properties: {}
        '401':
          description: API key is missing or invalid.
          content:
            application/json:
              schema:
                type: object
                properties: {}
        '403':
          description: The request is not authorized for this resource.
          content:
            application/json:
              schema:
                type: object
                properties: {}
        '404':
          description: The requested resource was not found.
          content:
            application/json:
              schema:
                type: object
                properties: {}
        '500':
          description: The server encountered an error.
          content:
            application/json:
              schema:
                type: object
                properties: {}
  /{mediaid}:
    get:
      operationId: get-media-url-from-media-id
      summary: GET MEDIA URL FROM MEDIA ID
      description: This API is used to get the media url by passing the mediaid as parameter in the URL.
      tags:
        - Media
      security:
        - apiKey: []
      parameters:
        - name: mediaid
          in: path
          required: true
          schema:
            type: string
        - name: phone_number_id
          in: query
          required: false
          schema:
            type: string
      responses:
        '200':
          description: The request was successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  raw_example:
                    type: string
              example:
                raw_example: |
                  {
                  "url":
                  "https:
                  254&ext=1716536800&hash=ATtFkAs7t1xlhx9wik43m7NBRARfMzfh6Vi_IvgzzxkQsQ",
                  "mime_type": "image/png",
                  "sha256":
                  "ee490eac2a7b038413ab2fb0bfc6db02d9a68e015d92e917fbcee9e324a96810",
                  "file_size": 436484,
                  "id": "7609700182448254",
                  "messaging_product": "whatsapp"
                  }
        '400':
          description: Bad request or invalid parameters.
          content:
            application/json:
              schema:
                type: object
                properties:
                  raw_example:
                    type: string
        '401':
          description: API key is missing or invalid.
          content:
            application/json:
              schema:
                type: object
                properties:
                  raw_example:
                    type: string
        '403':
          description: The request is not authorized for this resource.
          content:
            application/json:
              schema:
                type: object
                properties:
                  raw_example:
                    type: string
        '404':
          description: The requested resource was not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  raw_example:
                    type: string
        '500':
          description: The server encountered an error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  raw_example:
                    type: string
    delete:
      operationId: delete-media
      summary: DELETE MEDIA
      description: This API is used to delete the media by passing the mediaid as parameter in the URL.
      tags:
        - Media
      security:
        - apiKey: []
      parameters:
        - name: mediaid
          in: path
          required: true
          schema:
            type: string
        - name: phone_number_id
          in: query
          required: false
          schema:
            type: string
      responses:
        '200':
          description: The request was successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
              example:
                success: true
        '400':
          description: Bad request or invalid parameters.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
        '401':
          description: API key is missing or invalid.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
        '403':
          description: The request is not authorized for this resource.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
        '404':
          description: The requested resource was not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
        '500':
          description: The server encountered an error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
  /whatsapp_business/attachments/:
    get:
      operationId: get-media-from-media-url
      summary: GET MEDIA FROM MEDIA URL
      description: This API is used to get the media by calling the media url.
      tags:
        - Media
      security:
        - apiKey: []
      parameters:
        - name: ext
          in: query
          required: false
          schema:
            type: string
        - name: mid
          in: query
          required: false
          schema:
            type: string
        - name: hash
          in: query
          required: false
          schema:
            type: string
      responses:
        '200':
          description: The request was successful.
          content:
            application/json:
              schema:
                type: object
                properties: {}
        '400':
          description: Bad request or invalid parameters.
          content:
            application/json:
              schema:
                type: object
                properties: {}
        '401':
          description: API key is missing or invalid.
          content:
            application/json:
              schema:
                type: object
                properties: {}
        '403':
          description: The request is not authorized for this resource.
          content:
            application/json:
              schema:
                type: object
                properties: {}
        '404':
          description: The requested resource was not found.
          content:
            application/json:
              schema:
                type: object
                properties: {}
        '500':
          description: The server encountered an error.
          content:
            application/json:
              schema:
                type: object
                properties: {}
  /app/uploads:
    post:
      operationId: retrieve-media-file-handle-step-1-create-a-session
      summary: 'Retrieve media file handle - Step 1 : Create a Session'
      description: This API is used to get the upload session ID that will be used in the next step to initiate the upload.
      tags:
        - Media
      security:
        - apiKey: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                file_type:
                  type: string
                  x-parameter-in: query
                file_length:
                  type: string
                  x-parameter-in: query
            example:
              file_type: video/mp4
              file_length: '164313'
      responses:
        '200':
          description: The request was successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  raw_example:
                    type: string
              example:
                raw_example: |-
                  {
                  "id":
                  "upload:MTphdHRhY2htZW50OjNlYTE1ZTkzLTZkZDktNGIwOS1iOTM3LWM4YWZmM
                  TRkYTZkMz9maWxlX2xlbmd0aD0xNjQzMTMmZmlsZV90eXBlPXZpZGVvJTJGbXA0?s
                  ig=ARbUFIDlNcIbRnOalIY"
                  }
        '400':
          description: Bad request or invalid parameters.
          content:
            application/json:
              schema:
                type: object
                properties:
                  raw_example:
                    type: string
        '401':
          description: API key is missing or invalid.
          content:
            application/json:
              schema:
                type: object
                properties:
                  raw_example:
                    type: string
        '403':
          description: The request is not authorized for this resource.
          content:
            application/json:
              schema:
                type: object
                properties:
                  raw_example:
                    type: string
        '404':
          description: The requested resource was not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  raw_example:
                    type: string
        '500':
          description: The server encountered an error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  raw_example:
                    type: string
  /upload:MTphdHRhY2htZW50OjNlYTE1ZTkzLTZkZDktNGIwOS1iOTM3LWM4YWZmMTRkYTZkMz9maWxlX2xlbmd0aD0xNjQzMTMmZmlsZV90eXBlPXZpZGVvJTJGbXA0:
    post:
      operationId: retrieve-media-file-handle-step-2-create-a-session
      summary: 'Retrieve media file handle - Step 2 : Create a Session'
      description: >-
        This API is used to initiate the upload session by sending a POST request and append your upload session {id}
        along with the required headers indicated below. Upon success, a file handle, {h}, is returned that you can then
        use with any Partners API endpoints that support file handles returned by the Resumable Upload API.
      tags:
        - Media
      security:
        - apiKey: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                sig:
                  type: string
                  x-parameter-in: query
            example:
              sig: ARbUFIDlNcIbRnOalIY
      responses:
        '200':
          description: The request was successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  raw_example:
                    type: string
              example:
                raw_example: |
                  {
                  "h":
                  "4::dmlkZW8vbXA0:ARa3wu4QWKmzupRJa-dmysHBZrmo4TxDVwJgvvtbhvqMqPb-UC
                  GRtNE_S6FjueRXMCx_SDgd9JEQ6IYQKfgEOKM-IAQyzIH-fDz10LSpckfiWA:e:171688
                  5369:769756078280509:100083728822881:ARYnUsRqjwJdiFsDk9c"
                  }
        '400':
          description: Bad request or invalid parameters.
          content:
            application/json:
              schema:
                type: object
                properties:
                  raw_example:
                    type: string
        '401':
          description: API key is missing or invalid.
          content:
            application/json:
              schema:
                type: object
                properties:
                  raw_example:
                    type: string
        '403':
          description: The request is not authorized for this resource.
          content:
            application/json:
              schema:
                type: object
                properties:
                  raw_example:
                    type: string
        '404':
          description: The requested resource was not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  raw_example:
                    type: string
        '500':
          description: The server encountered an error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  raw_example:
                    type: string
  /{wabaid}/message_templates:
    post:
      operationId: create-authentication-copy-code-template
      summary: Create Authentication Copy Code Template
      description: This API is used to create a copy code authentication template.
      tags:
        - Templates
      security:
        - apiKey: []
      parameters:
        - name: wabaid
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                category:
                  type: string
                language:
                  type: string
                components:
                  type: array
                  items:
                    type: object
                    properties:
                      type:
                        type: string
                      add_security_recommendation:
                        type: boolean
                message_send_ttl_seconds:
                  type: integer
            example:
              name: copycode_noexp_2111
              category: authentication
              language: en_US
              components:
                - type: body
                  add_security_recommendation: true
                - type: footer
                  code_expiration_minutes: 5
                - type: buttons
                  buttons:
                    - text: Copy Code
                      type: otp
                      otp_type: copy_code
              message_send_ttl_seconds: 60
      responses:
        '200':
          description: The request was successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  status:
                    type: string
                  category:
                    type: string
              example:
                id: '123412341234123'
                status: APPROVED
                category: AUTHENTICATION
        '400':
          description: Bad request or invalid parameters.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  status:
                    type: string
                  category:
                    type: string
        '401':
          description: API key is missing or invalid.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  status:
                    type: string
                  category:
                    type: string
        '403':
          description: The request is not authorized for this resource.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  status:
                    type: string
                  category:
                    type: string
        '404':
          description: The requested resource was not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  status:
                    type: string
                  category:
                    type: string
        '500':
          description: The server encountered an error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  status:
                    type: string
                  category:
                    type: string
    get:
      operationId: get-all-templates
      summary: Get all templates
      description: This API is used to check all the templates for a particular user.
      tags:
        - Templates
      security:
        - apiKey: []
      parameters:
        - name: wabaid
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: The request was successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  raw_example:
                    type: string
              example:
                raw_example: |
                  {
                  "data": [
                  {
                  "name": "ltotemp36013m103",
                  "components": [
                  {
                  "type": "BODY",
                  "text": "Hey User, caribeen ackages!"
                  },
                  {
                  "type": "LIMITED_TIME_OFFER",
                  "limited_time_offer": {
                  "text": "Expiring offer!",
                  "has_expiration": true
                  }
                  },

                  {
                  "type": "BUTTONS",
                  "buttons": [
                  {
                  "type": "COPY_CODE",
                  "text": "Copy offer code",
                  "example": [
                  "CARIBE25"
                  ]
                  },
                  {
                  "type": "URL",
                  "text": "Click",
                  "url": "https:
                  "example": [
                  "dynamic-url-example"
                  ]
                  },
                  {
                  "type": "PHONE_NUMBER",
                  "text": "call",
                  "phone_number": "+917755991051"
                  }
                  ]
                  }
                  ],
                  "language": "en_US",
                  "status": "APPROVED",

                  "category": "MARKETING",
                  "id": "2883983598406625"
                  },
                  {
                  "name": "ltotemp36013m102",
                  "components": [
                  {
                  "type": "BODY",
                  "text": "Hey User, caribeen ackages!"
                  },
                  {
                  "type": "LIMITED_TIME_OFFER",
                  "limited_time_offer": {
                  "text": "Expiring offer!",
                  "has_expiration": true
                  }
                  },
                  {
                  "type": "BUTTONS",
                  "buttons": [
                  {
                  "type": "COPY_CODE",
                  "text": "Copy offer code",
                  "example": [
                  "CARIBE25"
                  ]
                  },
                  {

                  "type": "URL",
                  "text": "Click",
                  "url": "https:
                  "example": [
                  "dynamic-url-example"
                  ]
                  },
                  {
                  "type": "PHONE_NUMBER",
                  "text": "call",
                  "phone_number": "+917755991051"
                  }
                  ]
                  }
                  ],
                  "language": "en_US",
                  "status": "APPROVED",
                  "category": "MARKETING",
                  "id": "268188973054423"
                  }
                  ]
                  }
        '400':
          description: Bad request or invalid parameters.
          content:
            application/json:
              schema:
                type: object
                properties:
                  raw_example:
                    type: string
        '401':
          description: API key is missing or invalid.
          content:
            application/json:
              schema:
                type: object
                properties:
                  raw_example:
                    type: string
        '403':
          description: The request is not authorized for this resource.
          content:
            application/json:
              schema:
                type: object
                properties:
                  raw_example:
                    type: string
        '404':
          description: The requested resource was not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  raw_example:
                    type: string
        '500':
          description: The server encountered an error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  raw_example:
                    type: string
    delete:
      operationId: delete-template-by-name-and-id
      summary: Delete Template by name and id
      description: This API is used to delete the template by its name and id
      tags:
        - Templates
      security:
        - apiKey: []
      parameters:
        - name: wabaid
          in: path
          required: true
          schema:
            type: string
        - name: name
          in: query
          required: false
          schema:
            type: string
        - name: hsm_id
          in: query
          required: false
          schema:
            type: string
      responses:
        '200':
          description: The request was successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
              example:
                success: true
        '400':
          description: Bad request or invalid parameters.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
        '401':
          description: API key is missing or invalid.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
        '403':
          description: The request is not authorized for this resource.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
        '404':
          description: The requested resource was not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
        '500':
          description: The server encountered an error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
  /{wabaid}:
    get:
      operationId: fetch-waba-information
      summary: Fetch Waba Information
      description: This API is used to fetch the waba details.
      tags:
        - Business Accounts
      security:
        - apiKey: []
      parameters:
        - name: wabaid
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: The request was successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  name:
                    type: string
                  currency:
                    type: string
                  timezone_id:
                    type: string
                  message_template_namespace:
                    type: string
              example:
                id: '100249586351323'
                name: Developer Pinnacle WABA
                currency: INR
                timezone_id: '71'
                message_template_namespace: 13f5d10e_e4ed_4de3_8538_cd0b2a7918d4
        '400':
          description: Bad request or invalid parameters.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  name:
                    type: string
                  currency:
                    type: string
                  timezone_id:
                    type: string
                  message_template_namespace:
                    type: string
        '401':
          description: API key is missing or invalid.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  name:
                    type: string
                  currency:
                    type: string
                  timezone_id:
                    type: string
                  message_template_namespace:
                    type: string
        '403':
          description: The request is not authorized for this resource.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  name:
                    type: string
                  currency:
                    type: string
                  timezone_id:
                    type: string
                  message_template_namespace:
                    type: string
        '404':
          description: The requested resource was not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  name:
                    type: string
                  currency:
                    type: string
                  timezone_id:
                    type: string
                  message_template_namespace:
                    type: string
        '500':
          description: The server encountered an error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  name:
                    type: string
                  currency:
                    type: string
                  timezone_id:
                    type: string
                  message_template_namespace:
                    type: string
  /{msgtemplateid}:
    get:
      operationId: get-template-with-id
      summary: Get template with id
      description: This API is used to check the template using template id.
      tags:
        - Templates
      security:
        - apiKey: []
      parameters:
        - name: msgtemplateid
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: The request was successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  raw_example:
                    type: string
              example:
                raw_example: |
                  {
                  "name": "ltotemp36013m103",
                  "components": [
                  {
                  "type": "BODY",
                  "text": "Hey User, caribeen ackages!"
                  },
                  {
                  "type": "LIMITED_TIME_OFFER",
                  "limited_time_offer": {
                  "text": "Expiring offer!",
                  "has_expiration": true
                  }
                  },
                  {
                  "type": "BUTTONS",

                  "buttons": [
                  {
                  "type": "COPY_CODE",
                  "text": "Copy offer code",
                  "example": [ "CARIBE25"]
                  },
                  {
                  "type": "URL",
                  "text": "Click",
                  "url": "https:
                  "example": [
                  "dynamic-url-example"
                  ]
                  },
                  {
                  "type": "PHONE_NUMBER",
                  "text": "call",
                  "phone_number": "+917755991051"
                  }
                  ]
                  }
                  ],
                  "language": "en_US",
                  "status": "APPROVED",
                  "category": "MARKETING",
                  "id": "2883983598406625"
                  }
        '400':
          description: Bad request or invalid parameters.
          content:
            application/json:
              schema:
                type: object
                properties:
                  raw_example:
                    type: string
        '401':
          description: API key is missing or invalid.
          content:
            application/json:
              schema:
                type: object
                properties:
                  raw_example:
                    type: string
        '403':
          description: The request is not authorized for this resource.
          content:
            application/json:
              schema:
                type: object
                properties:
                  raw_example:
                    type: string
        '404':
          description: The requested resource was not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  raw_example:
                    type: string
        '500':
          description: The server encountered an error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  raw_example:
                    type: string
    post:
      operationId: edit-template
      summary: Edit Template
      description: >-
        This API is used to edit the template. If your template status has been set to REJECTED as part of category
        validation, you have several options: 1. Edit the template's components. 2. Edit the template's category. 3.
        Create a new template.
      tags:
        - Templates
      security:
        - apiKey: []
      parameters:
        - name: msgtemplateid
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties: {}
            example: {}
      responses:
        '200':
          description: The request was successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
              example:
                success: true
        '400':
          description: Bad request or invalid parameters.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
        '401':
          description: API key is missing or invalid.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
        '403':
          description: The request is not authorized for this resource.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
        '404':
          description: The requested resource was not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
        '500':
          description: The server encountered an error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
  /getuserdetails:
    get:
      operationId: get-user-details
      summary: Get user details
      description: This API is used to fetch user details
      tags:
        - Business Accounts
      security:
        - apiKey: []
      responses:
        '200':
          description: The request was successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        wanumber:
                          type: string
                        phone_number_id:
                          type: string
                        whatsapp_business_account_id:
                          type: string
                  status:
                    type: string
              example:
                code: 200
                data:
                  - wanumber: '+919921447944'
                    phone_number_id: '111266881902966'
                    whatsapp_business_account_id: '100249586351323'
                  - wanumber: '+919921449959'
                    phone_number_id: '112672835072002'
                    whatsapp_business_account_id: '100249586351323'
                status: SUCCESS
        '400':
          description: Bad request or invalid parameters.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        wanumber:
                          type: string
                        phone_number_id:
                          type: string
                        whatsapp_business_account_id:
                          type: string
                  status:
                    type: string
        '401':
          description: API key is missing or invalid.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        wanumber:
                          type: string
                        phone_number_id:
                          type: string
                        whatsapp_business_account_id:
                          type: string
                  status:
                    type: string
        '403':
          description: The request is not authorized for this resource.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        wanumber:
                          type: string
                        phone_number_id:
                          type: string
                        whatsapp_business_account_id:
                          type: string
                  status:
                    type: string
        '404':
          description: The requested resource was not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        wanumber:
                          type: string
                        phone_number_id:
                          type: string
                        whatsapp_business_account_id:
                          type: string
                  status:
                    type: string
        '500':
          description: The server encountered an error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        wanumber:
                          type: string
                        phone_number_id:
                          type: string
                        whatsapp_business_account_id:
                          type: string
                  status:
                    type: string
  /{phone_number_id}/setwebhook:
    post:
      operationId: set-webhook
      summary: Set Webhook
      description: >-
        This API is used to set a webhook url against the waba using phone number id. The callback payload received from
        Meta will be relayed to this webhook url along with the custom values as specified in the headers parameter of
        the request body.
      tags:
        - Webhooks & Security
      security:
        - apiKey: []
      parameters:
        - name: phone_number_id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                raw_example:
                  type: string
            example:
              raw_example: |-
                {
                "webhook_url": "https:
                "headers": {
                "header1": "header1_value",
                "header2": "header2_value"
                }
                }
      responses:
        '200':
          description: The request was successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  status:
                    type: string
                  message:
                    type: string
              example:
                code: '200'
                status: Success
                message: Your webhook has been configured successfully
        '400':
          description: Bad request or invalid parameters.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  status:
                    type: string
                  message:
                    type: string
        '401':
          description: API key is missing or invalid.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  status:
                    type: string
                  message:
                    type: string
        '403':
          description: The request is not authorized for this resource.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  status:
                    type: string
                  message:
                    type: string
        '404':
          description: The requested resource was not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  status:
                    type: string
                  message:
                    type: string
        '500':
          description: The server encountered an error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  status:
                    type: string
                  message:
                    type: string
  /{phone_number_id}/getwebhook:
    get:
      operationId: get-webhook
      summary: Get Webhook
      description: This API is used to get the webhook url against the waba using phone number id.
      tags:
        - Webhooks & Security
      security:
        - apiKey: []
      parameters:
        - name: phone_number_id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: The request was successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  raw_example:
                    type: string
              example:
                raw_example: |
                  {
                  "webhook_url": "https:
                  "headers": {
                  "header1": "header1_value",
                  "header2": "header2_value"
                  }
                  }
        '400':
          description: Bad request or invalid parameters.
          content:
            application/json:
              schema:
                type: object
                properties:
                  raw_example:
                    type: string
        '401':
          description: API key is missing or invalid.
          content:
            application/json:
              schema:
                type: object
                properties:
                  raw_example:
                    type: string
        '403':
          description: The request is not authorized for this resource.
          content:
            application/json:
              schema:
                type: object
                properties:
                  raw_example:
                    type: string
        '404':
          description: The requested resource was not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  raw_example:
                    type: string
        '500':
          description: The server encountered an error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  raw_example:
                    type: string
  /flows/{phone_number_id}/set_whatsapp_business_encryption:
    post:
      operationId: set-whatsapp-business-encryption-key
      summary: Set Whatsapp Business Encryption Key
      description: This API is used to set the whatsapp business encryption key using phone number id.
      tags:
        - Webhooks & Security
      security:
        - apiKey: []
      parameters:
        - name: phone_number_id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties: {}
            example: {}
      responses:
        '200':
          description: The request was successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
              example:
                success: true
        '400':
          description: Bad request or invalid parameters.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
        '401':
          description: API key is missing or invalid.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
        '403':
          description: The request is not authorized for this resource.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
        '404':
          description: The requested resource was not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
        '500':
          description: The server encountered an error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
  /flows/{phone_number_id}/get_private_key:
    get:
      operationId: get-whatsapp-business-encryption-key
      summary: Get Whatsapp Business Encryption Key
      description: This API is used to get the whatsapp business encryption key using phone number id.
      tags:
        - Webhooks & Security
      security:
        - apiKey: []
      parameters:
        - name: phone_number_id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: The request was successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  raw_example:
                    type: string
              example:
                raw_example: |
                  {
                  "result": " ---- BEGIN RSA PRIVATE
                  KEY ---- \nMIIEpAIBAAKCAQEA4I6QAFQ7T8/bwuIDcAvjt5RFG+mHiZJUzNl4IPn5RE2F
                  3eHR\nclv+oXzly2FgqxzZxuAvccCRzIWojipadZ/mVA+b/3elmUQD0zY8XFd8iOZYwwVr\
                  nwLSKPNmF47Jfev+ePb2g4pnVk5i1f4qC7G1mmybvVTSyCyFmsGwri+uCU4D43OfR\
                  nkS+xjNK20ZAFsMQqhfxzOm348Ll+VcDCkLeTOWUyfJIuU+JOZm32ocAaLVPPiv92\n
                  cUS5yWI1gAZPBVD4rBtOvU45ROVeBIhvu8gTyZ/QmGoasb1OPb3Ao6EYNHFFiCcT\n
                  CbBtUVEwhD58jexY4qE6R0o3w7GXTmOZwfoLgwIDAQABAoIBAAGCBrDdlQJIQWW
                  9\nZApAJnsuJLIsTLXb5X1FvLjDFuowcUY1wdTr0pEXjnu5IeJnARvoqkoQ+tF3Mvy+\nk
                  +TOxrH4X6TinGtx7DKnJif1H6iVfQ9R57fz6VZdY+q3Qb0/eUdMySmt8a1MFyMK\nyZ6M
                  mXibIFasMsf4hhhJs8/XOOKJ8fX2zjDHHIACJYzIwO51xCYO0Jv5jSJd4+ks\ngDSgKIjyI
                  e8UlbKGoHO8nfsFK2zv7Q7mC1lUgx2zK/g9sE+xKl11KYbLV5FR0Z5O\nNGbF473xxee
                  raSEhC1+oFXw+wpEBjw4QMmhs9nJXxLdvvcu4b602PYRG+E6sV1Y/\nX+iMLYkCgYE
                  A/zeCVgEfsif+ZOELERr/aHoWLdhOmHlYC/nl38FjlX19KFIwv518\n/Tpg5oUPEhvcZeFT
                  /kYWWrhvVu/rNaDt5EEDwhQ/EHVrkVWCfKrtnBIO8NZpTUg3\nVx7lSdsRJ19ESBXX4t
                  LdYekfgQLdbAuAmAFamvZSPvqmj8abWYM+b9kCgYEA4T73\nwzaLo9OELlqU/0H8wi
                  YY8gCmd7fmdARYeD3f4DvD==\n-----END RSA PRIVATE KEY "
                  }
        '400':
          description: Bad request or invalid parameters.
          content:
            application/json:
              schema:
                type: object
                properties:
                  raw_example:
                    type: string
        '401':
          description: API key is missing or invalid.
          content:
            application/json:
              schema:
                type: object
                properties:
                  raw_example:
                    type: string
        '403':
          description: The request is not authorized for this resource.
          content:
            application/json:
              schema:
                type: object
                properties:
                  raw_example:
                    type: string
        '404':
          description: The requested resource was not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  raw_example:
                    type: string
        '500':
          description: The server encountered an error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  raw_example:
                    type: string
  /{phone_number_id}/payments/{payment_configuration}/{order-id}:
    get:
      operationId: get-payment-status
      summary: Get Payment Status
      description: This API is used to get the payment status for the given order id using phone number id.
      tags:
        - Payments
      security:
        - apiKey: []
      parameters:
        - name: phone_number_id
          in: path
          required: true
          schema:
            type: string
        - name: payment_configuration
          in: path
          required: true
          schema:
            type: string
        - name: order-id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: The request was successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  payments:
                    type: array
                    items:
                      type: object
                      properties:
                        amount:
                          type: object
                          properties:
                            value:
                              type: integer
                            offset:
                              type: integer
                        status:
                          type: string
                        currency:
                          type: string
                        reference_id:
                          type: string
              example:
                payments:
                  - amount:
                      value: 100
                      offset: 100
                    status: PENDING
                    currency: INR
                    reference_id: order-id
        '400':
          description: Bad request or invalid parameters.
          content:
            application/json:
              schema:
                type: object
                properties:
                  payments:
                    type: array
                    items:
                      type: object
                      properties:
                        amount:
                          type: object
                          properties:
                            value:
                              type: integer
                            offset:
                              type: integer
                        status:
                          type: string
                        currency:
                          type: string
                        reference_id:
                          type: string
        '401':
          description: API key is missing or invalid.
          content:
            application/json:
              schema:
                type: object
                properties:
                  payments:
                    type: array
                    items:
                      type: object
                      properties:
                        amount:
                          type: object
                          properties:
                            value:
                              type: integer
                            offset:
                              type: integer
                        status:
                          type: string
                        currency:
                          type: string
                        reference_id:
                          type: string
        '403':
          description: The request is not authorized for this resource.
          content:
            application/json:
              schema:
                type: object
                properties:
                  payments:
                    type: array
                    items:
                      type: object
                      properties:
                        amount:
                          type: object
                          properties:
                            value:
                              type: integer
                            offset:
                              type: integer
                        status:
                          type: string
                        currency:
                          type: string
                        reference_id:
                          type: string
        '404':
          description: The requested resource was not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  payments:
                    type: array
                    items:
                      type: object
                      properties:
                        amount:
                          type: object
                          properties:
                            value:
                              type: integer
                            offset:
                              type: integer
                        status:
                          type: string
                        currency:
                          type: string
                        reference_id:
                          type: string
        '500':
          description: The server encountered an error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  payments:
                    type: array
                    items:
                      type: object
                      properties:
                        amount:
                          type: object
                          properties:
                            value:
                              type: integer
                            offset:
                              type: integer
                        status:
                          type: string
                        currency:
                          type: string
                        reference_id:
                          type: string
  /{catalog-id}/batch:
    post:
      operationId: delete-catalog-product
      summary: Delete Catalog Product
      description: This API is used to delete a product in the given catalog id.
      tags:
        - Catalogues
      security:
        - apiKey: []
      parameters:
        - name: catalog-id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                raw_example:
                  type: string
            example:
              raw_example: |-
                {
                "requests": [
                {

                "method": "DELETE",
                "retailer_id": "product-06600",
                "data": {
                "availability": "in stock",
                "brand": "Reebok11",
                "category": "t-shirts",
                "description": "product yttfytdcgfc description",
                "image_url":
                "https:
                1df66729296a4c/teshirt_resize.jpeg",
                "name": "product changed name",
                "price": 19999000,
                "currency": "USD",
                "shipping": [
                {
                "country": "IND",
                "region": "DELHI",
                "service": "service",
                "price_value": "10000",
                "price_currency": "INR"
                }
                ],
                "condition": "new",
                "url":
                "https:
                1df66729296a4c/image_nataraj.jpeg",
                "retailer_product_group_id": "product_default_group7248848229855971"
                },
                "applinks": {
                "android": [
                {
                "app_name": "Electronic Example Android",
                "package": "com.electronic",
                "url": "example-android:
                }
                ],
                "ios": [

                {
                "app_name": "Electronic Example iOS",
                "app_store_id": 2222,
                "url": "example-ios:
                }
                ]
                }
                }
                ]
                }
      responses:
        '200':
          description: The request was successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  raw_example:
                    type: string
              example:
                raw_example: |-
                  {
                  "handles": [
                  "Acz1PhjuHgjASuVQNGpP5wQjo7ropYHHuBgpzzoQNK4bXCij7vz0X-gyLsZkh-awMop
                  3eTvjX_KkcDsL4Bd9RR_6"
                  ]
                  }
        '400':
          description: Bad request or invalid parameters.
          content:
            application/json:
              schema:
                type: object
                properties:
                  raw_example:
                    type: string
        '401':
          description: API key is missing or invalid.
          content:
            application/json:
              schema:
                type: object
                properties:
                  raw_example:
                    type: string
        '403':
          description: The request is not authorized for this resource.
          content:
            application/json:
              schema:
                type: object
                properties:
                  raw_example:
                    type: string
        '404':
          description: The requested resource was not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  raw_example:
                    type: string
        '500':
          description: The server encountered an error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  raw_example:
                    type: string
  /{catalog-id}/products:
    get:
      operationId: product-catalog-api
      summary: Product Catalog API
      description: This API is used to fetch the products in the given catalog id.
      tags:
        - Catalogues
      security:
        - apiKey: []
      parameters:
        - name: catalog-id
          in: path
          required: true
          schema:
            type: string
        - name: limit
          in: query
          required: false
          schema:
            type: string
        - name: fields
          in: query
          required: false
          schema:
            type: string
        - name: filter
          in: query
          required: false
          schema:
            type: string
        - name: summary
          in: query
          required: false
          schema:
            type: string
      responses:
        '200':
          description: The request was successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  raw_example:
                    type: string
              example:
                raw_example: |
                  {
                  "data": [
                  {
                  "category": "Shirt",
                  "name": "product changed name",
                  "retailer_id": "group1",
                  "price": "₹10.00",
                  "availability": "in stock",
                  "description": "product description",
                  "brand": "Pinnacle",
                  "image_url":
                  "https:
                  4-english-oven-bread-pav.jpg",
                  "retailer_product_group_id": "1",
                  "id": "catalog-id"
                  },
                  {
                  "category": "Shirt",
                  "name": "product changed name 3",
                  "retailer_id": "group3",
                  "price": "₹10.00",
                  "availability": "in stock",
                  "description": "product description",
                  "brand": "Pinnacle",

                  "image_url":
                  "https:
                  4-english-oven-bread-pav.jpg",
                  "retailer_product_group_id": "1",
                  "id": "catalog-id"
                  }
                  ],
                  "paging": {
                  "cursors": {
                  "before": "eyJvZAmZAzZAXQiOjB9",
                  "after": "eyJvZAmZAzZAXQiOjF9"
                  },
                  "next":
                  "https:
                  %22i_contains%22%3A%22product%20changed%20name%22%7D%7D&summary=tr
                  ue&fields=%5B%22category%22%2C%22name%22%2C%22retailer_id%22%2C%22pr
                  ice%22%2C%22availability%22%2C%22description%22%2C%22country%22%2C%22
                  brand%22%2C%22image_url%22%2C%22size%22%2C%22color%22%2C%20%22ret
                  ailer_product_group_id%22%2C%22thumbnail_product_retailer_id%22%5D&limit=2&af
                  ter=eyJvZAmZAzZAXQiOjF9",
                  "previous":
                  "https:
                  %22i_contains%22%3A%22product%20changed%20name%22%7D%7D&summary=tr
                  ue&fields=%5B%22category%22%2C%22name%22%2C%22retailer_id%22%2C%22pr
                  ice%22%2C%22availability%22%2C%22description%22%2C%22country%22%2C%22
                  brand%22%2C%22image_url%22%2C%22size%22%2C%22color%22%2C%20%22ret
                  ailer_product_group_id%22%2C%22thumbnail_product_retailer_id%22%5D&limit=2&b
                  efore=eyJvZAmZAzZAXQiOjB9"
                  },
                  "summary": {
                  "total_count": 11
                  }
                  }
        '400':
          description: Bad request or invalid parameters.
          content:
            application/json:
              schema:
                type: object
                properties:
                  raw_example:
                    type: string
        '401':
          description: API key is missing or invalid.
          content:
            application/json:
              schema:
                type: object
                properties:
                  raw_example:
                    type: string
        '403':
          description: The request is not authorized for this resource.
          content:
            application/json:
              schema:
                type: object
                properties:
                  raw_example:
                    type: string
        '404':
          description: The requested resource was not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  raw_example:
                    type: string
        '500':
          description: The server encountered an error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  raw_example:
                    type: string
  /fetchcatalogId:
    get:
      operationId: product-catalog-api-page-224
      summary: Product Catalog API
      description: This API is used to fetch the catalog id for the given waba number.
      tags:
        - Catalogues
      security:
        - apiKey: []
      responses:
        '200':
          description: The request was successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  data:
                    type: object
                    properties:
                      catlogid:
                        type: string
                  status:
                    type: string
                  message:
                    type: string
              example:
                code: 200
                data:
                  catlogid: catalog-id
                status: SUCCESS
                message: Catalog data fetch successfully
        '400':
          description: Bad request or invalid parameters.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  data:
                    type: object
                    properties:
                      catlogid:
                        type: string
                  status:
                    type: string
                  message:
                    type: string
        '401':
          description: API key is missing or invalid.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  data:
                    type: object
                    properties:
                      catlogid:
                        type: string
                  status:
                    type: string
                  message:
                    type: string
        '403':
          description: The request is not authorized for this resource.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  data:
                    type: object
                    properties:
                      catlogid:
                        type: string
                  status:
                    type: string
                  message:
                    type: string
        '404':
          description: The requested resource was not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  data:
                    type: object
                    properties:
                      catlogid:
                        type: string
                  status:
                    type: string
                  message:
                    type: string
        '500':
          description: The server encountered an error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  data:
                    type: object
                    properties:
                      catlogid:
                        type: string
                  status:
                    type: string
                  message:
                    type: string
  /{business-id}/owned_whatsapp_business_accounts:
    get:
      operationId: get-owned-whatsapp-business-accounts
      summary: Get Owned Whatsapp Business Accounts
      description: This API is used to fetch the owned whatsapp business accounts details for the given business id.
      tags:
        - Business Accounts
      security:
        - apiKey: []
      parameters:
        - name: business-id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: The request was successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        name:
                          type: string
                        currency:
                          type: string
                        timezone_id:
                          type: string
                        message_template_namespace:
                          type: string
              example:
                data:
                  - id: waba-id-1
                    name: ABC
                    currency: INR
                    timezone_id: '71'
                    message_template_namespace: message_template_namespace-1
                  - id: waba-id-2
                    name: DEF
                    currency: INR
                    timezone_id: '71'
                    message_template_namespace: message_template_namespace-2
        '400':
          description: Bad request or invalid parameters.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        name:
                          type: string
                        currency:
                          type: string
                        timezone_id:
                          type: string
                        message_template_namespace:
                          type: string
        '401':
          description: API key is missing or invalid.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        name:
                          type: string
                        currency:
                          type: string
                        timezone_id:
                          type: string
                        message_template_namespace:
                          type: string
        '403':
          description: The request is not authorized for this resource.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        name:
                          type: string
                        currency:
                          type: string
                        timezone_id:
                          type: string
                        message_template_namespace:
                          type: string
        '404':
          description: The requested resource was not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        name:
                          type: string
                        currency:
                          type: string
                        timezone_id:
                          type: string
                        message_template_namespace:
                          type: string
        '500':
          description: The server encountered an error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        name:
                          type: string
                        currency:
                          type: string
                        timezone_id:
                          type: string
                        message_template_namespace:
                          type: string
  /{business-id}/client_whatsapp_business_accounts:
    get:
      operationId: get-client-whatsapp-business-accounts
      summary: Get Client Whatsapp Business Accounts
      description: This API is used to fetch the client whatsapp business accounts details for the given business id.
      tags:
        - Business Accounts
      security:
        - apiKey: []
      parameters:
        - name: business-id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: The request was successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        name:
                          type: string
                        currency:
                          type: string
                        timezone_id:
                          type: string
                        message_template_namespace:
                          type: string
              example:
                data:
                  - id: waba-id-1
                    name: ABC
                    currency: INR
                    timezone_id: '71'
                    message_template_namespace: message_template_namespace-1
                  - id: waba-id-2
                    name: DEF
                    currency: INR
                    timezone_id: '71'
                    message_template_namespace: message_template_namespace-2
        '400':
          description: Bad request or invalid parameters.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        name:
                          type: string
                        currency:
                          type: string
                        timezone_id:
                          type: string
                        message_template_namespace:
                          type: string
        '401':
          description: API key is missing or invalid.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        name:
                          type: string
                        currency:
                          type: string
                        timezone_id:
                          type: string
                        message_template_namespace:
                          type: string
        '403':
          description: The request is not authorized for this resource.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        name:
                          type: string
                        currency:
                          type: string
                        timezone_id:
                          type: string
                        message_template_namespace:
                          type: string
        '404':
          description: The requested resource was not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        name:
                          type: string
                        currency:
                          type: string
                        timezone_id:
                          type: string
                        message_template_namespace:
                          type: string
        '500':
          description: The server encountered an error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        name:
                          type: string
                        currency:
                          type: string
                        timezone_id:
                          type: string
                        message_template_namespace:
                          type: string
  /{phone_number_id}/whatsapp_business_profile:
    get:
      operationId: get-whatsapp-business-profile
      summary: Get Whatsapp Business Profile
      description: This API is used to fetch the whatsapp business profile details for the given phone number id.
      tags:
        - Business Accounts
      security:
        - apiKey: []
      parameters:
        - name: phone_number_id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: The request was successful.
          content:
            application/json:
              schema:
                type: object
                properties: {}
        '400':
          description: Bad request or invalid parameters.
          content:
            application/json:
              schema:
                type: object
                properties: {}
        '401':
          description: API key is missing or invalid.
          content:
            application/json:
              schema:
                type: object
                properties: {}
        '403':
          description: The request is not authorized for this resource.
          content:
            application/json:
              schema:
                type: object
                properties: {}
        '404':
          description: The requested resource was not found.
          content:
            application/json:
              schema:
                type: object
                properties: {}
        '500':
          description: The server encountered an error.
          content:
            application/json:
              schema:
                type: object
                properties: {}
  /business/{businessPhoneNumberId}/message_qrdls:
    get:
      operationId: get-qr-code-png-image-url
      summary: Get QR code PNG image URL
      description: This API is used to confirm that template analytics capture will begin for the WhatsApp Business Account.
      tags:
        - QR Codes
      security:
        - apiKey: []
      parameters:
        - name: businessPhoneNumberId
          in: path
          required: true
          schema:
            type: string
        - name: code
          in: query
          required: false
          schema:
            type: string
        - name: fields
          in: query
          required: false
          schema:
            type: string
      responses:
        '200':
          description: The request was successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  raw_example:
                    type: string
              example:
                raw_example: |-
                  {
                  "data": [
                  {
                  "code": "RPASB5GEAP6FO1",
                  "prefilled_message": "Abhijit Wankhede",
                  "qr_image_url": "http:
                  south-1.amazonaws.com/v3/images?url=https%3A%2F%2Fscontent-bom2-
                  1.xx.fbcdn.net%2Fm1%2Fv%2Ft6%2FAn-5bm0Cig4I0JX5q76hym3nOOrIXzHGlyq-
                  _TSsOueaf7PUkOrnAkaaVi51Qoh-
                  yhziBnQNDHErnFz7575quYndtQhJ34PyVATVftCfn0wSuLjocBeoB23atnhhMH2oWmY
                  Nn-pJ-Rwi%3Fccb%3D10-
                  5%26oh%3D00_AYAEvjtIp6oIFiCBY27kuuTqrC2aqFPFqeEXijw5F8GvyA%26oe%3D67
                  516D5A%26_nc_sid%3D5a413f",
                  "deep_link_url": "https:
                  }
                  ]
                  }
        '400':
          description: Bad request or invalid parameters.
          content:
            application/json:
              schema:
                type: object
                properties:
                  raw_example:
                    type: string
        '401':
          description: API key is missing or invalid.
          content:
            application/json:
              schema:
                type: object
                properties:
                  raw_example:
                    type: string
        '403':
          description: The request is not authorized for this resource.
          content:
            application/json:
              schema:
                type: object
                properties:
                  raw_example:
                    type: string
        '404':
          description: The requested resource was not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  raw_example:
                    type: string
        '500':
          description: The server encountered an error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  raw_example:
                    type: string
    post:
      operationId: update-message-qr-code
      summary: Update Message QR Code
      description: This API is used to confirm that template analytics capture will begin for the WhatsApp Business Account.
      tags:
        - QR Codes
      security:
        - apiKey: []
      parameters:
        - name: businessPhoneNumberId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                code:
                  type: string
                generate_qr_image:
                  type: string
                prefilled_message:
                  type: string
            example:
              code: RPASB5GEAP6FO1
              generate_qr_image: PNG
              prefilled_message: Abhijit...
      responses:
        '200':
          description: The request was successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  raw_example:
                    type: string
              example:
                raw_example: |-
                  {
                  "code": "RPASB5GEAP6FO1",
                  "prefilled_message": "Abhijit...",

                  "deep_link_url": "https:
                  "qr_image_url": "http:
                  1.amazonaws.com/v3/images?url=https%3A%2F%2Fscontent-bom2-
                  1.xx.fbcdn.net%2Fm1%2Fv%2Ft6%2FAn9QzAPXFIY1DoJPnlMI13J3KlRyn5YeDA8b39
                  NdG7NKd1QSd8LduFa5Uzkk3INp9-
                  2FzX_K3C3LWlp_bzNNSkRzaFYgRmY7WI7vVlTtCpxru2aPJ6djhMvLcXiuuWtBTK4FBI
                  ueais%3Fccb%3D10-5%26oh%3D00_AYCUqDtBQjltvGvCMW_kc0ch85m6_RaZzwiZ4-
                  trhUGaDQ%26oe%3D675183BB%26_nc_sid%3D5a413f"
                  }
        '400':
          description: Bad request or invalid parameters.
          content:
            application/json:
              schema:
                type: object
                properties:
                  raw_example:
                    type: string
        '401':
          description: API key is missing or invalid.
          content:
            application/json:
              schema:
                type: object
                properties:
                  raw_example:
                    type: string
        '403':
          description: The request is not authorized for this resource.
          content:
            application/json:
              schema:
                type: object
                properties:
                  raw_example:
                    type: string
        '404':
          description: The requested resource was not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  raw_example:
                    type: string
        '500':
          description: The server encountered an error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  raw_example:
                    type: string
  /business/{businessPhoneNumberId}/message_qrdls/:codeId:
    delete:
      operationId: delete-qr-code
      summary: Delete QR code
      description: This API is used to confirm that template analytics capture will begin for the WhatsApp Business Account.
      tags:
        - QR Codes
      security:
        - apiKey: []
      parameters:
        - name: businessPhoneNumberId
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: The request was successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
              example:
                success: true
        '400':
          description: Bad request or invalid parameters.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
        '401':
          description: API key is missing or invalid.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
        '403':
          description: The request is not authorized for this resource.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
        '404':
          description: The requested resource was not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
        '500':
          description: The server encountered an error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
components:
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: api key
