Skip to content

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.

MethodPathWhat it doesState
GET/v1/push-devicesList my push devicesComing soon
POST/v1/push-devicesRegister this phone for push notificationsComing soon
POST/v1/push-devices/{id}/testSend a test notification to one of my devicesComing soon
POST/v1/push-devices/unregisterStop push notifications on this phoneComing 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

StatusMeaning
200Task envelope with the result.
401Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment.
403Authenticated, 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).
404project_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).
422Well-formed request with invalid values (for example an unknown reasoning_effort, empty messages, or an Idempotency-Key reused with a different body).
429Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded.
503Temporarily unavailable (maintenance, overload, or the credit check could not be performed). Nothing ran, nothing is charged.
curl
curl -s "https://api.prudai.com/v1/push-devices" \
-H "Authorization: Bearer $PRUDAI_TOKEN"
CLI (coming soon)
prudai leo push-devices list
Response 200
[
{
"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=true shows what would happen and stores nothing.

Parameters

  • dryRun query · string
    Validate and preview the effect without changing anything. One of: true, false

Body

JSON, required.

  • token string required
    APNs device token as hex. pattern ^[0-9a-fA-F]{64,200}$
  • environment string required
    One of: sandbox, production
  • bundle_id string
    max length 155
  • app_version string
    max length 32

Responses

StatusMeaning
201Task envelope with the result.
401Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment.
403Authenticated, 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).
404project_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).
422Well-formed request with invalid values (for example an unknown reasoning_effort, empty messages, or an Idempotency-Key reused with a different body).
429Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded.
503Temporarily unavailable (maintenance, overload, or the credit check could not be performed). Nothing ran, nothing is charged.

Fields in data (201)

  • id string (uuid)
  • platform string
    One of: ios, web
  • label string
    may be null
  • apns_environment string
    One of: sandbox, production, null · may be null
  • app_version string
    may be null
  • active boolean
  • last_seen_at string (date-time)
  • last_sent_at string (date-time)
    may be null
  • created_at string (date-time)
curl
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"
}'
CLI (coming soon)
prudai leo push-devices create
Response 201
{
"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=true shows what would happen and stores nothing.

Parameters

  • id path · string (uuid) required
  • dryRun query · string
    Validate and preview the effect without changing anything. One of: true, false

Body

JSON, required.

Responses

StatusMeaning
200Task envelope with the result.
401Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment.
403Authenticated, 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).
404project_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).
422Well-formed request with invalid values (for example an unknown reasoning_effort, empty messages, or an Idempotency-Key reused with a different body).
429Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded.
503Temporarily unavailable (maintenance, overload, or the credit check could not be performed). Nothing ran, nothing is charged.

Fields in data (200)

  • devices integer
    min 0
  • sent integer
    min 0
curl
curl -s -X POST "https://api.prudai.com/v1/push-devices/<id>/test" \
-H "Authorization: Bearer $PRUDAI_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
CLI (coming soon)
prudai leo push-devices test
Response 200
{
"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=true shows what would happen and stores nothing.

Parameters

  • dryRun query · string
    Validate and preview the effect without changing anything. One of: true, false

Body

JSON, required.

  • token string required
    pattern ^[0-9a-fA-F]{64,200}$

Responses

StatusMeaning
200Task envelope with the result.
401Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment.
403Authenticated, 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).
404project_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).
422Well-formed request with invalid values (for example an unknown reasoning_effort, empty messages, or an Idempotency-Key reused with a different body).
429Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded.
503Temporarily unavailable (maintenance, overload, or the credit check could not be performed). Nothing ran, nothing is charged.

Fields in data (200)

  • removed integer
    min 0
curl
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"
}'
CLI (coming soon)
prudai leo push-devices unregister
Response 200
{
"removed": 1
}