Send a silent push notification
const url = 'https://work.optidata.cloud/api/notifications/mobile/send/silent';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"title":"Sync","body":"New documents are available","uuids":["9c1f0e2a-4d31-4d8a-8c1a-1f0b6b1f9a10"],"notification_key":"drive.share.permission_created"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://work.optidata.cloud/api/notifications/mobile/send/silent \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "title": "Sync", "body": "New documents are available", "uuids": [ "9c1f0e2a-4d31-4d8a-8c1a-1f0b6b1f9a10" ], "notification_key": "drive.share.permission_created" }'Queues a push notification that wakes the app without alerting the user —
used to trigger a background refresh. Recipients who have switched the
notification’s mobile channel off are filtered out, provided
notification_key is supplied; without it every recipient is kept.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
UUIDs of the recipients.
Arbitrary payload delivered to the app.
Notification whose mobile preference gates delivery. Omit and no recipient is filtered.
Examples
{ "title": "Sync", "body": "New documents are available", "uuids": [ "9c1f0e2a-4d31-4d8a-8c1a-1f0b6b1f9a10" ], "notification_key": "drive.share.permission_created"}Responses
Section titled “ Responses ”The notification was queued.
Minimal acknowledgement returned by several write operations.
object
Example
{ "success": true}Missing, malformed or expired authentication key.
Authentication failures use an error key rather than message.
object
Examples
No bearer token sent
{ "error": "JWT passport exception: Missing bearer token in request"}The request body or query string failed validation.
object
The first validation message.
Validation messages keyed by field name.
object
Examples
{ "message": "The name field is required.", "errors": { "name": [ "The name field is required." ] }}Rate limit exceeded. Retry after the window resets.
Generic error envelope used by policy, binding and framework failures.
object
Human-readable description of the failure.
Examples
{ "message": "Too Many Attempts."}