Skip to main content

Ticket APIs

Use the ticket APIs to create support tickets from external systems and retrieve tickets for reporting, reconciliation, or operational workflows.

Authentication

Create an access token from Settings -> Integrations in the Flowcall dashboard.

Pass the token as a Bearer token in every request:

Authorization: Bearer <your_access_token>

Create a Manual Ticket

Creates a new support ticket with customer details and the customer's query.

POST https://api.flowcall.co/apis/tickets/manual

Rate Limits

WindowLimit
Per minute5 requests
Per hour200 requests
Per day1000 requests

Request Body

FieldTypeRequiredDescription
customerobjectYesCustomer information. See Customer Object.
orderNamestringNoOrder name or order number associated with the ticket.
subjectstringNoShort summary or title for the ticket.
querystringYesCustomer question or issue description. Either subject or query must be provided.
payloadstringNoAdditional context as a JSON string, for example "{\"key\":\"value\"}".
payloadFormatstringNoIdentifier for the payload structure. Use a unique name for each distinct payload shape.
sourcestringNoTicket source. Accepted values are whatsapp, email, liveChat, instagram, voiceCall, and manual.
taskNamestringNoWorkflow task name to route the ticket to. It is looked up by name within the account.
relatedTicketNumberstringNoTicket number of a related or previous ticket.
fastResponsebooleanNoIf true, the API returns ticketId instead of requestId.
skipExecuteActionbooleanNoIf true, Flowcall skips configured execution actions for the ticket.
imagesstring[]NoImage URLs related to the ticket.

Customer Object

FieldTypeRequiredDescription
namestringNoCustomer full name.
phonestringYes*Customer phone number.
emailstringYes*Customer email address.
shopifyCustomerIdstringNoShopify customer ID, if applicable.

*Either phone or email is required.

Example Request

curl -X POST https://api.flowcall.co/apis/tickets/manual \
-H "Authorization: Bearer <your_access_token>" \
-H "Content-Type: application/json" \
-d '{
"customer": {
"name": "John Doe",
"phone": "911234567890",
"email": "john@example.com"
},
"orderName": "#1042",
"subject": "Return request - wrong size",
"query": "I want to return my order, the size does not fit.",
"payload": "{\"source\":\"ivr\",\"priority\":\"high\"}",
"payloadFormat": "ivr_return_v1",
"source": "voiceCall",
"relatedTicketNumber": "TKT-2048",
"fastResponse": true,
"skipExecuteAction": true,
"images": [
"https://cdn.example.com/images/damaged-item-1.jpg",
"https://cdn.example.com/images/damaged-item-2.jpg"
]
}'

Success Response

{
"success": true,
"customer": {
"id": "cust_abc123",
"name": "John Doe",
"phone": "+1234567890",
"email": "john@example.com"
},
"requestId": "64f7b2c1c9d2a4e7b1f3a9d0"
}

When fastResponse is true, the response includes ticketId instead of requestId:

{
"success": true,
"customer": {
"id": "cust_abc123",
"name": "John Doe",
"phone": "+1234567890",
"email": "john@example.com"
},
"ticketId": "64f7b2c1c9d2a4e7b1f3a9d0"
}

Error Responses

StatusBodyCause
400{ "error": "phone or email is required" }Missing customer.phone and customer.email.
403{ "error": "Not authorized" }Invalid or missing Bearer token.
429Rate limit errorRate limit exceeded.

List Tickets

Retrieves a paginated list of tickets with filtering, sorting, and search.

POST https://api.flowcall.co/apis/task-runs/tickets/list

Request Body

All fields are optional unless noted otherwise.

Pagination And Sorting

FieldTypeDefaultDescription
pagenumber1Page number for pagination.
limitnumber10Number of results per page. Maximum 250.
sortOrder"asc" or "desc""desc"Sort direction based on the timestamp column selected by timestampKey.
timestampKeystringcreatedAtColumn to sort and filter by date. Accepted values are createdAt, resolvedAt, executedAt, and assignedAt.

Date Filters

FieldTypeDescription
startDatestringISO 8601 date string. Filters tickets on or after this date based on timestampKey.
endDatestringISO 8601 date string. Filters tickets on or before this date based on timestampKey.
ignoreDateRangebooleanIf true, skips date range filtering. Only allowed when filtering by assigned or queued statuses.

Status And Assignment Filters

FieldTypeDescription
statusesstring[]Filter by ticket statuses, for example ["open", "assigned", "resolved"].
excludeInProgressbooleanExclude tickets with in_progress status.
agentIdstringFilter by assigned agent ID.
involvedAgentIdstringFilter tickets where this agent was involved.
agentInvolvement"only_ai" or "agents_involved"Filter by whether human agents were involved.
unassignedbooleanFilter for unassigned tickets only.
createdByUserIdstringFilter by the user who created the ticket.

Task And Team Filters

FieldTypeDescription
taskIdsstring[]Filter by specific task IDs.
noTaskIdsbooleanFilter for tickets with no associated task.
taskTeamIdsstring[]Filter by task team IDs.

Search And Lookup Filters

FieldTypeDescription
searchstringSearch ticket summary, order name, ticket name or number, customer name, email, and phone.
phoneNumberstringFilter by customer phone number. Supports comma-separated values.
orderNamestringFilter by order name. Supports comma-separated values.
ticketNumberstringFilter by exact ticket name or number. Supports comma-separated values.
sourcestringFilter by ticket source.

Classification And Other Filters

FieldTypeDescription
categorystringFilter by disposition category.
subcategorystringFilter by disposition subcategory.
sentimentsstring[]Filter by customer sentiments. Matches any value in the array.
excludeChildTicketsbooleanExclude child tickets.

Example Request

curl -X POST https://api.flowcall.co/apis/task-runs/tickets/list \
-H "Authorization: Bearer <your_access_token>" \
-H "Content-Type: application/json" \
-d '{
"page": 1,
"limit": 20,
"startDate": "2026-03-01T00:00:00.000Z",
"endDate": "2026-03-18T23:59:59.999Z",
"statuses": ["open", "assigned"],
"sortOrder": "desc"
}'

Success Response

{
"data": [
{
"id": "ticket-id",
"ticketNumber": 1234,
"status": "assigned",
"summary": "Customer inquiry about order",
"orderName": "#1001",
"source": "whatsapp",
"customerId": "customer-id",
"assignedToId": "agent-id",
"taskId": "task-id",
"createdAt": "2026-03-15T10:00:00.000Z",
"resolvedAt": null,
"csat": {
"rating": 5,
"comment": "Great support!"
}
}
],
"total": 150,
"page": 1,
"limit": 20,
"totalPages": 8
}

Error Responses

StatusMessage
400Limit cannot be greater than 250
400Invalid date range or status combination
500Internal server error