SendPulse Web Push API

Web push websites, subscriptions, and campaigns.

OpenAPI Specification

sendpulse-web-push-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: SendPulse Account Web Push 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: Web Push
  description: Web push websites, subscriptions, and campaigns.
paths:
  /push/tasks:
    get:
      operationId: listPushCampaigns
      tags:
      - Web Push
      summary: List web push campaigns.
      parameters:
      - name: limit
        in: query
        schema:
          type: integer
      - name: skip
        in: query
        schema:
          type: integer
      responses:
        '200':
          description: A list of push campaigns.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PushCampaign'
    post:
      operationId: createPushCampaign
      tags:
      - Web Push
      summary: Create a web push campaign.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PushCampaignInput'
      responses:
        '200':
          description: Push campaign created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessResult'
  /push/websites:
    get:
      operationId: listPushWebsites
      tags:
      - Web Push
      summary: List registered websites.
      responses:
        '200':
          description: A list of websites.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PushWebsite'
components:
  schemas:
    PushWebsite:
      type: object
      properties:
        id:
          type: integer
        url:
          type: string
        add_date:
          type: string
        status:
          type: integer
    SuccessResult:
      type: object
      properties:
        result:
          type: boolean
    PushCampaign:
      type: object
      properties:
        id:
          type: integer
        title:
          type: string
        body:
          type: string
        website_id:
          type: integer
        status:
          type: integer
        send_date:
          type: string
    PushCampaignInput:
      type: object
      required:
      - title
      - website_id
      - body
      - ttl
      properties:
        title:
          type: string
        website_id:
          type: integer
        body:
          type: string
        ttl:
          type: integer
        link:
          type: string
        stretch_time:
          type: integer
        filter_lang:
          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.