Send a push notification with a POST requestSend a message

POST/v1/messages

Authenticate with a sender token. user and message are required.

POST /v1/messages
curl https://acciti.com/v1/messages \  -H "Authorization: Bearer $ACCITI_TOKEN" \  -H "Content-Type: application/json" \  -d '{    "user": "your-user-key",    "title": "Payment received",    "message": "$49.00 from a new subscriber",    "sound": "chime"  }'

Parameters

userstringRequired
The recipient's user key.
messagestringRequired
The body, up to 1024 characters.
titlestring
Up to 128 characters. Defaults to the sender's name.
soundstring
A built-in sound or one your team uploaded. An unknown name is refused.
priorityinteger
-2 to 2. Defaults to 0.
urlstring
A link to open from the notification.
urlTitlestring
The link's label. Needs url.
ttlinteger
Seconds. A message not delivered by then is dropped instead of shown late.
retryinteger
Priority 2 only. Seconds between repeats.
expireinteger
Priority 2 only. Seconds until the repeats stop.
dedupKeystring
Your name for the condition, so repeats collapse into one alert.
dedupWindowinteger
Seconds the condition stays open. Needs dedupKey.
escalationstring
The name of one of the sending team's escalation policies.

Response

A 202 means Acciti accepted the message. Delivery happens after the response, so your code never waits on Apple.

202 Accepted
{  "id": "e4ddc35f-a42b-41b7-ae0e-033794827b4b",  "status": "accepted",  "deviceCount": 3}

When deviceCount is 0

The message was accepted and went to no device. Without a held field, the recipient has no device signed in. With one, they have devices and chose how this sender reaches them:

  • "held": "digest" waits for a summary the recipient scheduled.
  • "held": "mute" goes to the inbox without a notification.
  • "held": "maintenance" means your team has a maintenance window open. Alerts from the senders it covers go to the inbox silently, including priority 2 and alerts that name an escalation policy, until the window ends.

Digest and mute are the recipient's settings. You can't change or list them, and retrying won't help. Priority 1 and 2 are never held by these settings, so an emergency always rings. Every held alert is in the recipient's inbox.