Skip to main content

List Tickets

Retrieve all support tickets for a project.
brand
string
required
The brand/project ID
page
number
Page number for pagination (default: 1)
per_page
number
Number of results per page (default: 30)
status
string
Filter by status: open, closed, waiting, resolved, spam
searchQuery
string
Search tickets by subject, email, or content
sort
string
Sort order: date_asc or date_desc
Request
GET /api/brands/{brand}/tickets
cURL
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.
brand
string
required
The brand/project ID
Request
GET /api/brands/{brand}/tickets/statuses
cURL
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.
brand
string
required
The brand/project ID
ticket_code
string
required
The ticket code (e.g., “TKT-12345”)
Request
POST /api/brands/{brand}/tickets/{ticket_code}/mark-as-read
cURL
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.
brand
string
required
The brand/project ID
ticket_code
string
required
The ticket code (e.g., “TKT-12345”)
Request
POST /api/brands/{brand}/tickets/{ticket_code}/mark-as-unread
cURL
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.
brand
string
required
The brand/project ID
ticket_code
string
required
The ticket code (e.g., “TKT-12345”)
Request
GET /api/brands/{brand}/tickets/{ticket_code}/messages
cURL
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.
brand
string
required
The brand/project ID
ticket_code
string
required
The ticket code (e.g., “TKT-12345”)
message
string
required
The reply message (HTML supported)
type
string
required
Message type: agent_message or system_message
Request
POST /api/brands/{brand}/tickets/{ticket_code}/messages
cURL
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.
brand
string
required
The brand/project ID
ticket_code
string
required
The ticket code (e.g., “TKT-12345”)
status
string
required
New status: open, waiting, closed, resolved, spam
Request
POST /api/brands/{brand}/tickets/{ticket_code}/set-status/{status}
cURL
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

StatusDescription
openNew ticket or reopened ticket
waitingWaiting for customer response
closedTicket has been closed
resolvedIssue has been resolved
spamMarked as spam

Message Types

TypeDescription
customer_messageMessage from customer
agent_messageMessage from support agent
system_messageAutomated 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