Skip to main content

AI Actions

AI-powered actions for ticket management — auto-tag tickets, generate reply suggestions, summarize conversations, and improve draft text.

The AI Action object

action string

AI action type "auto-tag" | "suggest-reply" | "summarize" | "improve"

result object

Action-specific result data

Endpoints

POST /api/v1/teams/{teamId}/ai

Run AI Action

Try it

Run an AI action. Available actions: auto-tag (tag a ticket), suggest-reply (generate a response), summarize (summarize a conversation), improve (refine draft text).

Request Body

action string required

Action type

ticketId string

Ticket ID (for auto-tag, suggest-reply, summarize)

text string

Text to improve (for improve action)

Code Examples

curl -X POST "https://www.cstar.help/api/v1/teams/{teamId}/ai" \
  -H "Authorization: Bearer sk_live_your_key" \
  -H "Content-Type: application/json" \
  -d '{"action":"suggest-reply","ticketId":"tkt_abc123"}'

Responses

200 AI result
{
  "success": true,
  "data": {
    "object": "ai_result",
    "action": "suggest-reply",
    "result": {
      "suggestion": "Hi Jane, I'd be happy to help with your billing issue. Let me look into that for you right away."
    }
  }
}
401 Authentication failed — missing or invalid API key
{
  "success": false,
  "error": {
    "type": "authentication_error",
    "code": "authentication_required",
    "message": "Invalid or expired API key",
    "doc_url": "https://www.cstar.help/developers/api-reference#authentication",
    "request_id": "req_abc123"
  },
  "meta": {
    "timestamp": "2025-12-10T14:30:00Z"
  }
}
403 Insufficient permissions — wrong key type or team access
{
  "success": false,
  "error": {
    "type": "authorization_error",
    "code": "insufficient_permissions",
    "message": "Secret key required for this endpoint",
    "doc_url": "https://www.cstar.help/developers/api-reference#authentication",
    "request_id": "req_abc123"
  },
  "meta": {
    "timestamp": "2025-12-10T14:30:00Z"
  }
}
429 Rate limit exceeded
{
  "success": false,
  "error": {
    "type": "rate_limit_error",
    "code": "rate_limit_exceeded",
    "message": "Rate limit exceeded. Try again in 60 seconds",
    "doc_url": "https://www.cstar.help/developers/api-reference#rate-limiting",
    "request_id": "req_abc123"
  },
  "meta": {
    "timestamp": "2025-12-10T14:30:00Z"
  }
}