Hanzo
OpenapiNotify

Delivers one transactional message by email or SMS through the caller org's own…

Delivers one transactional message by email or SMS through the caller org's own provider credential.

POST /v1/notify/send

Addresshttps://api.hanzo.ai/v1/notify/send
MethodPOST
Operationpost_notify_send
AuthAuthorization: Bearer $HANZO_API_KEY

Delivers one transactional message by email or SMS through the caller org's own provider credential.

The channel comes from the body — sms or email — and the provider credential is read from KMS at orgs/<org>/notify/<service>/<key>, never from the environment. The org is the validated principal's, never a client-supplied value, so a caller can only ever send as their own tenant; an unauthenticated caller gets 401. Naming no provider picks the one whose credentials are actually configured (Twilio, then Plivo for SMS; Twilio Email, then SMTP for email) and fails closed when none is. Delivery is synchronous and per recipient: one recipient answers the bare {message_id,status} outcome, several answer the {items:[…]} envelope. A terminal provider failure is a 200 whose status is failed with the reason in error, never a transport error. sync=true is REQUIRED — an async dispatch answers 503, because the queue plane that would run it is owned elsewhere. The message body wins verbatim when present; otherwise template_id (or the event name) selects a built-in template rendered against template_vars.

Request

9 fields, body application/json (required).

FieldInTypeRequiredDescription
bodybodystringBody is the message text, sent verbatim when present — the no-template path.
channelbodystringChannel selects the delivery channel, sms or email.
eventbodystringEvent is the event name, which doubles as the template id when TemplateID is empty — the IAM OTP path sends event=iam.otp_sent and nothing else.
providerbodystringProvider pins a provider service name (twilio, plivo, twilio_email, mail).
subjectbodystringSubject is the message subject, carried on the email channel only.
syncbodystringSync must be exactly "true": delivery here is synchronous, and anything else answers 503 because the queue plane that would run an async dispatch is owned…
template_idbodystringTemplateID selects a built-in template when Body is empty.
template_varsbodyanyTemplateVars carries the values the selected template renders against, as a raw JSON object.
tobodystring[]To is the destination address per recipient — a phone number for sms, an email address for email.

Response

StatusBodyMeaning
200ok

200 body — 1 field.

FieldInTypeAlwaysDescription
(body)bodyanyyes

Failure carries the platform error shape — see Errors.

Examples

hanzo notify send create

Notify API · All Hanzo APIs · Interactive reference

How is this guide?

On this page