Skip to main content
POST
/
api
/
cs-qa
/
v1
/
analyze
curl -X POST https://api.example.com/api/cs-qa/v1/analyze \
  -H "Authorization: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "tickets": [
      {
        "ticket_id": "123",
        "subject": "Need help",
        "description": "Having issues with login",
        "status": "open",
        "priority": "high"
      }
    ]
  }'
{
  "batch_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "total_tickets": 123,
  "processed_tickets": 123,
  "failed_tickets": 123,
  "status": "pending",
  "results": [
    {
      "ticket_id": "<string>",
      "agent_id": "<string>",
      "parameter_name": "<string>",
      "value": "<string>",
      "reason": "<string>"
    }
  ],
  "errors": {}
}

Process Flow

  1. Validates the API key and gets account_id
  2. Generates a batch_id
  3. Creates a batch record in database
  4. Queues the processing task
  5. Returns the batch_id for tracking
curl -X POST https://api.example.com/api/cs-qa/v1/analyze \
  -H "Authorization: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "tickets": [
      {
        "ticket_id": "123",
        "subject": "Need help",
        "description": "Having issues with login",
        "status": "open",
        "priority": "high"
      }
    ]
  }'

Body

application/json
tickets
TicketData · object[]
required
schema_id
integer | null

Response

Successful Response

batch_id
string<uuid>
required
total_tickets
integer
required
processed_tickets
integer
required
failed_tickets
integer
required
status
string
default:pending
results
QAResult · object[] | null
errors
object | null
I