SendPulse SMTP API

Transactional email sending and tracking.

OpenAPI Specification

sendpulse-smtp-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: SendPulse Account SMTP 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: SMTP
  description: Transactional email sending and tracking.
paths:
  /smtp/emails:
    get:
      operationId: listSmtpEmails
      tags:
      - SMTP
      summary: List sent transactional emails.
      parameters:
      - name: limit
        in: query
        schema:
          type: integer
      - name: offset
        in: query
        schema:
          type: integer
      responses:
        '200':
          description: A list of sent emails.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SmtpEmail'
    post:
      operationId: sendSmtpEmail
      tags:
      - SMTP
      summary: Send a transactional email.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - email
              properties:
                email:
                  $ref: '#/components/schemas/SmtpEmailInput'
      responses:
        '200':
          description: Email accepted for delivery.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessResult'
  /smtp/emails/{id}:
    get:
      operationId: getSmtpEmail
      tags:
      - SMTP
      summary: Get a transactional email by ID.
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Email information.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SmtpEmail'
  /smtp/unsubscribe:
    get:
      operationId: listSmtpUnsubscribed
      tags:
      - SMTP
      summary: List unsubscribed emails.
      responses:
        '200':
          description: A list of unsubscribed emails.
          content:
            application/json:
              schema:
                type: array
                items:
                  type: string
                  format: email
    post:
      operationId: addSmtpUnsubscribe
      tags:
      - SMTP
      summary: Add emails to the unsubscribe list.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                emails:
                  type: array
                  items:
                    type: object
                    properties:
                      email:
                        type: string
                        format: email
                      comment:
                        type: string
      responses:
        '200':
          description: Emails unsubscribed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessResult'
components:
  schemas:
    SmtpEmailInput:
      type: object
      required:
      - subject
      - from
      - to
      properties:
        html:
          type: string
          description: Base64-encoded HTML body.
        text:
          type: string
        subject:
          type: string
        from:
          type: object
          properties:
            name:
              type: string
            email:
              type: string
              format: email
        to:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
              email:
                type: string
                format: email
    SuccessResult:
      type: object
      properties:
        result:
          type: boolean
    SmtpEmail:
      type: object
      properties:
        id:
          type: string
        sender:
          type: string
          format: email
        total_size:
          type: integer
        sender_ip:
          type: string
        smtp_answer_code:
          type: integer
        smtp_answer_subcode:
          type: string
        smtp_answer_data:
          type: string
        used_ip:
          type: string
        recipient:
          type: string
          format: email
        subject:
          type: string
        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.