Download OpenAPI specification:
API for interacting with the Push 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.
| 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 |
| 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 |
| prio required | string (Priority) Enum: "high" "low" The priority of the notification. If omitted, |
| content | object (EventContent) The |
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. |
{- "notification": {
- "event_id": "event_id",
- "room_id": "room_id",
- "type": "type",
- "sender": "sender",
- "sender_display_name": "sender_display_name",
- "room_name": "room_name",
- "room_alias": "room_alias",
- "user_is_target": true,
- "prio": "high",
- "content": {
- "content": "content"
}, - "counts": {
- "unread": 1,
- "missed_calls": 0
}, - "devices": [
- {
- "app_id": "app_id",
- "pushkey": "pushkey",
- "pushkey_ts": 1634025600,
- "data": {
- "format": "format"
}, - "tweaks": {
- "tweak": "tweak"
}
}
]
}
}{- "rejected": [
- "V2h5IG9uIGVhcnRoIGRpZCB5b3UgZGVjb2RlIHRoaXM/"
]
}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.
required | Array of objects [ 1 .. 100 ] items Array of plain notifications to process in this batch |
{- "notifications": [
- {
- "id": "batch_item_1",
- "notification": {
- "event_id": "event_id_1",
- "room_id": "room_id_1",
- "type": "m.room.message",
- "sender": "sender_1",
- "sender_display_name": "Sender Display Name",
- "room_name": "Room Name",
- "prio": "high",
- "content": {
- "content": "Message content"
}, - "counts": {
- "unread": 1,
- "missed_calls": 0
}, - "devices": [
- {
- "app_id": "app_id_1",
- "pushkey": "pushkey_1",
- "pushkey_ts": 1634025600,
- "data": {
- "format": "format"
}, - "tweaks": {
- "tweak": "tweak"
}
}
]
}
}, - {
- "id": "batch_item_2",
- "notification": {
- "event_id": "event_id_2",
- "room_id": "room_id_2",
- "type": "m.room.message",
- "sender": "sender_2",
- "sender_display_name": "Sender Display Name",
- "room_name": "Room Name",
- "prio": "high",
- "content": {
- "content": "Message content"
}, - "counts": {
- "unread": 2,
- "missed_calls": 0
}, - "devices": [
- {
- "app_id": "app_id_2",
- "pushkey": "pushkey_2",
- "pushkey_ts": 1634025600,
- "data": {
- "format": "format"
}, - "tweaks": {
- "tweak": "tweak"
}
}
]
}
}
]
}{- "results": [
- {
- "id": "batch_item_1",
- "status": "success",
- "rejected": [ ]
}, - {
- "id": "batch_item_2",
- "status": "partial",
- "rejected": [
- "expired_pushkey_123"
]
}
], - "summary": {
- "total": 2,
- "successful": 1,
- "failed": 0,
- "partial": 1
}
}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.
required | Array of objects [ 1 .. 100 ] items Array of encrypted notifications to process in this batch |
{- "notifications": [
- {
- "id": "enc_batch_1",
- "notification": {
- "ciphertext": "base64_of_ciphertext_1",
- "time_message_encrypted": "2024-11",
- "key_identifier": "123e4567-e89b-12d3-a456-426614174000",
- "prio": "high",
- "counts": {
- "unread": 1,
- "missed_calls": 0
}, - "device": {
- "app_id": "app_id",
- "pushkey": "pushkey",
- "pushkey_ts": 1634025600,
- "data": {
- "format": "format"
}, - "tweaks": {
- "tweak": "tweak"
}
}
}
}, - {
- "id": "enc_batch_2",
- "notification": {
- "ciphertext": "base64_of_ciphertext_2",
- "time_message_encrypted": "2024-11",
- "key_identifier": "456e7890-e89b-12d3-a456-426614174001",
- "prio": "low",
- "counts": {
- "unread": 2,
- "missed_calls": 0
}, - "device": {
- "app_id": "app_id",
- "pushkey": "pushkey",
- "pushkey_ts": 1634025600,
- "data": {
- "format": "format"
}, - "tweaks": {
- "tweak": "tweak"
}
}
}
}
]
}{- "results": [
- {
- "id": "enc_batch_1",
- "status": "success",
- "rejected": [ ]
}, - {
- "id": "enc_batch_2",
- "status": "partial",
- "rejected": [
- "expired_pushkey_123"
]
}
], - "summary": {
- "total": 2,
- "successful": 1,
- "failed": 0,
- "partial": 1
}
}