Airtel IQ SMS API

The messaging half of Airtel IQ, Airtel's network-embedded CPaaS suite. Sends single, bulk, CSV-batch and content-moderated A2P SMS over Airtel's pan-India network, with TRAI DLT (Hyperledger-based distributed ledger) scrubbing for sender header, content template and consent compliance applied in-path. Authenticated with HTTP Basic using API-key credentials issued from the Airtel IQ dashboard. Swagger 2.0 published openly at openapi.airtel.in.

OpenAPI Specification

bharti-airtel-iq-sms-openapi.yml Raw ↑
swagger: '2.0'
info:
  version: 1.0.0
  title: Airtel IQ SMS Core APIs
host: iqsms.airtel.in
basePath: /
tags:
- name: Bulk SMS APIs
  description: These APIs can be used to send Bulk SMS in different ways as documented below
- name: Individual SMS APIs
  description: These APIs can be used to send a single SMS in a single request as documented below
paths:
  /api/v1/send-sms:
    get:
      tags:
      - Individual SMS APIs
      summary: Send Single SMS GET API
      description: This API can be used to send SMS to single destination address through GET request
      operationId: sendSmsUsingGET
      produces:
      - application/json
      parameters:
      - name: customerId
        in: query
        description: Specifies the source/client's id registered and wants to use the SMS APIs
        required: false
        type: string
        allowEmptyValue: false
      - name: destinationAddress
        in: query
        description: Specifies the mobile numbers on which message needs to be delivered
        required: false
        type: string
        allowEmptyValue: false
      - name: dltTemplateId
        in: query
        description: Specifies the template id received after dlt registration.
        required: false
        type: string
        allowEmptyValue: false
      - name: entityId
        in: query
        description: Specifies the entity id received after dlt registration.
        required: false
        type: string
        allowEmptyValue: false
      - name: filterBlacklistNumbers
        in: query
        description: Specifies the flag to enable/disable filtering of blacklisted numbers
        required: false
        type: boolean
        allowEmptyValue: false
      - name: message
        in: query
        description: Specifies the message which needs to be delivered
        required: false
        type: string
        allowEmptyValue: false
      - name: messageType
        in: query
        description: Specifies the type of message which needs to be sent.
        required: false
        type: string
        allowEmptyValue: false
        enum:
        - PROMOTIONAL
        - TRANSACTIONAL
        - SERVICE_IMPLICIT
        - SERVICE_EXPLICIT
        - INTERNATIONAL
      - name: metaMap
        in: query
        description: Specifies url Shortener params and all the additional parameters
        required: false
        type: object
        allowEmptyValue: false
      - name: priority
        in: query
        description: Specifies the flag for priority of the messages
        required: false
        type: boolean
        allowEmptyValue: false
      - name: sourceAddress
        in: query
        description: Specifies the shortcode/senderId through which message would be sent
        required: false
        type: string
        allowEmptyValue: false
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/SendSmsResponseVO'
      deprecated: false
    post:
      tags:
      - Individual SMS APIs
      summary: Send Single SMS POST API
      description: This API can be used to send SMS to a single destination address through POST request
      operationId: sendSmsUsingPOST_2
      consumes:
      - application/json
      produces:
      - application/json
      parameters:
      - in: body
        name: singleSendSmsRequestVo
        description: singleSendSmsRequestVo
        required: true
        schema:
          $ref: '#/definitions/SingleSmsRequestVO'
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/SendSmsResponseVO'
      deprecated: false
  /api/v1/send-sms-bulk:
    post:
      tags:
      - Bulk SMS APIs
      summary: Multiple SMS Requests API
      description: This API can be used to send a request to leverage multiple SMS requests within the
        same instant.
      operationId: sendSmsUsingPOST
      consumes:
      - application/json
      produces:
      - '*/*'
      parameters:
      - in: body
        name: sendSmsRequestVos
        description: sendSmsRequestVos
        required: true
        schema:
          type: array
          items:
            $ref: '#/definitions/SingleSmsRequestVO'
      responses:
        '200':
          description: OK
          schema:
            type: string
      deprecated: false
  /api/v1/send-sms-cm:
    post:
      tags:
      - Bulk SMS APIs
      summary: Send SMS Via Content Moderation API
      description: This API can be used to send a request without providing DLT details to more than one
        recipient within the same instant.
      operationId: sendSmsViaCsvUsingPOST
      consumes:
      - application/json
      produces:
      - '*/*'
      parameters:
      - in: body
        name: cmRequest
        description: cmRequest
        required: true
        schema:
          $ref: '#/definitions/CMRequest'
      - name: customerId
        in: query
        description: customerId
        required: true
        type: string
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/SendSmsResponseVO'
      deprecated: false
  /api/v1/send-sms-csv:
    post:
      tags:
      - Bulk SMS APIs
      summary: Send SMS Via CSV API
      description: This API can be used to send SMS to multiple destination addresses provided in csv
        file
      operationId: sendSmsViaCsvUsingPOST_1
      consumes:
      - multipart/form-data
      produces:
      - '*/*'
      parameters:
      - name: customerId
        in: formData
        description: Specifies the source/client's id registered and wants to use the SMS APIs
        required: true
        type: string
      - name: destinationAddress
        in: formData
        description: Specifies the mobile numbers on which message needs to be delivered
        required: true
        type: array
        items:
          type: string
        collectionFormat: multi
      - name: dltTemplateId
        in: formData
        description: Specifies the template id received after dlt registration.
        required: true
        type: string
      - name: entityId
        in: formData
        description: Specifies the entity id received after dlt registration.
        required: true
        type: string
      - name: file
        in: formData
        description: Specifies the CSV file to be uploaded
        required: false
        type: file
      - name: filterBlacklistNumbers
        in: formData
        description: Specifies the flag to enable/disable filtering of blacklisted numbers
        required: false
        type: boolean
        x-example: 'false'
      - name: message
        in: formData
        description: Specifies the message which needs to be delivered
        required: true
        type: string
      - name: messageType
        in: formData
        description: Specifies the type of message which needs to be sent.
        required: true
        type: string
        enum:
        - PROMOTIONAL
        - TRANSACTIONAL
        - SERVICE_IMPLICIT
        - SERVICE_EXPLICIT
        - INTERNATIONAL
      - name: metaData
        in: formData
        description: Specifies all the additional parameters
        required: false
        type: object
      - name: otp
        in: formData
        description: Specifies the flag for priority of the messages
        required: false
        type: boolean
        x-example: 'false'
      - name: sourceAddress
        in: formData
        description: Specifies the shortcode/senderId through which message would be sent
        required: true
        type: string
      - name: urlShortenerParams.campaignId
        in: formData
        required: false
        type: string
      - name: urlShortenerParams.campaignName
        in: formData
        required: false
        type: string
      - name: urlShortenerParams.campaignType
        in: formData
        required: false
        type: string
      - name: urlShortenerParams.hitsAllowed
        in: formData
        required: false
        type: integer
        format: int32
      - name: urlShortenerParams.isEnabled
        in: formData
        required: false
        type: string
        x-example: '"false"'
      - name: urlShortenerParams.isUniqueUrl
        in: formData
        required: false
        type: string
        x-example: '"false"'
      - name: urlShortenerParams.metaData
        in: formData
        required: false
        type: object
      - name: urlShortenerParams.shortCode
        in: formData
        required: false
        type: string
      - name: urlShortenerParams.systemMetaData
        in: formData
        required: false
        type: object
      - name: urlShortenerParams.validity
        in: formData
        required: false
        type: integer
        format: int32
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/SendSmsResponseVO'
      deprecated: false
