Skip to content
Nofy by Encipher Docs

Messages

Send a message

Send one handoff across channels

POST https://nofy.encipher.co.tz/v2/messages

Accepts a composed message and fans out one delivery per recipient per channel, then queues the sends. A 202 means accepted and queued, not delivered: follow each delivery through callbacks or GET /v2/deliveries.

Authorizations

Authorizationstringheaderrequired

Bearer <token>, where the token comes from Create a token with the client-credentials grant.

Headers

Idempotency-Key string required

Any unique string per handoff. Replaying a key returns the original 202 instead of sending again.

Body application/json

tenant string required

Your id for the customer this message is for. Provision it first with POST /v2/tenants.

event_type string required

Your label for what happened, e.g. shift.closed. Shown in the console and in alerts.

reference string

Your id for this handoff. Filter GET /v2/deliveries by it.

callback_url string<url>

Receives a signed post for every terminal delivery state. See Callbacks.

messages object[] required

One entry per channel. Repeating a channel is a 400.

ShowHide child attributes
channel enum<string> required

Which channel carries this entry.

Available options: sms, email, push, whatsapp

recipients string[] required

Phone numbers (E.164 digits, a leading + is accepted), email addresses, or your user ids for push.

content object required

What to send. Fields depend on kind.

ShowHide child attributes
kind enum<string> required

rendered for SMS, email and push; template for WhatsApp. Validated against the channel.

Available options: rendered, template

body string

Message text. Required when kind is rendered.

subject string

Email subject or push title.

html string

Email only: the HTML part. Required when sending inline_images.

inline_images object[]

Email only: images referenced from html as cid:<cid>.

ShowHide child attributes
cid string required

Content id the HTML references.

media_type string default: image/png

MIME type.

data string required

Base64-encoded bytes. Moved to storage on receipt.

data map<string, string>

Push only: key/value payload delivered to the app.

template_name string

WhatsApp only: an approved template name.

language string

WhatsApp only: the template language code, e.g. en.

body_params string[]

WhatsApp only: template variables, in order. No newlines, tabs or runs of 4+ spaces.

url_button_suffix string

WhatsApp only: the dynamic part of a URL button.

Responses

202 Accepted and queued. One delivery per recipient, each pending.
400 Validation details, unknown tenant, a bad channel/kind pairing, or a missing Idempotency-Key.
401 Missing or invalid token.
403 Authenticated, but not with a client-credentials token.
413 Request body over 5 MB.
429 Tenant or client daily quota reached.
Read the guideSending on v2
Esc
↑↓ to move↵ to open