SendPulse SMS API

SMS phone management and campaigns.

OpenAPI Specification

sendpulse-sms-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: SendPulse Account SMS API
  description: REST API for the SendPulse multichannel marketing platform. Covers email address books and bulk campaigns, SMTP transactional email, SMS, web push notifications, chatbots, and Automation 360. All requests are made over HTTPS against https://api.sendpulse.com and authenticated with a Bearer access token obtained via the OAuth2 client_credentials grant at POST /oauth/access_token. Tokens are valid for approximately one hour.
  termsOfService: https://sendpulse.com/legal/terms
  contact:
    name: SendPulse Support
    url: https://sendpulse.com/contacts
  version: '1.0'
servers:
- url: https://api.sendpulse.com
security:
- bearerAuth: []
tags:
- name: SMS
  description: SMS phone management and campaigns.
paths:
  /sms/send:
    post:
      operationId: sendSms
      tags:
      - SMS
      summary: Send SMS to a list of phone numbers.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SmsSendInput'
      responses:
        '200':
          description: SMS accepted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessResult'
  /sms/campaigns:
    post:
      operationId: createSmsCampaign
      tags:
      - SMS
      summary: Create an SMS campaign from an address book.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - addressBookId
              - body
              properties:
                addressBookId:
                  type: integer
                body:
                  type: string
                transliterate:
                  type: integer
                sender:
                  type: string
      responses:
        '200':
          description: SMS campaign created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessResult'
  /sms/campaigns/list:
    get:
      operationId: listSmsCampaigns
      tags:
      - SMS
      summary: List SMS campaigns.
      responses:
        '200':
          description: A list of SMS campaigns.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SmsCampaign'
components:
  schemas:
    SmsSendInput:
      type: object
      required:
      - phones
      - body
      properties:
        phones:
          type: array
          items:
            type: string
        body:
          type: string
        sender:
          type: string
        transliterate:
          type: integer
        route:
          type: object
          additionalProperties: true
    SuccessResult:
      type: object
      properties:
        result:
          type: boolean
    SmsCampaign:
      type: object
      properties:
        id:
          type: integer
        address_book_id:
          type: integer
        company_price:
          type: number
        company_currency:
          type: string
        send_date:
          type: string
        status:
          type: integer
        task_phones:
          type: integer
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Bearer access token obtained from POST /oauth/access_token using the client_credentials grant.