SendPulse Email Campaigns API

Bulk email campaign creation and reporting.

OpenAPI Specification

sendpulse-email-campaigns-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: SendPulse Account Email Campaigns 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: Email Campaigns
  description: Bulk email campaign creation and reporting.
paths:
  /campaigns:
    get:
      operationId: listCampaigns
      tags:
      - Email Campaigns
      summary: List email campaigns.
      parameters:
      - name: limit
        in: query
        schema:
          type: integer
      - name: offset
        in: query
        schema:
          type: integer
      responses:
        '200':
          description: A list of campaigns.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Campaign'
    post:
      operationId: createCampaign
      tags:
      - Email Campaigns
      summary: Create and send an email campaign.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CampaignInput'
      responses:
        '200':
          description: Campaign created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Campaign'
  /campaigns/{id}:
    get:
      operationId: getCampaign
      tags:
      - Email Campaigns
      summary: Get email campaign information.
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: Campaign information.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Campaign'
    delete:
      operationId: cancelCampaign
      tags:
      - Email Campaigns
      summary: Cancel an email campaign.
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: Campaign cancelled.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessResult'
components:
  schemas:
    CampaignInput:
      type: object
      required:
      - sender_name
      - sender_email
      - subject
      - body
      - list_id
      properties:
        sender_name:
          type: string
        sender_email:
          type: string
          format: email
        subject:
          type: string
        body:
          type: string
          description: Base64-encoded HTML body.
        list_id:
          type: integer
        name:
          type: string
    SuccessResult:
      type: object
      properties:
        result:
          type: boolean
    Campaign:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        message:
          type: object
          properties:
            sender_name:
              type: string
            sender_email:
              type: string
              format: email
            subject:
              type: string
            list_id:
              type: integer
        status:
          type: integer
        all_email_qty:
          type: integer
        send_date:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Bearer access token obtained from POST /oauth/access_token using the client_credentials grant.