Push API
Use the copyable address from Drel as the base capability. Replace placeholders locally; never publish a real key in documentation, bug reports or source code.
Endpoints
| Form | Endpoint | When to use it |
|---|---|---|
| Bark-compatible path | GET /<key>/<title>/<body> | Simple shell calls with scalar query parameters. |
| Bark-compatible POST | POST /<key> | Form or JSON fields, while keeping the key in the path. |
| Portable JSON | POST /push | Use for structured parameters, including params and message types. |
curl "https://api.drel.app/YOUR_KEY/Build%20complete/Open%20the%20report" -G \ --data-urlencode "url=https://tools.example/release/42" \ --data-urlencode "mode=immersive"
curl https://api.drel.app/push -H 'content-type: application/json' -d '{
"deviceKey": "YOUR_KEY", "title": "Build complete",
"body": "Open the report", "url": "https://tools.example/release/42",
"mode": "immersive", "params": { "build": "42" }
}'Stable fields
| Field | Purpose | Notes |
|---|---|---|
title, body, subtitle | Notification text | Required title/body for normal direct messages. Keep all content non-sensitive. |
url | HTTPS destination | Opens in Drel after an explicit notification tap. Use a normal, publicly trusted HTTPS URL. |
mode / display | Presentation | normal, modal, and immersive are supported. Aliases full and fullscreen map to immersive. |
appId, route, params | Registered web-app launch | Use JSON POST when nested params are needed. A route must match the registered app contract. |
group / threadId, badge, sound | Organization and delivery options | iOS notification settings and system policy remain authoritative. |
icon, image | In-app image metadata | An icon never replaces Drel’s iOS App Icon. Images must use HTTPS. |
markdown, contentType, verificationCode, qrPayload | Rich inbox content | Use the JSON endpoint for an explicit typed message contract. |
copy, autoCopy, isArchive, id, revision, delete | Inbox behavior | Use only where your user flow makes the result clear; do not use a push to perform a sensitive action. |
Fields outside this table may exist for internal or experimental compatibility. Do not build production behavior around undocumented fields, critical-alert assumptions, volume overrides, or call-like presentation.
Responses, retries and delivery
A successful direct request returns a JSON result shaped like {"code":200,"attempted":1,"accepted":1,"expired":0,"message":"…"}. Errors use {"error":{"message":"…"}}. Field counts can change as delivery targets change, so clients should read the status and handle errors rather than parse prose.
No numeric rate or payload-size service-level guarantee is published for the official endpoint. Treat 4xx, 429 and 5xx as failures; keep URLs concise and URL-encode path/query values.
Key rotation and privacy
Reset a push address from Drel Settings when it may have leaked. Update every sender to the newly copied address; a previously reset address must be treated as invalid. The official service processes the message to deliver it and is not an end-to-end encrypted channel. See Privacy and Terms.