notifications
Version 0.1.08 operations
Which push providers are configured, and the Web Push public key
GET/me/push/configAPI key
Parameters
No parameters.
Responses
200
webPushWebPushConfigDtorequiredenabledbooleanrequiredpublicKeystring | nullrequiredVAPID public key (base64url) for PushManager.subscribe
fcmProviderStateDtorequiredenabledbooleanrequired
Code samples
curl -X GET "$KONNECT_API_URL/me/push/config" \
-H "Authorization: Bearer $KONNECT_API_KEY"Example: 200
{
"webPush": {
"enabled": true,
"publicKey": "publicKey"
},
"fcm": {
"enabled": true
}
}Active devices of the signed-in user
GET/me/push/devicesAPI key
Parameters
endpointstringqueryEndpoint or token of this browser or app, to mark it
current
Responses
200
idstring (uuid)requiredplatformstringrequired- enum: "web", "android", "ios"
labelstringrequiredlocalestringrequired- enum: "fr", "en"
organisationIdstring (uuid) | nullrequiredcreatedAtstringrequiredlastSeenAtstringrequiredcurrentbooleanrequiredThe device of the registration or of the
endpointquery
Code samples
curl -X GET "$KONNECT_API_URL/me/push/devices" \
-H "Authorization: Bearer $KONNECT_API_KEY"Example: 200
[
{
"id": "id",
"platform": "web",
"label": "Chrome, macOS",
"locale": "fr",
"organisationId": "org_01J9Z3K4EXAMPLE0000000000",
"createdAt": "createdAt",
"lastSeenAt": "lastSeenAt",
"current": true
}
]Register or refresh this browser or app
POST/me/push/devicesAPI key
A web device sends its PushSubscription, an app its FCM token. Registering a token again refreshes it; a token registered by another user moves to this one.
Parameters
No parameters.
Request body application/json
platformstringrequired- enum: "web", "android", "ios"
tokenstringFCM registration token (android, ios)
subscriptionanyWeb Push subscription (web)
organisationIdstring (uuid)Only this organisation; every organisation of the user when absent
localestring- enum: "fr", "en"
- default: "fr"
Responses
201
idstring (uuid)requiredplatformstringrequired- enum: "web", "android", "ios"
labelstringrequiredlocalestringrequired- enum: "fr", "en"
organisationIdstring (uuid) | nullrequiredcreatedAtstringrequiredlastSeenAtstringrequiredcurrentbooleanrequiredThe device of the registration or of the
endpointquery
400validation_failed, push_provider_disabled, push_subscription_required, push_token_required
404organisation_not_found
Code samples
curl -X POST "$KONNECT_API_URL/me/push/devices" \
-H "Authorization: Bearer $KONNECT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"platform": "web",
"token": "token",
"subscription": {
"endpoint": "endpoint",
"keys": {
"p256dh": "p256dh",
"auth": "auth"
}
},
"organisationId": "org_01J9Z3K4EXAMPLE0000000000",
"locale": "fr"
}'Example: request body
{
"platform": "web",
"token": "token",
"subscription": {
"endpoint": "endpoint",
"keys": {
"p256dh": "p256dh",
"auth": "auth"
}
},
"organisationId": "org_01J9Z3K4EXAMPLE0000000000",
"locale": "fr"
}Example: 201
{
"id": "id",
"platform": "web",
"label": "Chrome, macOS",
"locale": "fr",
"organisationId": "org_01J9Z3K4EXAMPLE0000000000",
"createdAt": "createdAt",
"lastSeenAt": "lastSeenAt",
"current": true
}Stop notifications on a device
DELETE/me/push/devices/{deviceId}API key
Parameters
deviceIdstringpathrequired
Responses
204
404push_device_not_found
Code samples
curl -X DELETE "$KONNECT_API_URL/me/push/devices/deviceId" \
-H "Authorization: Bearer $KONNECT_API_KEY"Send a test notification to one device or to every active device
POST/me/push/testAPI key
Parameters
No parameters.
Request body application/json
deviceIdstring (uuid)One device; every active device when absent
Responses
200
itemsPushDeliveryDto[]requiredidstring (uuid)requireddeviceIdstring (uuid)requireddeviceLabelstringrequiredtypestringrequired- enum: "payment_received", "payment_failed", "webhook_not_confirmed", "daily_summary", "test", "onboarding_reminder", "document_reviewed"
organisationIdstring (uuid) | nullrequiredstatusstringrequired- enum: "pending", "sent", "retrying", "failed", "invalid_token", "skipped"
skipReasonstring | nullrequired- enum: "allowlist", "rate_limited", "quiet_hours", "provider_disabled", "imported_account_protected"
responseClassstring | nullrequired- enum: "delivered", "invalid_token", "rate_limited", "payload_rejected", "auth_error", "server_error", "network_error"
titlestringrequiredbodystringrequiredurlstringrequiredRelative deep link of the dashboard
createdAtstringrequiredsentAtstring | nullrequired
404push_device_not_found
Code samples
curl -X POST "$KONNECT_API_URL/me/push/test" \
-H "Authorization: Bearer $KONNECT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"deviceId": "deviceId"
}'Example: request body
{
"deviceId": "deviceId"
}Example: 200
{
"items": [
{
"id": "id",
"deviceId": "deviceId",
"deviceLabel": "deviceLabel",
"type": "payment_received",
"organisationId": "org_01J9Z3K4EXAMPLE0000000000",
"status": "pending",
"skipReason": "allowlist",
"responseClass": "delivered",
"title": "title",
"body": "body",
"url": "url",
"createdAt": "createdAt",
"sentAt": "sentAt"
}
]
}Last notifications of the signed-in user, newest first
GET/me/push/deliveriesAPI key
Parameters
cursoranyquerylimitintegerquery- max: 100
- default: 20
Responses
200
itemsPushDeliveryDto[]requiredidstring (uuid)requireddeviceIdstring (uuid)requireddeviceLabelstringrequiredtypestringrequired- enum: "payment_received", "payment_failed", "webhook_not_confirmed", "daily_summary", "test", "onboarding_reminder", "document_reviewed"
organisationIdstring (uuid) | nullrequiredstatusstringrequired- enum: "pending", "sent", "retrying", "failed", "invalid_token", "skipped"
skipReasonstring | nullrequired- enum: "allowlist", "rate_limited", "quiet_hours", "provider_disabled", "imported_account_protected"
responseClassstring | nullrequired- enum: "delivered", "invalid_token", "rate_limited", "payload_rejected", "auth_error", "server_error", "network_error"
titlestringrequiredbodystringrequiredurlstringrequiredRelative deep link of the dashboard
createdAtstringrequiredsentAtstring | nullrequired
nextCursorstring | nullrequired
Code samples
curl -X GET "$KONNECT_API_URL/me/push/deliveries" \
-H "Authorization: Bearer $KONNECT_API_KEY"Example: 200
{
"items": [
{
"id": "id",
"deviceId": "deviceId",
"deviceLabel": "deviceLabel",
"type": "payment_received",
"organisationId": "org_01J9Z3K4EXAMPLE0000000000",
"status": "pending",
"skipReason": "allowlist",
"responseClass": "delivered",
"title": "title",
"body": "body",
"url": "url",
"createdAt": "createdAt",
"sentAt": "sentAt"
}
],
"nextCursor": "nextCursor"
}Notification preferences of the signed-in member
GET/organisations/{id}/push/preferencesAPI key
Parameters
idstringpathrequired
Responses
200
organisationIdstring (uuid)requiredtypesstring[]requiredaccountsPreferenceAccountDto[]requiredAccounts of the member scope
idstring (uuid)requirednamestringrequired
itemsPreferenceCellDto[]requiredtypestringrequired- enum: "payment_received", "payment_failed", "webhook_not_confirmed", "daily_summary"
paymentAccountIdstring (uuid) | nullrequiredenabledbooleanrequiredEffective value
explicitbooleanrequiredFalse when the value comes from the level above or the default
optionsPushOptionsDtorequireddailySummaryTimestringrequiredLocal time of the daily summary
quietHoursany | nullrequiredtimeZonestringrequiredIANA time zone
403permission_denied
Code samples
curl -X GET "$KONNECT_API_URL/organisations/id/push/preferences" \
-H "Authorization: Bearer $KONNECT_API_KEY"Example: 200
{
"organisationId": "org_01J9Z3K4EXAMPLE0000000000",
"types": [
"payment_received"
],
"accounts": [
{
"id": "id",
"name": "name"
}
],
"items": [
{
"type": "payment_received",
"paymentAccountId": "paymentAccountId",
"enabled": true,
"explicit": true
}
],
"options": {
"dailySummaryTime": "19:00",
"quietHours": {
"start": "22:00",
"end": "07:00"
},
"timeZone": "Africa/Tunis"
}
}Replace the notification preferences of the signed-in member
PUT/organisations/{id}/push/preferencesAPI key
Every stored switch is replaced by items; a type without a row follows the level above, then the default (on, except the daily summary).
Parameters
idstringpathrequired
Request body application/json
itemsPreferenceSwitchDto[]requiredReplaces every stored switch
typestringrequired- enum: "payment_received", "payment_failed", "webhook_not_confirmed", "daily_summary"
paymentAccountIdstring (uuid) | nullrequiredNull: the organisation level row
enabledbooleanrequired
optionsPushOptionsDtorequireddailySummaryTimestringrequiredLocal time of the daily summary
quietHoursany | nullrequiredtimeZonestringrequiredIANA time zone
Responses
200
organisationIdstring (uuid)requiredtypesstring[]requiredaccountsPreferenceAccountDto[]requiredAccounts of the member scope
idstring (uuid)requirednamestringrequired
itemsPreferenceCellDto[]requiredtypestringrequired- enum: "payment_received", "payment_failed", "webhook_not_confirmed", "daily_summary"
paymentAccountIdstring (uuid) | nullrequiredenabledbooleanrequiredEffective value
explicitbooleanrequiredFalse when the value comes from the level above or the default
optionsPushOptionsDtorequireddailySummaryTimestringrequiredLocal time of the daily summary
quietHoursany | nullrequiredtimeZonestringrequiredIANA time zone
400validation_failed
403permission_denied or account_out_of_scope
Code samples
curl -X PUT "$KONNECT_API_URL/organisations/id/push/preferences" \
-H "Authorization: Bearer $KONNECT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"items": [
{
"type": "payment_received",
"paymentAccountId": "paymentAccountId",
"enabled": true
}
],
"options": {
"dailySummaryTime": "19:00",
"quietHours": {
"start": "22:00",
"end": "07:00"
},
"timeZone": "Africa/Tunis"
}
}'Example: request body
{
"items": [
{
"type": "payment_received",
"paymentAccountId": "paymentAccountId",
"enabled": true
}
],
"options": {
"dailySummaryTime": "19:00",
"quietHours": {
"start": "22:00",
"end": "07:00"
},
"timeZone": "Africa/Tunis"
}
}Example: 200
{
"organisationId": "org_01J9Z3K4EXAMPLE0000000000",
"types": [
"payment_received"
],
"accounts": [
{
"id": "id",
"name": "name"
}
],
"items": [
{
"type": "payment_received",
"paymentAccountId": "paymentAccountId",
"enabled": true,
"explicit": true
}
],
"options": {
"dailySummaryTime": "19:00",
"quietHours": {
"start": "22:00",
"end": "07:00"
},
"timeZone": "Africa/Tunis"
}
}