addedOutput schema / $defs
Added value: +{
+ "SmsResponse": {
+ "properties": {
+ "agent_id": {
+ "anyOf": [
+ {
+ "format": "uuid",
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "The agent this text belongs to: the number's text agent on inbound texts, the agent that wrote it on outbound texts. Null when no agent is involved.",
+ "title": "Agent Id"
+ },
+ "body": {
+ "description": "Message text.",
+ "title": "Body",
+ "type": "string"
+ },
+ "direction": {
+ "description": "'outbound' for messages Hail sent, 'inbound' for messages received.",
+ "enum": [
+ "outbound",
+ "inbound"
+ ],
+ "title": "Direction",
+ "type": "string"
+ },
+ "error_code": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Carrier error code if delivery failed. Null on success or while pending.",
+ "title": "Error Code"
+ },
+ "from_e164": {
+ "description": "Sender phone number, E.164 format.",
+ "title": "From E164",
+ "type": "string"
+ },
+ "id": {
+ "description": "Unique identifier for this message.",
+ "format": "uuid",
+ "title": "Id",
+ "type": "string"
+ },
+ "organization_id": {
+ "description": "Organization that sent or received this message.",
+ "format": "uuid",
+ "title": "Organization Id",
+ "type": "string"
+ },
+ "provider_message_sid": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The carrier/provider's identifier for this message, if assigned.",
+ "title": "Provider Message Sid"
+ },
+ "requested_at": {
+ "description": "When the send was requested, ISO 8601 timestamp.",
+ "format": "date-time",
+ "title": "Requested At",
+ "type": "string"
+ },
+ "segment_count": {
+ "description": "Number of carrier SMS segments the body was split into.",
+ "title": "Segment Count",
+ "type": "integer"
+ },
+ "sent_at": {
+ "anyOf": [
+ {
+ "format": "date-time",
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "When the message was handed to the carrier, ISO 8601 timestamp. Null until sent.",
+ "title": "Sent At"
+ },
+ "status": {
+ "description": "Delivery status: 'queued', 'sent', 'delivered', 'failed', 'undelivered', or 'received' (inbound messages).",
+ "enum": [
+ "queued",
+ "sent",
+ "delivered",
+ "failed",
+ "undelivered",
+ "received"
+ ],
+ "title": "Status",
+ "type": "string"
+ },
+ "to_e164": {
+ "description": "Recipient phone number, E.164 format.",
+ "title": "To E164",
+ "type": "string"
+ }
+ },
+ "required": [
+ "id",
+ "organization_id",
+ "from_e164",
+ "to_e164",
+ "direction",
+ "agent_id",
+ "status",
+ "body",
+ "provider_message_sid",
+ "segment_count",
+ "error_code",
+ "requested_at",
+ "sent_at"
+ ],
+ "title": "SmsResponse",
+ "type": "object"
+ }
+}
addedOutput schema / anyOf
Added value: +[
+ {
+ "properties": {
+ "items": {
+ "description": "Messages in this page, newest first.",
+ "items": {
+ "$ref": "#/$defs/SmsResponse"
+ },
+ "title": "Items",
+ "type": "array"
+ },
+ "next_cursor": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "Opaque cursor for the next page. Null when there are no more results.",
+ "title": "Next Cursor"
+ }
+ },
+ "required": [
+ "items",
+ "next_cursor"
+ ],
+ "title": "SmsListResponse",
+ "type": "object"
+ },
+ {
+ "properties": {
+ "error": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "error"
+ ],
+ "type": "object"
+ }
+]