API overview
How to send a notification, keep a Live Activity up to date, and what the response means.
Sending
Create an endpoint in the app, copy its send URL, then POST JSON. Base host:
https://api.pinglark.app
Minimal send:
curl -X POST \
'https://api.pinglark.app/v1/send/{credential}' \
-H 'Content-Type: application/json' \
-d '{"message":"Deploy finished"}'
Useful optional fields: title, subtitle,
sound, image (https),
link (https), actions, reference,
thread.
Keep the credential secret. Anyone with the URL can notify that endpoint.
Example accepted response (202):
{
"notification_id": "ntf_…",
"accepted_at": "2026-10-09T12:00:00Z",
"warnings": []
}
Accepted vs delivered
A successful send returns 202 with a
notification_id. That means the service
accepted the request. It is not a promise that APNs delivered a
banner or that you saw it.
If you send the same reference again within 24 hours for
the same endpoint, the service returns the original receipt and does not
send again.
Action replies
Set "actions":"acknowledge" to add an Acknowledge button.
Values: acknowledge, yes_no,
approve_decline. You can answer from the lock screen or
Inbox. Pinglark records your answer, and your script can read it back
with the same send URL.
curl -X POST \
'https://api.pinglark.app/v1/send/{credential}' \
-H 'Content-Type: application/json' \
-d '{"title":"Deploy?","message":"Ship 2.4.1 now?","actions":"approve_decline"}'
Use the notification ID from the send receipt to check the answer:
SEND_URL='https://api.pinglark.app/v1/send/{credential}'
ID=ntf_…
# Check now
curl "$SEND_URL/notifications/$ID"
# Wait up to 60 seconds for an answer
curl "$SEND_URL/notifications/$ID?wait=60"
A pending answer looks like this:
{
"notification_id": "ntf_…",
"accepted_at": "2026-10-11T12:00:00.000Z",
"actions": "approve_decline",
"state": "pending",
"response": null,
"responded_at": null
}
For a script that waits and acts on the answer:
#!/usr/bin/env bash
# Ask before deploying. Needs curl and jq.
set -euo pipefail
SEND_URL='https://api.pinglark.app/v1/send/{credential}'
id=$(curl -sf -X POST "$SEND_URL" -H 'Content-Type: application/json' \
-d '{"title":"Deploy?","message":"Ship 2.4.1 to production?","actions":"approve_decline"}' \
| jq -r .notification_id)
deadline=$((SECONDS + 600)) # give up after 10 minutes
while (( SECONDS < deadline )); do
answer=$(curl -sf --max-time 75 "$SEND_URL/notifications/$id?wait=60" | jq -r '.response // empty')
case "$answer" in
approved|yes|acknowledged) echo "Approved"; exit 0 ;;
declined|no) echo "Declined" >&2; exit 1 ;;
esac
done
echo "No answer in time" >&2
exit 2
Live Activities
For a job that takes a while, keep one card on the Lock Screen and in the Dynamic Island up to date instead of sending a notification for every step. Post to the activities URL. It uses the same credential as your send URL.
curl -X POST \
'https://api.pinglark.app/v1/activities/{credential}' \
-H 'Content-Type: application/json' \
-d '{"activity_id":"deploy-1842","title":"Deploy","status":"Building","step":1,"total_steps":5}'
Send the same activity_id again to update the card. Only
include what changed:
curl -X POST \
'https://api.pinglark.app/v1/activities/{credential}' \
-H 'Content-Type: application/json' \
-d '{"activity_id":"deploy-1842","status":"Shipping","message":"Rolling out to production","step":4}'
End it when the job is done:
curl -X POST \
'https://api.pinglark.app/v1/activities/{credential}' \
-H 'Content-Type: application/json' \
-d '{"activity_id":"deploy-1842","event":"end","status":"Shipped","step":5,"state":"success"}'
Fields:
activity_id(required): your name for the activity. Letters, digits,._:-, up to 64.title: shown at the top, up to 40 characters. Set when the activity starts.status: a short word or two beside the title, up to 32 characters.message: one line under the progress bar, up to 120 characters.stepandtotal_steps: a segmented progress bar with up to 10 segments.state:active,successorfailure. Colors the status and bar.event:endto finish. You can leave it out otherwise.alert:trueto light up the screen for an update. Updates are silent by default.dismiss_after: withend, how many seconds the final card stays, up to 14400.
The first request starts the activity, and later ones update it. Open Pinglark once on the phone first, with Live Activities allowed for Pinglark in Settings. A phone shows an activity for up to eight hours. The Guide tab in the app has copyable examples for each of your endpoints and a practice activity you can try on the phone.
Browser requests and errors
The send, Live Activity, and answer-reading URLs support cross-origin browser requests without cookies. Keep send keys private. Never embed a shared key in a public website. Account APIs use the same-origin dashboard and do not allow cross-origin access.
Unknown and revoked send keys both return 404 endpoint_not_found. Malformed JSON returns invalid_json; a field with the wrong type returns invalid_payload with its field. A 429 response includes Retry-After in seconds.
GET https://api.pinglark.app/healthz returns {"ok":true} when the API process is reachable. It does not confirm push or email delivery.
Practice vs live
Practice mode keeps sends on your iPhone. To get a URL your scripts can call, turn on live sending in Settings, then create the endpoint. Endpoints made in practice mode stay on the device.