Skip to main content
POST
https://mtxbiyilvgwhbdptysex.supabase.co/functions/v1
/
get-message
curl -X POST https://mtxbiyilvgwhbdptysex.supabase.co/functions/v1/get-message \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"message_id": "8e4f9a00-c3d4-6e5f-1a2b-890123cdef01"}'
{
  "id": "8e4f9a00-c3d4-6e5f-1a2b-890123cdef01",
  "thread_id": "9f5a0b11-d4e5-7f6a-2b3c-901234def012",
  "from_number": "+16045551234",
  "to_number": "+14155551234",
  "body": "Your appointment is confirmed for tomorrow at 2pm.",
  "direction": "outbound",
  "status": "delivered",
  "is_ai_generated": false,
  "media_urls": [],
  "segments": 1,
  "created_at": "2024-01-15T10:30:00Z"
}
Get detailed information about a message, including its delivery status and any media attachments.

Request Body

message_id
string
required
The unique identifier of the message to retrieve.

Response

id
string
Unique message identifier.
thread_id
string
The conversation thread this message belongs to.
from_number
string
The sending phone number.
to_number
string
The recipient phone number.
body
string
The message content.
direction
string
Either inbound or outbound.
status
string
Message status: queued, sent, delivered, undelivered, or failed.
is_ai_generated
boolean
Whether this message was generated by the AI agent.
media_urls
array
URLs for any MMS attachments.
segments
integer
Number of SMS segments consumed.
error_code
string
Error code if the message failed.
error_message
string
Error description if the message failed.
created_at
string
ISO 8601 timestamp when the message was created.
curl -X POST https://mtxbiyilvgwhbdptysex.supabase.co/functions/v1/get-message \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"message_id": "8e4f9a00-c3d4-6e5f-1a2b-890123cdef01"}'
{
  "id": "8e4f9a00-c3d4-6e5f-1a2b-890123cdef01",
  "thread_id": "9f5a0b11-d4e5-7f6a-2b3c-901234def012",
  "from_number": "+16045551234",
  "to_number": "+14155551234",
  "body": "Your appointment is confirmed for tomorrow at 2pm.",
  "direction": "outbound",
  "status": "delivered",
  "is_ai_generated": false,
  "media_urls": [],
  "segments": 1,
  "created_at": "2024-01-15T10:30:00Z"
}