openapi: 3.1.0
info:
  title: RCS API
  version: '1.0'
  description: APIs for rich cards, suggested actions, and RCS delivery.
servers:
  - url: https://api.example.com/rcs
paths:
  /api/v1/create-template:
    post:
      operationId: create-template-standalone
      summary: create-template - STANDALONE
      description: ''
      tags:
        - TEMPLATES
      security: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: string
            example:
              raw_example: |-
                {
                    "templateName": "18_pdf",
                    "templateType": "rich_card",
                    "botId": "{{nhea_botId}}",
                    "botMessageType": "PROMOTIONAL",
                    "isSMSFallbackRequired": false,
                    "richCardStandAloneDetails": {
                        "mediaType":"pdf",
                        "cardOrientation": "HORIZONTAL",
                        "cardAlignment": "RIGHT", 
                        "mediaHeight": "MEDIUM_HEIGHT",
                        "cardTitle": "Happy Ganesh Chaturthi!",
                        "cardDescription": "Ganesh Chaturthi!",
                        "media": {
                            "url": "https://rcs-bot-media-public.s3.ap-south-1.amazonaws.com/665873c0c660399dce731130/65c4eabecf32f14a18535f10/68e62ccce08a66956ff75a77/richCardStandAloneDetails_1759915212564_9mb.pdf"
                        },
                        // "thumbnail": {
                        //     "url": ""
                        // },
                        "suggestionsList": []
                    }
                }
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema: {}
  /api/v1/get-template-details-by-templateId:
    get:
      operationId: get-template-by-template-id
      summary: get template by template id
      description: ''
      tags:
        - TEMPLATES
      security: []
      parameters:
        - name: templateId
          in: query
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema: {}
  /api/v1/get-templateId-by-templateName-and-botId:
    get:
      operationId: get-template-by-template-name-to-botid
      summary: get template by template name to botId
      description: ''
      tags:
        - TEMPLATES
      security: []
      parameters:
        - name: botId
          in: query
          required: false
          schema:
            type: string
        - name: templateName
          in: query
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema: {}
  /api/v1/get-all-templates-by-botid:
    get:
      operationId: get-templates-by-botid
      summary: get templates by botid
      description: ''
      tags:
        - TEMPLATES
      security: []
      parameters:
        - name: botid
          in: query
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema: {}
  /api/v1/templates/whatsapp-fallback/{{nhea_botId}}:
    get:
      operationId: get-templates-by-botid-whatsapp-fallback
      summary: get templates by botid whatsapp fallback
      description: ''
      tags:
        - TEMPLATES
      security: []
      parameters:
        - name: '{nhea_botId'
          in: path
          required: true
          schema:
            type: string
        - name: templateType
          in: query
          required: false
          schema:
            type: string
        - name: variableLength
          in: query
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema: {}
  /api/v1/get-template-status/{{nhea_botId}}/9:
    get:
      operationId: get-template-status
      summary: get-template-status
      description: ''
      tags:
        - TEMPLATES
      security: []
      parameters:
        - name: '{nhea_botId'
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema: {}
  /api/v1/get-all-template-by-orgId:
    get:
      operationId: get-all-template-by-orgid
      summary: get-all-template-by-orgId
      description: ''
      tags:
        - TEMPLATES
      security: []
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema: {}
  /api/v1/get-template-preview-by-templateName:
    get:
      operationId: get-template-preview-by-name
      summary: get template preview by name
      description: ''
      tags:
        - TEMPLATES
      security: []
      parameters:
        - name: botId
          in: query
          required: false
          schema:
            type: string
        - name: templateName
          in: query
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema: {}
  /api/v1/update-template:
    post:
      operationId: update-template
      summary: update-template
      description: ''
      tags:
        - TEMPLATES
      security: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                botId:
                  type: string
                templateId:
                  type: string
            example:
              botId: 65c4eabecf32f14a18535f10
              templateId: 68fb548d60542703df6dd702
      responses:
        '401':
          description: Unauthorized
          content:
            application/json:
              schema: {}
              example:
                code: 401
                status: ERROR
                message: Authentication Failed (Invalid apikey)
  /api/v1/bot/config/set-relay-webhook-url:
    put:
      operationId: set-relay-webhook-url
      summary: Set relay webhook url
      description: ''
      tags:
        - BOTS / CONFIG
      security: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                botId:
                  type: string
                relayWebhookUrl:
                  type: string
            example:
              botId: 6996d1ce50cc911a8c97662f
              relayWebhookUrl: https://onespace.fabmediatech.com
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema: {}
  /mgmt/api/v1/bot/config/set-relay-webhook-url:
    put:
      operationId: set-relay-webhook-url-or-qa-onprem
      summary: Set relay webhook url | QA ONPREM
      description: ''
      tags:
        - BOTS / CONFIG
      security: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                botId:
                  type: string
                relayWebhookUrl:
                  type: string
            example:
              botId: 698c4accaa0f38dc2582434e
              relayWebhookUrl: https://qarcs-api.pinlab.in
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema: {}
  /api/v1/bot/config/get-relay-webhook-url:
    get:
      operationId: get-relay-webhook-url
      summary: Get relay webhook url
      description: ''
      tags:
        - BOTS / CONFIG
      security: []
      parameters:
        - name: botId
          in: query
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema: {}
  /api/v1/bot/config/set-payload-transform-type:
    put:
      operationId: set-payload-transform-type
      summary: set-payload-transform-type
      description: ''
      tags:
        - BOTS / CONFIG
      security: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                botId:
                  type: string
                payloadTransformType:
                  type: string
            example:
              botId: 68218acedb298103bc8d5931
              payloadTransformType: DEFAULT
      responses:
        '403':
          description: Forbidden
          content:
            application/json:
              schema: {}
              example:
                code: 403
                status: ERROR
                message: Unauthorized for this domain "localhost"
  /mgmt/api/v1/bot/config/set-payload-transform-type:
    put:
      operationId: set-payload-transform-type-or-qa-onprem
      summary: set-payload-transform-type | QA ONPREM
      description: ''
      tags:
        - BOTS / CONFIG
      security: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                botId:
                  type: string
                payloadTransformType:
                  type: string
            example:
              botId: 6690deca0e202b00019c034d
              payloadTransformType: MOH_ENGAGE_CONNECTOR
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema: {}
  /api/v1/bot/submit_bot_for_verification:
    post:
      operationId: submitbotforverification
      summary: submit_bot_for_verification
      description: ''
      tags:
        - BOTS / VERIFICATION
      security: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  type: string
                screenImages:
                  type: string
                  format: binary
            example:
              data: |-
                {
                  "botId": "6a1d390cf9cbdcd11b02290d",
                  "is_conversational_supported": true,
                  "is_opt_out_by_platform": true,
                  "bot_access_instructions": "bot_access_instructions",
                  "bot_interaction_types": "bot_interaction_types",
                  "opt_in_message": "opt_in_message",
                  "opt_out_keywords": "opt_out_keywords",
                  "opt_out_message": "opt_out_message",
                  "revoke_opt_out_keywords": "revoke_opt_out_keywords",
                  "trigger_action": "trigger_action temp",
                  "revoke_opt_out_message": "revoke_opt_out_message",
                  "bot_recog_keywords": "bot_recog_keywords",
                  "video_url": "https://file-examples.com/storage/fe1a98702d6a1d25f9af8f4/2017/04/file_example_MP4_480_1_5MG.mp4",
                  "screen_image": [
                    "screen1.png",
                    "screen2.png"
                  ]
                }
              screenImages: <screenImages-file>
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema: {}
  /api/v1/get-all-bots:
    get:
      operationId: get-all-bots
      summary: get-all-bots
      description: ''
      tags:
        - BOTS
      security: []
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema: {}
  /api/v1/get-all-launched-bots-by-orgId:
    get:
      operationId: get-all-launched-bots
      summary: get-all-launched-bots
      description: ''
      tags:
        - BOTS
      security: []
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema: {}
  /api/v1/get-bot-details/{{nhea_botId}}:
    get:
      operationId: get-bot-details-copy
      summary: get-bot-details Copy
      description: ''
      tags:
        - BOTS
      security: []
      parameters:
        - name: '{nhea_botId'
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema: {}
  /api/v1/get-bot-details-by-clientId/NheA46khh4MDvIns:
    get:
      operationId: get-bot-details-by-clientid
      summary: get-bot-details-by-clientId
      description: ''
      tags:
        - BOTS
      security: []
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema: {}
  /api/v1/get-botId-by-botName:
    get:
      operationId: get-botid-by-botname
      summary: get-botId-by-botName
      description: ''
      tags:
        - BOTS
      security: []
      parameters:
        - name: botName
          in: query
          required: false
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  data:
                    type: object
                    properties:
                      botId:
                        type: string
                      botName:
                        type: string
                      message:
                        type: string
                  status:
                    type: string
              example:
                code: 200
                data:
                  botName: Diggaj Realtyu
                  message: Request Unsuccessful Please check Bot Name and try again!
                status: SUCCESS
  /api/v1/add-test-device:
    post:
      operationId: add-test-device
      summary: add-test-device
      description: ''
      tags:
        - BOTS
      security: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                botId:
                  type: string
                phoneNumber:
                  type: string
            example:
              botId: 65c4eabecf32f14a18535f10
              phoneNumber: '+918446779594'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  data:
                    type: object
                    properties:
                      status:
                        type: integer
                      message:
                        type: string
                  status:
                    type: string
              example:
                code: 200
                data:
                  status: 409
                  message: +918446779594 already exists as Test Device!
                status: SUCCESS
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  data:
                    type: object
                    properties:
                      status:
                        type: integer
                      message:
                        type: string
                  status:
                    type: string
              example:
                code: 409
                status: ERROR
                message: +917972086759 already exists as Test Device!
  /api/v1/create-bot:
    post:
      operationId: create-bot
      summary: create-bot
      description: |-
        Request header should have **apikey**

        Request body validations:

        - botName: max characters 40
            
        - shortDescription: max characters 100
            
        - botMessageType: should be either "TRANSACTIONAL" or "PROMOTIONAL"
            
        - phoneNumbers: max array length 3
            
        - websites: max array length 3
            
        - emails: max array length 3
            
        - color: should be in valid hex code format, example: #FFFFFF
            
        - botLogoImage: should be valid url, max size 90 KB, size: 224 px X 224px, Image type: PNG, JPG, JPEG
            
        - botBannerImage: should be valid url, max size 360KB, size: 1140px X 448px, Image type: PNG, JPG, JPEG
            
        - termsofUseUrl: should be valid url
            
        - privacyPolicyUrl: should be valid url
            

        Example response

        ``` json
        {
          "status": "SUCCESS",
          "code": 201,
          "data": {
            "botId": "69d54305ca601bxxxxxxx",
            "botName": "PinnacleTransBotProdCreate1",
            "message": "Bot Created Successfully"
          }
        }

         ```
      tags:
        - BOTS
      security: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                color:
                  type: string
                emails:
                  type: array
                  items:
                    type: object
                    properties:
                      email:
                        type: string
                      label:
                        type: string
                botName:
                  type: string
                websites:
                  type: array
                  items:
                    type: object
                    properties:
                      url:
                        type: string
                      label:
                        type: string
                botLogoImage:
                  type: object
                  properties:
                    url:
                      type: string
                    type:
                      type: string
                phoneNumbers:
                  type: array
                  items:
                    type: object
                    properties:
                      label:
                        type: string
                      number:
                        type: string
                      country:
                        type: string
                      countryCode:
                        type: string
                termsofUseUrl:
                  type: string
                botBannerImage:
                  type: object
                  properties:
                    url:
                      type: string
                    type:
                      type: string
                botMessageType:
                  type: string
                privacyPolicyUrl:
                  type: string
                shortDescription:
                  type: string
                languagesSupported:
                  type: string
            example:
              color: '#000000'
              emails:
                - email: botbot@gmail.com
                  label: Label for Primary Email
              botName: PinnaclePromoBotProdCreate12
              websites:
                - url: https://bot-primary.com
                  label: Label for Primary Site
              botLogoImage:
                url: >-
                  https://portal-vistaging.dotgo.com/rcsbotdirectory/vi/image/bot/6202/logoimage/1/XQPLDZ74R0WHRJDFDG6E.jpg
                type: image/jpg
              phoneNumbers:
                - label: primary phone no label
                  number: '9049566848'
                  country: India
                  countryCode: '+91'
              termsofUseUrl: https://bot-terms.com
              botBannerImage:
                url: >-
                  https://portal-vistaging.dotgo.com/rcsbotdirectory/vi/image/bot/6202/bgimage/1/L6HKQOQLIMD85UD50SLW.jpg
                type: image/jpg
              botMessageType: PROMOTIONAL
              privacyPolicyUrl: https://bot-privacy.com
              shortDescription: a very very short message
              languagesSupported: 'English '
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema: {}
  /api/v1/update-bot:
    post:
      operationId: update-bot
      summary: update bot
      description: |-
        Request header should have **apikey** and **botId**

        Request body validations:

        - botName: max characters 40
            
        - shortDescription: max characters 100
            
        - botMessageType: should be either "TRANSACTIONAL" or "PROMOTIONAL"
            
        - phoneNumbers: max array length 3
            
        - websites: max array length 3
            
        - emails: max array length 3
            
        - color: should be in valid hex code format, example: #FFFFFF
            
        - botLogoImage: should be valid url, max size 90 KB, size: 224 px X 224px, Image type: PNG, JPG, JPEG
            
        - botBannerImage: should be valid url, max size 360KB, size: 1140px X 448px, Image type: PNG, JPG, JPEG
            
        - termsofUseUrl: should be valid url
            
        - privacyPolicyUrl: should be valid url
            

        Example response

        ``` json
        {
          "status": "SUCCESS",
          "code": 200,
          "data": "Bot Details Updated Successfully!"
        }

         ```
      tags:
        - BOTS
      security: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                color:
                  type: string
                emails:
                  type: array
                  items:
                    type: object
                    properties:
                      email:
                        type: string
                      label:
                        type: string
                botName:
                  type: string
                websites:
                  type: array
                  items:
                    type: object
                    properties:
                      url:
                        type: string
                      label:
                        type: string
                botLogoImage:
                  type: object
                  properties:
                    url:
                      type: string
                    type:
                      type: string
                phoneNumbers:
                  type: array
                  items:
                    type: object
                    properties:
                      label:
                        type: string
                      number:
                        type: string
                      country:
                        type: string
                      countryCode:
                        type: string
                termsofUseUrl:
                  type: string
                botBannerImage:
                  type: object
                  properties:
                    url:
                      type: string
                    type:
                      type: string
                privacyPolicyUrl:
                  type: string
                shortDescription:
                  type: string
                languagesSupported:
                  type: string
            example:
              color: '#000000'
              emails:
                - email: botbot@gmail.com
                  label: Label for Primary Email
              botName: PinnacleTransBotProdUpdate1
              websites:
                - url: https://bot-primary.com
                  label: Label for Primary Site
              botLogoImage:
                url: >-
                  https://portal-vistaging.dotgo.com/rcsbotdirectory/vi/image/bot/6202/logoimage/1/XQPLDZ74R0WHRJDFDG6E.jpg
                type: image/jpg
              phoneNumbers:
                - label: primary phone no label
                  number: '9049566848'
                  country: India
                  countryCode: '+91'
              termsofUseUrl: https://bot-terms.com
              botBannerImage:
                url: >-
                  https://portal-vistaging.dotgo.com/rcsbotdirectory/vi/image/bot/6202/bgimage/1/L6HKQOQLIMD85UD50SLW.jpg
                type: image/jpg
              privacyPolicyUrl: https://bot-privacy.com
              shortDescription: a very short message
              languagesSupported: 'English '
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema: {}
  /api/v1/send-message:
    post:
      operationId: send-message-no-template-single
      summary: send-message-no-template single
      description: ''
      tags:
        - Send Message APIS
      security: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                category:
                  type: string
                messages:
                  type: array
                  items:
                    type: object
                    properties:
                      to:
                        type: string
                      ttl:
                        type: string
                      variables:
                        type: array
                        items:
                          type: object
                          properties:
                            key:
                              type: string
                            value:
                              type: string
                      isSMSFallbackRequired:
                        type: boolean
                templateId:
                  type: string
                correlationId:
                  type: string
            example:
              category: promotional
              messages:
                - to: '8446779594'
                  ttl: '10'
                  variables:
                    - key: OTP
                      value: '123'
                    - key: user
                      value: Jayant
                  isSMSFallbackRequired: false
              templateId: 67ed02fb0ebf1303afe5e09f
              correlationId: dfsdfaccv234
      responses:
        '400':
          description: Bad Request
          content:
            application/json:
              schema: {}
              example:
                code: 400
                data:
                  - mobile: '8446779594'
                    reason: templateId is required
                    message: failed
                    uniqueId: PROD_68218acedb298103bc8d5931_APIdfsdfaccv234-20250728_13933e1700
                status: FAILED
                requestId: e38c03c8-8978-4dd1-8d81-9362e19118f2
                correlationId: dfsdfaccv234
                totalMessages: 1
  /api/v1/send-freeflow-message:
    post:
      operationId: freeflow-or-carousel
      summary: FreeFlow | Carousel
      description: ''
      tags:
        - Send Message APIS
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                to:
                  type: string
                category:
                  type: string
                correlationId:
                  type: string
                messagePayload:
                  type: object
                  properties:
                    templateType:
                      type: string
                    richCardCarouselDetails:
                      type: object
                      properties:
                        cardWidth:
                          type: string
                        cardsList:
                          type: array
                          items:
                            type: object
                            properties:
                              cardMedia:
                                type: object
                                properties:
                                  url:
                                    type: string
                                  type:
                                    type: string
                              cardTitle:
                                type: string
                              cardDescription:
                                type: string
                              suggestionsList:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    urlAction:
                                      type: string
                                    typeOfAction:
                                      type: string
                                    suggestionText:
                                      type: string
                                    suggestionPostback:
                                      type: string
                        mediaHeight:
                          type: string
            example:
              to: '917972086759'
              category: promotional
              correlationId: jayant1938
              messagePayload:
                templateType: carousel
                richCardCarouselDetails:
                  cardWidth: MEDIUM_WIDTH
                  cardsList:
                    - cardMedia:
                        url: https://images.pexels.com/photos/1366942/pexels-photo-1366942.jpeg
                        type: image
                      cardTitle: Laptop Pro Series
                      cardDescription: High-performance laptop for professionals with advanced graphics and all-day battery life.
                      suggestionsList:
                        - urlAction: https://google.com
                          typeOfAction: url_action
                          suggestionText: From ₹89,999
                          suggestionPostback: laptop_pro_configure
                    - cardMedia:
                        url: https://images.pexels.com/photos/1366942/pexels-photo-1366942.jpeg
                        type: image
                      cardTitle: Tablet Ultra
                      cardDescription: Versatile tablet with premium display, perfect for creativity and productivity tasks.
                      suggestionsList:
                        - urlAction: https://store.example.com/tablet-ultra
                          typeOfAction: url_action
                          suggestionText: From ₹54,999
                          suggestionPostback: tablet_ultra_purchase
                    - cardMedia:
                        url: https://images.pexels.com/photos/1366942/pexels-photo-1366942.jpeg
                        type: image
                      cardTitle: Smartwatch Elite
                      cardDescription: Advanced health monitoring, GPS, and smart features in a premium design.
                      suggestionsList:
                        - urlAction: https://store.example.com/smartwatch-elite
                          typeOfAction: url_action
                          suggestionText: ₹24,999
                          suggestionPostback: smartwatch_elite_shop
                  mediaHeight: MEDIUM
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema: {}
  /api/v1/get-message-status-by-messageId/68218acedb298103bc8d5931/STAGE_65c4eabecf32f14a18535f10_APIdfsdfaccv234-20251203_3a7ce62400:
    get:
      operationId: get-status-by-message-id
      summary: Get status by message ID
      description: ''
      tags:
        - Messages
      security: []
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema: {}
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: access token
