Pushover Messages.json API

The Messages.json API from Pushover — 1 operation(s) for messages.json.

OpenAPI Specification

pushover-messages-json-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Pushover Message Apps Messages.json API
  version: 1.0.0
  description: 'Pushover is a push notification service that delivers real-time

    notifications to phones, tablets, desktops, and watches. The Message

    API accepts HTTPS POSTs with an application API token and recipient

    user/group key to send formatted messages with priorities, sounds,

    images, and supplementary URLs. Additional endpoints expose

    validation, sounds, application rate limits, and receipts for

    priority-2 emergency messages.

    '
  contact:
    name: Pushover
    url: https://pushover.net
servers:
- url: https://api.pushover.net/1
  description: Pushover Message API
tags:
- name: Messages.json
paths:
  /messages.json:
    post:
      summary: Send a message
      description: Sends a push notification to a user or group device.
      operationId: sendMessage
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/MessageRequest'
          application/json:
            schema:
              $ref: '#/components/schemas/MessageRequest'
          multipart/form-data:
            schema:
              allOf:
              - $ref: '#/components/schemas/MessageRequest'
              - type: object
                properties:
                  attachment:
                    type: string
                    format: binary
                    description: Image attachment (PNG/JPG/GIF, 5 MB max).
      responses:
        '200':
          description: Accepted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
        '400':
          description: Validation error.
      tags:
      - Messages.json
components:
  schemas:
    MessageResponse:
      type: object
      properties:
        status:
          type: integer
          description: 1 on success.
        request:
          type: string
          description: Request ID.
        receipt:
          type: string
          description: Receipt token (only for priority=2 messages).
    MessageRequest:
      type: object
      required:
      - token
      - user
      - message
      properties:
        token:
          type: string
          description: Application API token (registered application).
        user:
          type: string
          description: Recipient user or group key.
        message:
          type: string
          description: Message body (max 1024 UTF-8 characters).
        title:
          type: string
          description: Notification title (max 250 characters).
        device:
          type: string
          description: Comma-separated list of device names to target.
        priority:
          type: integer
          enum:
          - -2
          - -1
          - 0
          - 1
          - 2
          description: -2 lowest, -1 low, 0 normal, 1 high, 2 emergency (requires retry and expire).
        sound:
          type: string
          description: Notification sound name (see /sounds.json).
        timestamp:
          type: integer
          description: Unix timestamp to display.
        ttl:
          type: integer
          description: Time-to-live in seconds.
        url:
          type: string
          description: Supplementary URL.
        url_title:
          type: string
        html:
          type: integer
          enum:
          - 0
          - 1
          description: Set to 1 to enable HTML formatting.
        monospace:
          type: integer
          enum:
          - 0
          - 1
        retry:
          type: integer
          description: Seconds between retries for priority=2 messages.
        expire:
          type: integer
          description: Total time priority=2 messages will retry.
        attachment_base64:
          type: string
          description: Base64-encoded image attachment.
        attachment_type:
          type: string
          description: MIME type of attachment_base64.
        encrypted:
          type: integer
          enum:
          - 0
          - 1
externalDocs:
  description: Pushover API documentation
  url: https://pushover.net/api