Hanzo
OpenapiTel

Sends a message from one of this org's own numbers.

Sends a message from one of this org's own numbers.

POST /v1/tel/messages

Addresshttps://api.hanzo.ai/v1/tel/messages
MethodPOST
Operationpost_tel_messages
AuthAuthorization: Bearer $HANZO_API_KEY

Sends a message from one of this org's own numbers.

from must be a number the org HOLDS, checked against the store rather than taken on trust — a caller that could send from any number could impersonate one, and the carrier would deliver it. to is required, and the body needs text or media, because a message with neither is delivered as nothing and billed as something.

Request

4 fields, body application/json (required).

FieldInTypeRequiredDescription
frombodystringFrom is the number to send FROM, in E.164.
mediabodystring[]Media are URLs to attach.
textbodystringText is the message body.
tobodystringTo is the number to send to, in E.164.

Response

StatusBodyMeaning
201SMScreated

201 body — 6 fields.

FieldInTypeAlwaysDescription
frombodystringFrom is the sending number in E.164, and must be one this org holds.
idbodystringID is the carrier's handle for the message.
orgbodystringOrg is the tenant the message was sent for or received by.
statusbodystringStatus is where the message is: "queued", "sent", "delivered" or "failed".
textbodystringText is the message body.
tobodystringTo is the receiving number in E.164.

Failure carries the platform error shape — see Errors.

Examples

hanzo tel messages create

Tel API · All Hanzo APIs · Interactive reference

How is this guide?

On this page