Download OpenAPI specification:
API for interacting with the Push Gateway
object (Notification) 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.
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
}
}