TextMessageResource
One recipient's independently addressable outcome, including who it was for.
created_at records when Resia accepted the message, sent_at when it was handed to a
carrier — still null for a message blocked before sending — and completed_at when the
message reached any terminal state.
A failed message is the one outcome that says nothing about whether a carrier ever saw it: a
recipient who opted out is refused before the handoff and has no send time, while a carrier
rejection happens after it and has one. Every other status settles the question, which is why
only failed is left free to carry either.
- createdType: stringFormat: date-time
_at requiredthe date-time notation as defined by RFC 3339, section 5.6, for example, 2017-07-21T17:32:28Z
- fromType: string
_phone _number required - statusType: TextMessageStatusenumrequired
The delivery states Resia publishes, mapped from the provider at the transport boundary.
A provider's own status strings are never handed to a customer. The transport translates whatever the carrier reports into exactly these values, which is what lets Resia change or add a messaging provider without changing the public contract — the same independence Resia's call statuses keep from the voice provider's. Do not collapse this into a passthrough.
acceptedmeans Resia safely recorded the request and has not started sending; it is a single-send state only — a batch message readsqueuedfrom acceptance until it is sent.canceledis a batch message stopped before it was sent; it is terminal.delivery_unconfirmedis terminal but proves neither delivery nor failure: it is what a message becomes when no final carrier confirmation ever arrives.valuesacceptedqueuedsentdelivereddelivery_unconfirmedfailedcanceled - submissionType: string
_id min length:1max length:512deprecatedrequiredDeprecated alias of batch_id; it carries the same value. Use batch_id.
- textType: string
_message _id min length:1max length:512required - toType: string
_phone _number required - batchType: string
_id min length:1max length:512nullableThe batch this message belongs to. A message sent through /v1/text-message-batches and one sent through the deprecated /v1/text-messages both carry the id of their batch here.
- clientType: string
_reference min length:1max length:256nullableYour own label for this message, set at batch submission and echoed back unchanged. Null for a message the deprecated single-send created. Usable as a filter on GET /v1/text-messages.
- completedType: stringFormat: date-timenullable
_at the date-time notation as defined by RFC 3339, section 5.6, for example, 2017-07-21T17:32:28Z
- failureType: TextMessageFailurenullableProperties: 2
Why one recipient's message did not arrive: a stable reason plus a sentence a person reads.
- sentType: stringFormat: date-timenullable
_at the date-time notation as defined by RFC 3339, section 5.6, for example, 2017-07-21T17:32:28Z