definitions:
  CMRequest:
    type: object
    required:
    - customerId
    - destinationAddress
    - message
    properties:
      customerId:
        type: string
        description: Specifies the source/client's id registered and wants to use the SMS APIs
      destinationAddress:
        type: array
        description: Specifies the mobile numbers on which message needs to be delivered
        items:
          type: string
      filterBlacklistNumbers:
        type: boolean
        example: false
        description: Specifies the flag to enable/disable filtering of blacklisted numbers
      message:
        type: string
        description: Specifies the message which needs to be delivered
      metaData:
        type: object
        description: Specifies all the additional parameters
      priority:
        type: boolean
        example: false
        description: Specifies the flag for priority of the messages
      urlShortenerParams:
        description: Specifies the parameters to convert long url to short
        $ref: '#/definitions/UrlShortenerParams'
    title: CMRequest
  SendSmsRequestVO:
    type: object
    required:
    - customerId
    - destinationAddress
    - dltTemplateId
    - entityId
    - message
    - messageType
    - sourceAddress
    properties:
      customerId:
        type: string
        description: Specifies the source/client's id registered and wants to use the SMS APIs
      destinationAddress:
        type: array
        description: Specifies the mobile numbers on which message needs to be delivered
        items:
          type: string
      dltTemplateId:
        type: string
        description: Specifies the template id received after dlt registration.
      entityId:
        type: string
        description: Specifies the entity id received after dlt registration.
      filterBlacklistNumbers:
        type: boolean
        example: false
        description: Specifies the flag to enable/disable filtering of blacklisted numbers
      message:
        type: string
        description: Specifies the message which needs to be delivered
      messageType:
        type: string
        description: Specifies the type of message which needs to be sent.
        enum:
        - PROMOTIONAL
        - TRANSACTIONAL
        - SERVICE_IMPLICIT
        - SERVICE_EXPLICIT
      metaData:
        type: object
        description: Specifies all the additional parameters
      priority:
        type: boolean
        example: false
        description: Specifies the flag for priority of the messages
      sourceAddress:
        type: string
        description: Specifies the shortcode/senderId through which message would be sent
      urlShortenerParams:
        description: Specifies the parameters to convert long url to short
        $ref: '#/definitions/UrlShortenerParams'
    title: SendSmsRequestVO
  SendSmsResponseVO:
    type: object
    properties:
      customerId:
        type: string
        description: Specifies the source/client's id registered and wants to use the SMS APIs
      destinationAddress:
        type: array
        description: Specifies the mobile numbers on which message requests were submitted
        items:
          type: string
      dltTemplateId:
        type: string
        description: Specifies the template id received after dlt registration.
      entityId:
        type: string
        description: Specifies the entity id received after dlt registration.
      errorMessage:
        type: string
        description: Specifies the error message if received any during sms request
      incorrectNum:
        type: array
        description: Specifies incorrect numbers in request (less than 10 digit numbers)
        items:
          type: string
      message:
        type: string
        description: Specifies the message for which request was received
      messageRequestId:
        type: string
        description: Specifies unique message request id
      messageType:
        type: string
        description: Specifies the type of message sent.
        enum:
        - PROMOTIONAL
        - TRANSACTIONAL
        - SERVICE_IMPLICIT
        - SERVICE_EXPLICIT
      metaData:
        type: object
        description: Specifies the additional information received with each sms
      sourceAddress:
        type: string
        description: Specifies the shortcode/senderId through which message was sent
    title: SendSmsResponseVO
  SingleSmsRequestVO:
    type: object
    required:
    - customerId
    - dltTemplateId
    - entityId
    - message
    - messageType
    - sourceAddress
    properties:
      customerId:
        type: string
        description: Specifies the source/client's id registered and wants to use the SMS APIs
      destinationAddress:
        type: string
        description: Specifies the mobile numbers on which message needs to be delivered
      dltTemplateId:
        type: string
        description: Specifies the template id received after dlt registration.
      entityId:
        type: string
        description: Specifies the entity id received after dlt registration.
      filterBlacklistNumbers:
        type: boolean
        example: false
        description: Specifies the flag to enable/disable filtering of blacklisted numbers
      message:
        type: string
        description: Specifies the message which needs to be delivered
      messageType:
        type: string
        description: Specifies the type of message which needs to be sent.
        enum:
        - PROMOTIONAL
        - TRANSACTIONAL
        - SERVICE_IMPLICIT
        - SERVICE_EXPLICIT
      metaData:
        type: object
        description: Specifies all the additional parameters
      priority:
        type: boolean
        example: false
        description: Specifies the flag for priority of the messages
      sourceAddress:
        type: string
        description: Specifies the shortcode/senderId through which message would be sent
      urlShortenerParams:
        description: Specifies the parameters to convert long url to short
        $ref: '#/definitions/UrlShortenerParams'
    title: SingleSmsRequestVO
  UrlShortenerParams:
    type: object
    properties:
      campaignId:
        type: string
        description: campaign id
      campaignName:
        type: string
        description: campaign name
      campaignType:
        type: string
        description: campaign type
      hitsAllowed:
        type: integer
        format: int32
        description: No of hits allowed for the url
      isEnabled:
        type: string
        example: 'false'
        description: flag to check if convert to short url
      isUniqueUrl:
        type: string
        example: 'false'
        description: flag to create unique url for each request
      metaData:
        type: object
        description: url shortener meta data
      shortCode:
        type: string
        description: short code provided by client
      systemMetaData:
        type: object
        description: url shortener system meta data
      validity:
        type: integer
        format: int32
        description: validity for which the url will be active
    title: UrlShortenerParams