Push Gateway API (1.0.0)

Download OpenAPI specification:

License: Apache 2.0

API for interacting with the Push Gateway

Push Gateway

Push plain data to the gateway

Submit a plain push notification to the Push Gateway. The notification will be sent to all devices listed in the devices array of the notification object.

This mimics the Matrix Push Gateway API in version 1.0.0.

Authorizations:
mtls
Request Body schema: application/json
required
event_id
string

The Matrix event ID of the event being notified about. This is required if the notification is about a particular Matrix event. It may be omitted for notifications that only contain updated badge counts. This ID can and should be used to detect duplicate notification requests.

room_id
string

The ID of the room in which this event occurred. Required if the notification relates to a specific Matrix event.

type
string

The type of the event as in the event's type field.

sender
string

The sender of the event as in the corresponding event field.

sender_display_name
string

The current display name of the sender in the room in which the event occurred.

room_name
string

The name of the room in which the event occurred.

room_alias
string

An alias to display for the room in which the event occurred.

user_is_target
boolean

This is true if the user receiving the notification is the subject of a member event (i.e. the state_key of the member event is equal to the user's Matrix ID).

prio
required
string (Priority)
Enum: "high" "low"

The priority of the notification. If omitted, high is assumed. This may be used by push gateways to deliver less time-sensitive notifications in a way that will preserve battery power on mobile devices.

content
object (EventContent)

The content field from the event, if present. The pusher may omit this if the event had no content or for any other reason.

object (Counts)

This is a dictionary of the current number of unacknowledged communications for the recipient user. Counts whose value is zero should be omitted.

required
Array of objects (Devices)

This is an array of devices that the notification should be sent to.

Responses

Request samples

Content type
application/json
{
  • "notification": {
    }
}

Response samples

Content type
application/json
{
  • "rejected": [
    ]
}

Push multiple plain notifications to the gateway in a single request

Submit multiple plain push notifications in a single batch request. This endpoint is optimized for high-throughput scenarios where multiple plain notifications need to be sent efficiently. The batch can contain up to a maximum of 100 notifications per request.

Authorizations:
mtls
Request Body schema: application/json
required
required
Array of objects [ 1 .. 100 ] items

Array of plain notifications to process in this batch

Responses

Request samples

Content type
application/json
{
  • "notifications": [
    ]
}

Response samples

Content type
application/json
Example
{
  • "results": [
    ],
  • "summary": {
    }
}

Push multiple encrypted notifications to the gateway in a single request

Submit multiple encrypted push notifications in a single batch request. This endpoint is optimized for high-throughput scenarios where multiple encrypted notifications need to be sent efficiently. The batch can contain up to a maximum of 100 notifications per request.

Authorizations:
mtls
Request Body schema: application/json
required
required
Array of objects [ 1 .. 100 ] items

Array of encrypted notifications to process in this batch

Responses

Request samples

Content type
application/json
{
  • "notifications": [
    ]
}

Response samples

Content type
application/json
Example
{
  • "results": [
    ],
  • "summary": {
    }
}