Pushary Campaigns API

Scheduled and on-demand notification campaigns.

GitHub OpenAPI

Operations 9

GET /api/v1/server/campaigns List campaigns #
POST /api/v1/server/campaigns Create a campaign #
GET /api/v1/server/campaigns/{campaignId} Read one campaign #
PATCH /api/v1/server/campaigns/{campaignId} Update a campaign #
DELETE /api/v1/server/campaigns/{campaignId} Delete a campaign #
POST /api/v1/server/campaigns/{campaignId}/send Send a campaign now #
POST /api/v1/server/campaigns/{campaignId}/pause Pause a campaign #
POST /api/v1/server/campaigns/{campaignId}/resume Resume a campaign #
GET /api/v1/server/campaigns/{campaignId}/stats Read campaign delivery stats #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/pushary-com:pushary-com-campaigns-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

pushary-com-campaigns-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Pushary Com Campaigns API
  version: 1.0.0
  contact:
    name: Pushary
    url: https://pushary.com/docs
    email: business@pushary.com
  termsOfService: https://pushary.com/terms
  description: 'Operations tagged Campaigns across 2 of this provider''s published API definitions: pushary-com-openapi.json, pushary-com.json. Each path carries the servers of the definition it was published in.'
servers:
- url: https://pushary.com
  description: Production
security:
- bearerAuth: []
tags:
- name: Campaigns
  description: Scheduled and on-demand notification campaigns.
paths:
  /api/v1/server/campaigns:
    get:
      operationId: listCampaigns
      summary: List campaigns
      description: Returns a cursor-paginated page of the site’s campaigns, newest first.
      tags:
      - Campaigns
      parameters:
      - name: limit
        in: query
        required: false
        description: Page size. Defaults to the server page size.
        schema:
          type: integer
          minimum: 1
          maximum: 100
      - name: cursor
        in: query
        required: false
        description: Opaque cursor from the previous page’s `nextCursor`.
        schema:
          type: string
      responses:
        '200':
          description: A page of campaigns.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedCampaigns'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
    post:
      operationId: createCampaign
      summary: Create a campaign
      description: 'Creates a campaign in `draft`, or in `scheduled` when `scheduledAt` is set. Creating does not send: call sendCampaign for that.'
      tags:
      - Campaigns
      requestBody:
        required: true
        description: The campaign to create.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCampaign'
      responses:
        '201':
          description: The created campaign.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Campaign'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
    servers:
    - url: https://pushary.com
      description: Production
  /api/v1/server/campaigns/{campaignId}:
    get:
      operationId: getCampaign
      summary: Read one campaign
      description: Returns a single campaign by id, with its content, schedule, status and lifetime delivery counters.
      tags:
      - Campaigns
      parameters:
      - name: campaignId
        in: path
        required: true
        description: The campaign id.
        schema:
          type: string
      responses:
        '200':
          description: The campaign.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Campaign'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
    patch:
      operationId: updateCampaign
      summary: Update a campaign
      description: Changes the content, schedule or status of a campaign that has not completed.
      tags:
      - Campaigns
      parameters:
      - name: campaignId
        in: path
        required: true
        description: The campaign id.
        schema:
          type: string
      requestBody:
        required: true
        description: Fields to change.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateCampaign'
      responses:
        '200':
          description: The updated campaign.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Campaign'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
    delete:
      operationId: deleteCampaign
      summary: Delete a campaign
      description: Permanently removes a campaign. Deliveries already made are unaffected.
      tags:
      - Campaigns
      parameters:
      - name: campaignId
        in: path
        required: true
        description: The campaign id.
        schema:
          type: string
      responses:
        '204':
          description: Deleted.
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
    servers:
    - url: https://pushary.com
      description: Production
  /api/v1/server/campaigns/{campaignId}/send:
    post:
      operationId: sendCampaign
      summary: Send a campaign now
      description: Queues an existing campaign for immediate delivery, ignoring any schedule on it.
      tags:
      - Campaigns
      parameters:
      - name: campaignId
        in: path
        required: true
        description: The campaign id.
        schema:
          type: string
      responses:
        '200':
          description: The campaign was queued.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SendResult'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
    servers:
    - url: https://pushary.com
      description: Production
  /api/v1/server/campaigns/{campaignId}/pause:
    post:
      operationId: pauseCampaign
      summary: Pause a campaign
      description: Stops a sending or scheduled campaign. Deliveries already queued still land.
      tags:
      - Campaigns
      parameters:
      - name: campaignId
        in: path
        required: true
        description: The campaign id.
        schema:
          type: string
      responses:
        '200':
          description: The paused campaign.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Campaign'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
    servers:
    - url: https://pushary.com
      description: Production
  /api/v1/server/campaigns/{campaignId}/resume:
    post:
      operationId: resumeCampaign
      summary: Resume a campaign
      description: Returns a paused campaign to its previous state.
      tags:
      - Campaigns
      parameters:
      - name: campaignId
        in: path
        required: true
        description: The campaign id.
        schema:
          type: string
      responses:
        '200':
          description: The resumed campaign.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Campaign'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
    servers:
    - url: https://pushary.com
      description: Production
  /api/v1/server/campaigns/{campaignId}/stats:
    get:
      operationId: getCampaignStats
      summary: Read campaign delivery stats
      description: Returns sent, delivered, clicked and failed counts plus the derived rates.
      tags:
      - Campaigns
      parameters:
      - name: campaignId
        in: path
        required: true
        description: The campaign id.
        schema:
          type: string
      responses:
        '200':
          description: Campaign statistics.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignStats'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
    servers:
    - url: https://pushary.com
      description: Production
