curl --request GET \
--url https://api.bland.ai/v1/widget/{id}/threads \
--header 'authorization: <authorization>'
{
"status": 200,
"data": [
{
"id": "thread_550e8400-e29b-41d4-a716-446655440000",
"created_at": "2024-01-15T14:30:00Z",
"visitor_id": "visitor_123456789",
"messages": [
{
"id": "msg_001",
"sender_type": "USER",
"created_at": "2024-01-15T14:30:00Z",
"content": "Hello, I need help with my order"
},
{
"id": "msg_002",
"sender_type": "ASSISTANT",
"created_at": "2024-01-15T14:30:15Z",
"content": "I'd be happy to help you with your order! Can you please provide your order number?"
},
{
"id": "msg_003",
"sender_type": "USER",
"created_at": "2024-01-15T14:30:45Z",
"content": "It's order #12345"
}
]
},
{
"id": "thread_660f9511-f3ac-52e5-b827-557766551111",
"created_at": "2024-01-15T13:15:00Z",
"visitor_id": null,
"messages": [
{
"id": "msg_101",
"sender_type": "USER",
"created_at": "2024-01-15T13:15:00Z",
"content": "What are your business hours?"
},
{
"id": "msg_102",
"sender_type": "ASSISTANT",
"created_at": "2024-01-15T13:15:05Z",
"content": "Our business hours are Monday through Friday, 9 AM to 6 PM EST."
}
]
}
],
"errors": null
}
Retrieves all conversation threads for a specific widget. Returns threads ordered by creation date (newest first) with associated messages ordered chronologically.
curl --request GET \
--url https://api.bland.ai/v1/widget/{id}/threads \
--header 'authorization: <authorization>'
{
"status": 200,
"data": [
{
"id": "thread_550e8400-e29b-41d4-a716-446655440000",
"created_at": "2024-01-15T14:30:00Z",
"visitor_id": "visitor_123456789",
"messages": [
{
"id": "msg_001",
"sender_type": "USER",
"created_at": "2024-01-15T14:30:00Z",
"content": "Hello, I need help with my order"
},
{
"id": "msg_002",
"sender_type": "ASSISTANT",
"created_at": "2024-01-15T14:30:15Z",
"content": "I'd be happy to help you with your order! Can you please provide your order number?"
},
{
"id": "msg_003",
"sender_type": "USER",
"created_at": "2024-01-15T14:30:45Z",
"content": "It's order #12345"
}
]
},
{
"id": "thread_660f9511-f3ac-52e5-b827-557766551111",
"created_at": "2024-01-15T13:15:00Z",
"visitor_id": null,
"messages": [
{
"id": "msg_101",
"sender_type": "USER",
"created_at": "2024-01-15T13:15:00Z",
"content": "What are your business hours?"
},
{
"id": "msg_102",
"sender_type": "ASSISTANT",
"created_at": "2024-01-15T13:15:05Z",
"content": "Our business hours are Monday through Friday, 9 AM to 6 PM EST."
}
]
}
],
"errors": null
}
id
(string): Thread UUIDcreated_at
(string): ISO timestampvisitor_id
(string | null): UUID of visitor (if available)messages
(array): Array of message objects, each containing:
id
(string): Message UUIDsender_type
(string): Either “USER” or “ASSISTANT”created_at
(string): ISO timestampcontent
(string): Message content{
"status": 200,
"data": [
{
"id": "thread_550e8400-e29b-41d4-a716-446655440000",
"created_at": "2024-01-15T14:30:00Z",
"visitor_id": "visitor_123456789",
"messages": [
{
"id": "msg_001",
"sender_type": "USER",
"created_at": "2024-01-15T14:30:00Z",
"content": "Hello, I need help with my order"
},
{
"id": "msg_002",
"sender_type": "ASSISTANT",
"created_at": "2024-01-15T14:30:15Z",
"content": "I'd be happy to help you with your order! Can you please provide your order number?"
},
{
"id": "msg_003",
"sender_type": "USER",
"created_at": "2024-01-15T14:30:45Z",
"content": "It's order #12345"
}
]
},
{
"id": "thread_660f9511-f3ac-52e5-b827-557766551111",
"created_at": "2024-01-15T13:15:00Z",
"visitor_id": null,
"messages": [
{
"id": "msg_101",
"sender_type": "USER",
"created_at": "2024-01-15T13:15:00Z",
"content": "What are your business hours?"
},
{
"id": "msg_102",
"sender_type": "ASSISTANT",
"created_at": "2024-01-15T13:15:05Z",
"content": "Our business hours are Monday through Friday, 9 AM to 6 PM EST."
}
]
}
],
"errors": null
}
Was this page helpful?