You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`deviceToken`| string | yes | Provider-specific device token identifying the target device. For APNs, this is the APNs device token. For FCM, this is the FCM registration token. |
|`encrypted`| string | yes | — | Encrypted notification payload to relay to the target device. This value should already be encrypted by the sender; the bisq-relay does not decrypt, validate, or interpret the encrypted message contents. |
277
+
|`isUrgent`| boolean | no |`false`| When `true`, sends the notification as a high-priority alert. When `false`, sends it as a background notification where supported by the provider. |
278
+
|`isMutableContent`| boolean | no |`false`| APNs only. When `true`, sets the `mutable-content` flag in the APNs payload, allowing the iOS app's Notification Service Extension to modify the notification before display, for example for client-side decryption. This field is ignored for FCM requests. |
279
+
280
+
### Example APNs Request
281
+
282
+
```bash
283
+
curl -X POST "http://127.0.0.1:8080/v1/apns/device/<device-token>" \
284
+
-H "Content-Type: application/json" \
285
+
-H "Accept: application/json" \
286
+
-d '{
287
+
"encrypted": "<encrypted-payload>",
288
+
"isUrgent": true,
289
+
"isMutableContent": true
290
+
}'
291
+
```
292
+
293
+
### Example FCM Request
294
+
295
+
```bash
296
+
curl -X POST "http://127.0.0.1:8080/v1/fcm/device/<device-token>" \
297
+
-H "Content-Type: application/json" \
298
+
-H "Accept: application/json" \
299
+
-d '{
300
+
"encrypted": "<encrypted-payload>",
301
+
"isUrgent": false
302
+
}'
303
+
```
304
+
305
+
### Successful Response
306
+
307
+
If the provider accepts the notification, the bisq-relay returns `200 OK` with a JSON response body.
308
+
309
+
```json
310
+
{
311
+
"wasAccepted": true,
312
+
"isUnregistered": false
313
+
}
314
+
```
315
+
316
+
### Provider Rejection Response
317
+
318
+
If the request is valid but the push provider rejects the notification, the relay returns `400 Bad Request` with
|`wasAccepted`| boolean | Indicates whether the upstream push provider accepted the notification. |
333
+
|`errorCode`| string | Provider error code, when available. Omitted when there is no provider error code. |
334
+
|`errorMessage`| string | Provider error message, when available. Omitted when there is no provider error message. |
335
+
|`isUnregistered`| boolean | Indicates whether the target device token is no longer registered with the push provider. Clients should treat this as a signal that the token may need to be removed or refreshed. |
336
+
337
+
### Request Error Responses
338
+
339
+
Request-level errors return an HTTP status code with an empty response body.
243
340
244
-
| Field | Type | Required | Default | Description |
|`isUrgent`| boolean | no |`false`| When `true`, sends as high-priority alert; when `false`, sends as background notification |
248
-
|`isMutableContent`| boolean | no |`false`| APNs only. When `true`, sets the `mutable-content` flag in the APNs payload, allowing the iOS app's Notification Service Extension (NSE) to modify the notification content before display (e.g. for client-side decryption) |
0 commit comments