POST /v1/messages takes an audience, a payload and a few options, answers 202 with a message id and status: "queued", then resolves who is reachable and fans out in the background. The 202 says the send was accepted, not that a device has it. Read Delivery and retries for what happens after it.
messages:send scope and runs inside a tenant. A workspace key uses the default tenant unless you pass BuzzKit-Tenant, as described in Authentication. channel defaults to push.
Choosing an audience
There are four ways to say who a message is for, and at least one is required.to, segment and where are mutually exclusive. Sending two of them is a 400 targets_conflict. topic is the exception: it combines with any of the other three, and narrows the result to the subscribers whose topic preferences allow the message.
where is a 400 invalid_expression whose param points at the offending node, such as where.all[1]. An unknown topic or segment is a 404, and a topic that is not offered on the message’s channel is a 400 channel_not_offered.
Content
At least one oftitle, body or data is required, otherwise the call is a 400 payload_missing.
The iOS SDK registers your
actions and the opened receipt carries the tapped button id along with any text the person typed.
Expiry
ttlSeconds sets how long the message stays worth sending, from 60 seconds up to 28 days, defaulting to 24 hours. It becomes the message’s expiresAt, and is passed through to APNs as apns-expiration and to FCM as android.ttl. Deliveries still pending when it passes are failed with expired.
Idempotency
Send anIdempotency-Key header, or the equivalent idempotencyKey body field, and a retried request cannot send twice. Keys are unique per tenant and never expire.
202 and the header Idempotent-Replayed: true, and sends nothing. The request fingerprint is stored with the key, so the same key with a different request is a 409 idempotency_key_reused rather than a silently dropped send.
Creation is insert-first, so five simultaneous identical requests create one message and all five get
202 with the same object. Four of them carry Idempotent-Replayed: true.Provider escape hatches
When you need something BuzzKit does not model, pass it straight through.apns.payload is merged into the APNs payload, fcm.android into the FCM Android block, and fcm.payload into the FCM message. apns.environment picks which credential is used, sandbox or production. It defaults to production and falls back to whichever environment exists.
Next
Scheduling
Hold a message until a moment, in a fixed zone or in each subscriber’s own.
Delivery and retries
Fan-out, the attempt ledger, retries and token invalidation.
Segments
The grammar behind
segment and where.