curl -X POST https://mtxbiyilvgwhbdptysex.supabase.co/functions/v1/list-messages \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "limit": 20, "phone_number": "+14155551234" }'
{ "messages": [ { "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, "created_at": "2024-01-15T10:30:00Z" }, { "id": "7d3e8b00-b2c3-5d4e-0a1b-789012bcde01", "thread_id": "9f5a0b11-d4e5-7f6a-2b3c-901234def012", "from_number": "+14155551234", "to_number": "+16045551234", "body": "Thank you! I'll be there.", "direction": "inbound", "status": "delivered", "is_ai_generated": false, "created_at": "2024-01-15T10:35:00Z" } ], "total": 42, "has_more": true }
List SMS messages with filtering and pagination
inbound
outbound