List Tickets
Retrieve all support tickets for a project.
Page number for pagination (default: 1)
Number of results per page (default: 30)
Filter by status: open, closed, waiting, resolved, spam
Search tickets by subject, email, or content
Sort order: date_asc or date_desc
GET /api/brands/{brand}/tickets
curl "https://app.elasticfunnels.io/api/brands/{brand_id}/tickets?status=open&page=1" \
-H "EF-Access-Key: your_api_key_here"
{
"data": [
{
"brand_id": 123,
"ticket_code": "TKT-12345",
"type": "support",
"status": "open",
"subject": "Question about my order",
"from_name": "John Doe",
"from_email": "[email protected]",
"customer_email": "[email protected]",
"preview_message": "I have a question about...",
"read": false,
"created_at": "2024-12-10T10:30:00.000000Z",
"updated_at": "2024-12-10T10:30:00.000000Z",
"created_at_label": "2 hours ago",
"status_label": "Open"
}
],
"meta": {
"current_page": 1,
"per_page": 30,
"total": 45
},
"statuses": {
"open": 15,
"waiting": 10,
"closed": 18,
"resolved": 2,
"spam": 0
}
}
Get Ticket Statuses
Get count of tickets by status.
GET /api/brands/{brand}/tickets/statuses
curl https://app.elasticfunnels.io/api/brands/{brand_id}/tickets/statuses \
-H "EF-Access-Key: your_api_key_here"
{
"open": 15,
"waiting": 10,
"closed": 18,
"resolved": 2,
"spam": 0
}
Mark Ticket as Read
Mark a ticket as read.
The ticket code (e.g., “TKT-12345”)
POST /api/brands/{brand}/tickets/{ticket_code}/mark-as-read
curl -X POST https://app.elasticfunnels.io/api/brands/{brand_id}/tickets/TKT-12345/mark-as-read \
-H "EF-Access-Key: your_api_key_here"
{
"message": "Ticket marked as read"
}
Mark Ticket as Unread
Mark a ticket as unread.
The ticket code (e.g., “TKT-12345”)
POST /api/brands/{brand}/tickets/{ticket_code}/mark-as-unread
curl -X POST https://app.elasticfunnels.io/api/brands/{brand_id}/tickets/TKT-12345/mark-as-unread \
-H "EF-Access-Key: your_api_key_here"
{
"message": "Ticket marked as unread"
}
List Ticket Messages
Get all messages in a ticket conversation.
The ticket code (e.g., “TKT-12345”)
GET /api/brands/{brand}/tickets/{ticket_code}/messages
curl https://app.elasticfunnels.io/api/brands/{brand_id}/tickets/TKT-12345/messages \
-H "EF-Access-Key: your_api_key_here"
{
"data": [
{
"brand_id": 123,
"ticket_code": "TKT-12345",
"status": "open",
"type": "customer_message",
"message": "<p>I have a question about my order...</p>",
"message_type": "text",
"from_name": "John Doe",
"created_at": "2024-12-10T10:30:00.000000Z",
"created_at_label": "2 hours ago",
"status_label": "Open"
},
{
"brand_id": 123,
"ticket_code": "TKT-12345",
"status": "waiting",
"type": "agent_message",
"message": "<p>Hi John, I'd be happy to help...</p>",
"message_type": "text",
"from_name": "Support Agent",
"created_at": "2024-12-10T10:45:00.000000Z",
"created_at_label": "1 hour ago",
"status_label": "Waiting"
}
]
}
Send Ticket Reply
Send a reply message to a ticket.
The ticket code (e.g., “TKT-12345”)
The reply message (HTML supported)
Message type: agent_message or system_message
POST /api/brands/{brand}/tickets/{ticket_code}/messages
curl -X POST https://app.elasticfunnels.io/api/brands/{brand_id}/tickets/TKT-12345/messages \
-H "EF-Access-Key: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"message": "<p>Thank you for contacting us. Your order is being processed...</p>",
"type": "agent_message"
}'
{
"brand_id": 123,
"ticket_code": "TKT-12345",
"status": "waiting",
"type": "agent_message",
"message": "<p>Thank you for contacting us. Your order is being processed...</p>",
"from_name": "Support Agent",
"created_at": "2024-12-10T12:00:00.000000Z"
}
Set Ticket Status
Update the status of a ticket.
The ticket code (e.g., “TKT-12345”)
New status: open, waiting, closed, resolved, spam
POST /api/brands/{brand}/tickets/{ticket_code}/set-status/{status}
curl -X POST https://app.elasticfunnels.io/api/brands/{brand_id}/tickets/TKT-12345/set-status/resolved \
-H "EF-Access-Key: your_api_key_here"
{
"message": "Email sent"
}
Ticket Status Values
| Status | Description |
|---|
open | New ticket or reopened ticket |
waiting | Waiting for customer response |
closed | Ticket has been closed |
resolved | Issue has been resolved |
spam | Marked as spam |
Message Types
| Type | Description |
|---|
customer_message | Message from customer |
agent_message | Message from support agent |
system_message | Automated system message |
Notes
- Tickets are automatically sorted by
created_at for open tickets and updated_at for closed/resolved/spam tickets
- Sending a reply automatically changes ticket status to “waiting”
- The AI reply generation uses customer order history and purchase data when available
- All ticket messages support HTML formatting