components:
  responses:
    RateLimited:
      description: Too many requests. `X-RateLimit-Remaining` and `X-RateLimit-Reset` are on every response.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: 'The key is valid but not allowed to do this: wrong scope, wrong plan, or a locked workspace.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    BadRequest:
      description: The request body or parameters were rejected.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: No such resource, or no such endpoint.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: The API key is missing, malformed or revoked.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    CampaignStats:
      type: object
      required:
      - totalSent
      - totalDelivered
      - totalClicked
      - totalFailed
      - deliveryRate
      - clickRate
      properties:
        totalSent:
          type: integer
          description: Recipients the push service accepted.
        totalDelivered:
          type: integer
          description: Deliveries confirmed by the service worker.
        totalClicked:
          type: integer
          description: Clicks recorded.
        totalFailed:
          type: integer
          description: Sends the push service rejected.
        deliveryRate:
          type: number
          description: Delivered divided by sent, 0 to 1.
        clickRate:
          type: number
          description: Clicked divided by delivered, 0 to 1.
    CreateCampaign:
      type: object
      required:
      - name
      - title
      - body
      properties:
        name:
          type: string
          description: Internal name.
        title:
          type: string
          description: Notification title.
        body:
          type: string
          description: Notification body.
        iconUrl:
          type: string
          description: Icon image URL.
          format: uri
        imageUrl:
          type: string
          description: Hero image URL.
          format: uri
        actionUrl:
          type: string
          description: Where a click should land.
          format: uri
        scheduledAt:
          type: string
          description: Send at this time instead of on demand.
          format: date-time
        segmentId:
          type: string
          description: Restrict the audience to a saved segment.
        tags:
          type: array
          items:
            type: string
          description: Restrict the audience to subscribers holding every one of these tags.
    SendResult:
      type: object
      required:
      - success
      - sent
      - limits
      properties:
        success:
          type: boolean
          description: True when the send was accepted for delivery.
        campaignId:
          type: string
          description: The campaign row this send produced.
        status:
          type: string
          description: Delivery state at the moment of the response.
          enum:
          - queued
        queued:
          type: integer
          description: How many recipients were queued.
        duplicate:
          type: boolean
          description: True when an idempotency key replayed an earlier send.
        sent:
          type: integer
          description: Deprecated. This is the queued recipient count, not a device receipt. Read `queued`.
          deprecated: true
        limits:
          type: object
          required:
          - remaining
          - limit
          description: Plan quota after this send.
          properties:
            remaining:
              type: integer
              description: Notifications left in the current window.
            limit:
              type: integer
              description: Notifications allowed in the window.
    Campaign:
      type: object
      required:
      - id
      - siteId
      - name
      - title
      - body
      - status
      - createdAt
      properties:
        id:
          type: string
          description: Campaign identifier.
        siteId:
          type: string
          description: The site this campaign belongs to.
        name:
          type: string
          description: Internal name.
        title:
          type: string
          description: Notification title.
        body:
          type: string
          description: Notification body.
        iconUrl:
          type: string
          description: Icon image URL.
          format: uri
        imageUrl:
          type: string
          description: Hero image URL.
          format: uri
        actionUrl:
          type: string
          description: Where a click should land.
          format: uri
        status:
          type: string
          description: Lifecycle state.
          enum:
          - draft
          - scheduled
          - sending
          - active
          - paused
          - completed
          - cancelled
        scheduledAt:
          type: string
          description: When the campaign is due to send.
          format: date-time
        totalTargeted:
          type: integer
          description: Recipients selected.
        totalSent:
          type: integer
          description: Recipients the push service accepted.
        totalDelivered:
          type: integer
          description: Deliveries confirmed by the service worker.
        totalClicked:
          type: integer
          description: Clicks recorded.
        createdAt:
          type: string
          description: When the campaign was created.
          format: date-time
    UpdateCampaign:
      type: object
      description: Every field optional. Only what is present is changed.
      properties:
        name:
          type: string
          description: Internal name.
        title:
          type: string
          description: Notification title.
        body:
          type: string
          description: Notification body.
        iconUrl:
          type: string
          description: Icon image URL.
          format: uri
        imageUrl:
          type: string
          description: Hero image URL.
          format: uri
        actionUrl:
          type: string
          description: Where a click should land.
          format: uri
        scheduledAt:
          type: string
          description: Send at this time instead of on demand.
          format: date-time
        status:
          type: string
          description: Move the campaign between these states.
          enum:
          - draft
          - paused
          - cancelled
    PaginatedCampaigns:
      type: object
      required:
      - data
      - hasMore
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Campaign'
          description: This page of campaigns.
        nextCursor:
          type: string
          description: Pass as `cursor` to fetch the next page.
        hasMore:
          type: boolean
          description: True when another page exists.
    Error:
      type: object
      description: JSON error response. Shared authentication and validation errors include code and diagnostics; some endpoint errors return only error. Branch on HTTP status and code when present, not message text.
      required:
      - error
      properties:
        error:
          type: string
          description: Human-readable summary.
        code:
          type: string
          description: Machine-readable classification, when available. Common values include unauthorized, forbidden, invalid_request, not_found, method_not_allowed and rate_limited.
        status:
          type: integer
          description: The HTTP status code, repeated in the body for transports that hide it.
        message:
          type: string
          description: What went wrong, in one sentence.
        hint:
          type: string
          description: What to do about it.
        documentation:
          type: string
          description: URL of the documentation page for this rule.
          format: uri
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'A Pushary API key, sent as `Authorization: Bearer pk_xxx.xxx`. Create one with `npx -y pushary@latest setup` or in Dashboard > Agent > Settings. The MCP endpoint additionally accepts OAuth 2.0; see /.well-known/oauth-protected-resource.'
externalDocs:
  description: Pushary documentation
  url: https://pushary.com/docs
x-refined-from:
- pushary-com-openapi.json
- pushary-com.json