Prudai Developer API: push devices
The operations of this part (Push devices).
Base URL https://api.prudai.com/v1. Logging in is in Login, scopes in Scopes and permissions, errors in Errors. Overview.
| Method | Path | What it does | State |
|---|---|---|---|
GET | /v1/push-devices | List my push devices | Coming soon |
POST | /v1/push-devices | Register this phone for push notifications | Coming soon |
POST | /v1/push-devices/{id}/test | Send a test notification to one of my devices | Coming soon |
POST | /v1/push-devices/unregister | Stop push notifications on this phone | Coming soon |
List my push devices
GET /v1/push-devices
Lists the devices of the signed-in person that can receive push notifications (iOS and browsers). Tokens and Web Push keys are never returned. Personal credentials only (personal token or Keycloak user token); a service key is refused. PUSH_NOTIFICATIONS_ENABLED=false returns 404.
- State: coming soon, not in production yet.
- Scope:
prudai:push_devices:read - Approval:
none, no extra step.
Responses
| Status | Meaning |
|---|---|
200 | Task envelope with the result. |
401 | Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment. |
403 | Authenticated, but not allowed (missing scope, product not on the key or organisation, organisation suspended, Developer API switched off for the organisation, IP not on the allowlist, depth not permitted, licence does not permit redistribution). |
404 | project_not_found (unknown project, or one you may not read: the same answer), document_not_found (not in this project), or original_unavailable (the original file is no longer stored). |
422 | Well-formed request with invalid values (for example an unknown reasoning_effort, empty messages, or an Idempotency-Key reused with a different body). |
429 | Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded. |
503 | Temporarily unavailable (maintenance, overload, or the credit check could not be performed). Nothing ran, nothing is charged. |
curl -s "https://api.prudai.com/v1/push-devices" \ -H "Authorization: Bearer $PRUDAI_TOKEN"prudai leo push-devices list[ { "id": "00000000-0000-4000-8000-000000000000", "platform": "ios", "label": "string", "apns_environment": "sandbox", "app_version": "string", "active": false, "last_seen_at": "2026-11-05T09:30:00.000Z", "last_sent_at": "2026-11-05T09:30:00.000Z", "created_at": "2026-11-05T09:30:00.000Z" }]Register this phone for push notifications
POST /v1/push-devices
Registers or refreshes the APNs device token of the signed-in person. A token is unique: when another person signs in on the same phone the device moves to that person. The response never contains the token. Notifications carry metadata only (kind and product), never customer content. Personal credentials only (personal token or Keycloak user token); a service key is refused. PUSH_NOTIFICATIONS_ENABLED=false returns 404.
- State: coming soon, not in production yet.
- Scope:
prudai:push_devices:write - Approval:
none, no extra step. - Dry run:
?dryRun=trueshows what would happen and stores nothing.
Parameters
dryRun
Validate and preview the effect without changing anything. One of:true,false
Body
JSON, required.
tokenrequired
APNs device token as hex. pattern^[0-9a-fA-F]{64,200}$environmentrequired
One of:sandbox,productionbundle_id
max length 155app_version
max length 32
Responses
| Status | Meaning |
|---|---|
201 | Task envelope with the result. |
401 | Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment. |
403 | Authenticated, but not allowed (missing scope, product not on the key or organisation, organisation suspended, Developer API switched off for the organisation, IP not on the allowlist, depth not permitted, licence does not permit redistribution). |
404 | project_not_found (unknown project, or one you may not read: the same answer), document_not_found (not in this project), or original_unavailable (the original file is no longer stored). |
422 | Well-formed request with invalid values (for example an unknown reasoning_effort, empty messages, or an Idempotency-Key reused with a different body). |
429 | Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded. |
503 | Temporarily unavailable (maintenance, overload, or the credit check could not be performed). Nothing ran, nothing is charged. |
Fields in data (201)
idplatform
One of:ios,weblabel
may benullapns_environment
One of:sandbox,production,null· may benullapp_version
may benullactivelast_seen_atlast_sent_at
may benullcreated_at
curl -s -X POST "https://api.prudai.com/v1/push-devices" \ -H "Authorization: Bearer $PRUDAI_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "token": "string", "environment": "sandbox", "bundle_id": "string", "app_version": "string" }'prudai leo push-devices create{ "id": "00000000-0000-4000-8000-000000000000", "platform": "ios", "label": "string", "apns_environment": "sandbox", "app_version": "string", "active": false, "last_seen_at": "2026-11-05T09:30:00.000Z", "last_sent_at": "2026-11-05T09:30:00.000Z", "created_at": "2026-11-05T09:30:00.000Z"}Send a test notification to one of my devices
POST /v1/push-devices/{id}/test
Sends a fixed test notification (“Pushmeldingen werken op dit apparaat.”) to one own active device. Personal credentials only (personal token or Keycloak user token); a service key is refused. PUSH_NOTIFICATIONS_ENABLED=false returns 404.
- State: coming soon, not in production yet.
- Scope:
prudai:push_devices:write - Approval:
none, no extra step. - Dry run:
?dryRun=trueshows what would happen and stores nothing.
Parameters
idrequireddryRun
Validate and preview the effect without changing anything. One of:true,false
Body
JSON, required.
Responses
| Status | Meaning |
|---|---|
200 | Task envelope with the result. |
401 | Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment. |
403 | Authenticated, but not allowed (missing scope, product not on the key or organisation, organisation suspended, Developer API switched off for the organisation, IP not on the allowlist, depth not permitted, licence does not permit redistribution). |
404 | project_not_found (unknown project, or one you may not read: the same answer), document_not_found (not in this project), or original_unavailable (the original file is no longer stored). |
422 | Well-formed request with invalid values (for example an unknown reasoning_effort, empty messages, or an Idempotency-Key reused with a different body). |
429 | Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded. |
503 | Temporarily unavailable (maintenance, overload, or the credit check could not be performed). Nothing ran, nothing is charged. |
Fields in data (200)
devices
min 0sent
min 0
curl -s -X POST "https://api.prudai.com/v1/push-devices/<id>/test" \ -H "Authorization: Bearer $PRUDAI_TOKEN" \ -H "Content-Type: application/json" \ -d '{}'prudai leo push-devices test{ "devices": 1, "sent": 1}Stop push notifications on this phone
POST /v1/push-devices/unregister
Removes the given APNs token of the signed-in person (logout, permission withdrawn). Removing a token that is not yours removes nothing. Personal credentials only (personal token or Keycloak user token); a service key is refused. PUSH_NOTIFICATIONS_ENABLED=false returns 404.
- State: coming soon, not in production yet.
- Scope:
prudai:push_devices:write - Approval:
none, no extra step. - Dry run:
?dryRun=trueshows what would happen and stores nothing.
Parameters
dryRun
Validate and preview the effect without changing anything. One of:true,false
Body
JSON, required.
tokenrequired
pattern^[0-9a-fA-F]{64,200}$
Responses
| Status | Meaning |
|---|---|
200 | Task envelope with the result. |
401 | Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment. |
403 | Authenticated, but not allowed (missing scope, product not on the key or organisation, organisation suspended, Developer API switched off for the organisation, IP not on the allowlist, depth not permitted, licence does not permit redistribution). |
404 | project_not_found (unknown project, or one you may not read: the same answer), document_not_found (not in this project), or original_unavailable (the original file is no longer stored). |
422 | Well-formed request with invalid values (for example an unknown reasoning_effort, empty messages, or an Idempotency-Key reused with a different body). |
429 | Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded. |
503 | Temporarily unavailable (maintenance, overload, or the credit check could not be performed). Nothing ran, nothing is charged. |
Fields in data (200)
removed
min 0
curl -s -X POST "https://api.prudai.com/v1/push-devices/unregister" \ -H "Authorization: Bearer $PRUDAI_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "token": "string" }'prudai leo push-devices unregister{ "removed": 1}