Download OpenAPI specification:
API for interacting with the Push Gateway
This API defines the endpoints and data formats for sending push notifications to a Push Gateway. It includes operations for submitting plain and encrypted notifications, as well as the expected responses and error handling.
The API is designed to be flexible and extensible, allowing for different notification formats and encryption methods as needed by various services implementing the Push Gateway specification.
Note: The base path for the endpoints MUST end with /push/v1, e.g. /push/v1/notify. This is to ensure compatibility with TI-M.
TI-M: Currently the URL MUST be an HTTPS URL with a path of _matrix/push/v1/notify
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.
| x-request-id | string [ 1 .. 128 ] characters Example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 Client-generated identifier for this individual HTTP request, used purely for operational purposes (e.g. log correlation and support requests). It has no effect on the processing of the notification. Support for this header is entirely OPTIONAL for every party involved. Clients (e.g. a Fachdienst) are not required to send this header, and a Push Gateway is not required to evaluate, log or return it, even if it is present on the request. Implementations MUST NOT fail or reject a request solely because this header is missing, unknown or unsupported. If a client chooses to send this header, and the receiving Push Gateway chooses to support this
feature, the Push Gateway SHOULD include the value in its log entries related to processing this
request and SHOULD return the same value in the Clients that make use of this header SHOULD generate a new, unique value (e.g. a UUIDv4) for every request. This identifier carries no semantic meaning, MUST NOT be used to correlate multiple requests (e.g. all requests of one batch or session) and MUST NOT contain personal or otherwise sensitive data. |
required | object (PlainNotification) Information about the push notification |
{- "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.
| x-request-id | string [ 1 .. 128 ] characters Example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 Client-generated identifier for this individual HTTP request, used purely for operational purposes (e.g. log correlation and support requests). It has no effect on the processing of the notification. Support for this header is entirely OPTIONAL for every party involved. Clients (e.g. a Fachdienst) are not required to send this header, and a Push Gateway is not required to evaluate, log or return it, even if it is present on the request. Implementations MUST NOT fail or reject a request solely because this header is missing, unknown or unsupported. If a client chooses to send this header, and the receiving Push Gateway chooses to support this
feature, the Push Gateway SHOULD include the value in its log entries related to processing this
request and SHOULD return the same value in the Clients that make use of this header SHOULD generate a new, unique value (e.g. a UUIDv4) for every request. This identifier carries no semantic meaning, MUST NOT be used to correlate multiple requests (e.g. all requests of one batch or session) and MUST NOT contain personal or otherwise sensitive data. |
required | Array of objects [ 1 .. 100 ] items unique 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.
| x-request-id | string [ 1 .. 128 ] characters Example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 Client-generated identifier for this individual HTTP request, used purely for operational purposes (e.g. log correlation and support requests). It has no effect on the processing of the notification. Support for this header is entirely OPTIONAL for every party involved. Clients (e.g. a Fachdienst) are not required to send this header, and a Push Gateway is not required to evaluate, log or return it, even if it is present on the request. Implementations MUST NOT fail or reject a request solely because this header is missing, unknown or unsupported. If a client chooses to send this header, and the receiving Push Gateway chooses to support this
feature, the Push Gateway SHOULD include the value in its log entries related to processing this
request and SHOULD return the same value in the Clients that make use of this header SHOULD generate a new, unique value (e.g. a UUIDv4) for every request. This identifier carries no semantic meaning, MUST NOT be used to correlate multiple requests (e.g. all requests of one batch or session) and MUST NOT contain personal or otherwise sensitive data. |
required | Array of objects [ 1 .. 100 ] items unique Array of encrypted notifications to process in this batch |
{- "notifications": [
- {
- "id": "enc_batch_1",
- "notification": {
- "ciphertext": "base64_of_ciphertext_1_0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF01234",
- "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_0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF01234",
- "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
}
}