Customer Support Intelligence API Documentation

Classify supplied tickets, explain priority and duplicate matches, and draft replies from the conversation in the request. Payment is the exact USDC price on Base with x402.

POSThttps://brainiac.software/api/v1/customer-support/ticket-classify$0.03 USDC

Classify support tickets

Classify supplied tickets into billing, access, outage, defect, delivery, or account when one documented keyword list has the most matches. A caller-supplied category list replaces that set. A tie stays unclassified.

Body

FieldRequiredNotes
ticketsNoarray; Array
messagesNoarray; Array
textNostring
csvNostring
jsonNostring
fileNoobject; Object
categoriesNoarray; Array
policiesNoarray; Array

Request exampleJSON

{
  "tickets": [
    {
      "id": "t1",
      "subject": "Cannot log in",
      "body": "I cannot log in. The password page is broken.",
      "email": "ada@analytical.example"
    },
    {
      "id": "t2",
      "subject": "Invoice 104",
      "body": "Please review invoice 104.",
      "email": "grace@navy.example"
    }
  ]
}

Response exampleJSON

{
  "checkedAt": "2026-11-03T12:00:00.000Z",
  "ticketsModified": false,
  "actionTaken": false,
  "issueResolved": false,
  "status": "classified",
  "ticketCount": 2,
  "tickets": [
    {
      "id": "t1",
      "row": 1,
      "subject": "Cannot log in",
      "category": "access",
      "status": "classified",
      "matches": [
        {
          "category": "access",
          "count": 2,
          "terms": "password, log in"
        },
        {
          "category": "defect",
          "count": 1,
          "terms": "broken"
        }
      ]
    },
    {
      "id": "t2",
      "row": 2,
      "subject": "Invoice 104",
      "category": "billing",
      "status": "classified",
      "matches": [
        {
          "category": "billing",
          "count": 1,
          "terms": "invoice"
        }
      ]
    }
  ],
  "issues": [],
  "limitations": [
    "No support system was contacted or changed.",
    "A ticket is not marked resolved, and no reply is sent.",
    "Policies, account details, and customer history are not invented.",
    "A category, priority, or escalation flag comes only from the supplied text and the documented rules.",
    "A similar ticket is a suggestion with a confidence level, not a merged case."
  ]
}

cURL

curl -i -X POST "https://brainiac.software/api/v1/customer-support/ticket-classify" \
  -H 'content-type: application/json' \
  -H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
  --data-binary @- <<'JSON'
{
  "tickets": [
    {
      "id": "t1",
      "subject": "Cannot log in",
      "body": "I cannot log in. The password page is broken.",
      "email": "ada@analytical.example"
    },
    {
      "id": "t2",
      "subject": "Invoice 104",
      "body": "Please review invoice 104.",
      "email": "grace@navy.example"
    }
  ]
}
JSON
POSThttps://brainiac.software/api/v1/customer-support/ticket-prioritize$0.04 USDC

Prioritize support tickets

Set priority from a supplied severity and from documented urgency and business-impact phrases. A ticket with none of those signals stays unspecified.

Body

FieldRequiredNotes
ticketsNoarray; Array
messagesNoarray; Array
textNostring
csvNostring
jsonNostring
fileNoobject; Object
categoriesNoarray; Array
policiesNoarray; Array

Request exampleJSON

{
  "tickets": [
    {
      "id": "t1",
      "subject": "Production down",
      "body": "Production down for payroll. This is urgent.",
      "severity": "high",
      "impact": "Payroll for the night shift"
    }
  ]
}

Response exampleJSON

{
  "checkedAt": "2026-11-03T12:00:00.000Z",
  "ticketsModified": false,
  "actionTaken": false,
  "issueResolved": false,
  "status": "prioritized",
  "ticketCount": 1,
  "tickets": [
    {
      "id": "t1",
      "row": 1,
      "subject": "Production down",
      "priority": "critical",
      "rank": 4,
      "urgency": "production down",
      "impact": "Payroll for the night shift",
      "impactSignals": "production, payroll",
      "signals": [
        {
          "source": "supplied_severity",
          "signal": "high",
          "detail": "The ticket supplies severity high."
        },
        {
          "source": "urgency_phrase",
          "signal": "production down",
          "detail": "The customer text contains a documented critical phrase."
        },
        {
          "source": "impact_phrase",
          "signal": "production, payroll",
          "detail": "The customer text contains a documented business-impact phrase."
        }
      ]
    }
  ],
  "issues": [],
  "limitations": [
    "No support system was contacted or changed.",
    "A ticket is not marked resolved, and no reply is sent.",
    "Policies, account details, and customer history are not invented.",
    "A category, priority, or escalation flag comes only from the supplied text and the documented rules.",
    "A similar ticket is a suggestion with a confidence level, not a merged case."
  ]
}

cURL

curl -i -X POST "https://brainiac.software/api/v1/customer-support/ticket-prioritize" \
  -H 'content-type: application/json' \
  -H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
  --data-binary @- <<'JSON'
{
  "tickets": [
    {
      "id": "t1",
      "subject": "Production down",
      "body": "Production down for payroll. This is urgent.",
      "severity": "high",
      "impact": "Payroll for the night shift"
    }
  ]
}
JSON
POSThttps://brainiac.software/api/v1/customer-support/ticket-deduplicate$0.05 USDC

Detect duplicate tickets

Find duplicate tickets for the same email address and repeated wording across customers. Each pair names the rule and a confidence level. Tickets are not merged.

Body

FieldRequiredNotes
ticketsNoarray; Array
messagesNoarray; Array
textNostring
csvNostring
jsonNostring
fileNoobject; Object
categoriesNoarray; Array
policiesNoarray; Array

Request exampleJSON

{
  "tickets": [
    {
      "id": "t1",
      "email": "ada@analytical.example",
      "subject": "Cannot log in",
      "body": "The password page returns an error for my account."
    },
    {
      "id": "t2",
      "email": "ada@analytical.example",
      "subject": "Cannot log in",
      "body": "The password page returns an error for my account."
    },
    {
      "id": "t3",
      "email": "grace@navy.example",
      "subject": "Invoice 88",
      "body": "Please review invoice 88."
    }
  ]
}

Response exampleJSON

{
  "checkedAt": "2026-11-03T12:00:00.000Z",
  "ticketsModified": false,
  "actionTaken": false,
  "issueResolved": false,
  "status": "checked",
  "ticketCount": 3,
  "pairs": [
    {
      "leftId": "t1",
      "leftRow": 1,
      "rightId": "t2",
      "rightRow": 2,
      "rule": "duplicate_text",
      "confidence": 0.99,
      "level": "confirmed",
      "detail": "The subject and customer text match, and both tickets use the same email address."
    }
  ],
  "issues": [],
  "limitations": [
    "No support system was contacted or changed.",
    "A ticket is not marked resolved, and no reply is sent.",
    "Policies, account details, and customer history are not invented.",
    "A category, priority, or escalation flag comes only from the supplied text and the documented rules.",
    "A similar ticket is a suggestion with a confidence level, not a merged case."
  ]
}

cURL

curl -i -X POST "https://brainiac.software/api/v1/customer-support/ticket-deduplicate" \
  -H 'content-type: application/json' \
  -H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
  --data-binary @- <<'JSON'
{
  "tickets": [
    {
      "id": "t1",
      "email": "ada@analytical.example",
      "subject": "Cannot log in",
      "body": "The password page returns an error for my account."
    },
    {
      "id": "t2",
      "email": "ada@analytical.example",
      "subject": "Cannot log in",
      "body": "The password page returns an error for my account."
    },
    {
      "id": "t3",
      "email": "grace@navy.example",
      "subject": "Invoice 88",
      "body": "Please review invoice 88."
    }
  ]
}
JSON
POSThttps://brainiac.software/api/v1/customer-support/conversation-summarize$0.04 USDC

Summarize a support conversation

Restate up to three customer sentences and quote supplied agent replies. The summary does not decide that a ticket was resolved.

Body

FieldRequiredNotes
ticketsNoarray; Array
messagesNoarray; Array
textNostring
csvNostring
jsonNostring
fileNoobject; Object
categoriesNoarray; Array
policiesNoarray; Array

Request exampleJSON

{
  "text": "Ticket: t1\nSubject: Cannot log in\nCustomer: I cannot log in. The password page is broken.\nAgent: I have resolved this.\n"
}

Response exampleJSON

{
  "checkedAt": "2026-11-03T12:00:00.000Z",
  "ticketsModified": false,
  "actionTaken": false,
  "issueResolved": false,
  "status": "summarized",
  "ticketCount": 1,
  "summaries": [
    {
      "id": "t1",
      "row": 1,
      "subject": "Cannot log in",
      "summary": "I cannot log in. The password page is broken.",
      "excerpts": [
        {
          "role": "customer",
          "text": "I cannot log in.",
          "truncated": false
        },
        {
          "role": "customer",
          "text": "The password page is broken.",
          "truncated": false
        },
        {
          "role": "agent",
          "text": "I have resolved this.",
          "truncated": false
        }
      ]
    }
  ],
  "issues": [],
  "limitations": [
    "No support system was contacted or changed.",
    "A ticket is not marked resolved, and no reply is sent.",
    "Policies, account details, and customer history are not invented.",
    "A category, priority, or escalation flag comes only from the supplied text and the documented rules.",
    "A similar ticket is a suggestion with a confidence level, not a merged case."
  ]
}

cURL

curl -i -X POST "https://brainiac.software/api/v1/customer-support/conversation-summarize" \
  -H 'content-type: application/json' \
  -H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
  --data-binary @- <<'JSON'
{
  "text": "Ticket: t1\nSubject: Cannot log in\nCustomer: I cannot log in. The password page is broken.\nAgent: I have resolved this.\n"
}
JSON
POSThttps://brainiac.software/api/v1/customer-support/sentiment-analyze$0.03 USDC

Analyze ticket sentiment

Label customer wording with a documented positive and negative word list. Text with no listed words stays unspecified.

Body

FieldRequiredNotes
ticketsNoarray; Array
messagesNoarray; Array
textNostring
csvNostring
jsonNostring
fileNoobject; Object
categoriesNoarray; Array
policiesNoarray; Array

Request exampleJSON

{
  "tickets": [
    {
      "id": "t1",
      "body": "I am frustrated and disappointed."
    },
    {
      "id": "t2",
      "body": "Thanks, that was helpful."
    }
  ]
}

Response exampleJSON

{
  "checkedAt": "2026-11-03T12:00:00.000Z",
  "ticketsModified": false,
  "actionTaken": false,
  "issueResolved": false,
  "status": "checked",
  "ticketCount": 2,
  "tickets": [
    {
      "id": "t1",
      "row": 1,
      "subject": "",
      "label": "negative",
      "negative": "disappointed, frustrated",
      "positive": ""
    },
    {
      "id": "t2",
      "row": 2,
      "subject": "",
      "label": "positive",
      "negative": "",
      "positive": "helpful, thanks"
    }
  ],
  "issues": [],
  "limitations": [
    "No support system was contacted or changed.",
    "A ticket is not marked resolved, and no reply is sent.",
    "Policies, account details, and customer history are not invented.",
    "A category, priority, or escalation flag comes only from the supplied text and the documented rules.",
    "A similar ticket is a suggestion with a confidence level, not a merged case."
  ]
}

cURL

curl -i -X POST "https://brainiac.software/api/v1/customer-support/sentiment-analyze" \
  -H 'content-type: application/json' \
  -H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
  --data-binary @- <<'JSON'
{
  "tickets": [
    {
      "id": "t1",
      "body": "I am frustrated and disappointed."
    },
    {
      "id": "t2",
      "body": "Thanks, that was helpful."
    }
  ]
}
JSON
POSThttps://brainiac.software/api/v1/customer-support/resolution-suggest$0.05 USDC

Draft a support reply

Draft a reply that quotes the customer and a supplied policy only when that policy shares a word with the ticket. The draft does not resolve the ticket or state an unsupplied policy.

Body

FieldRequiredNotes
ticketsNoarray; Array
messagesNoarray; Array
textNostring
csvNostring
jsonNostring
fileNoobject; Object
categoriesNoarray; Array
policiesNoarray; Array

Request exampleJSON

{
  "tickets": [
    {
      "id": "t1",
      "customer": "Ada Lovelace",
      "subject": "Invoice 104",
      "body": "Please review invoice 104.",
      "orderId": "104"
    }
  ],
  "policies": [
    {
      "id": "p1",
      "text": "Invoice questions are reviewed on the next business day."
    }
  ]
}

Response exampleJSON

{
  "checkedAt": "2026-11-03T12:00:00.000Z",
  "ticketsModified": false,
  "actionTaken": false,
  "issueResolved": false,
  "status": "drafted",
  "ticketCount": 1,
  "drafts": [
    {
      "id": "t1",
      "row": 1,
      "category": "billing",
      "policyId": "p1",
      "text": "Hello Ada Lovelace. You wrote: \"Please review invoice 104.\" The message matched billing because it contains: invoice. The supplied order reference is 104. The supplied policy p1 says: \"Invoice questions are reviewed on the next business day.\" This draft does not resolve the ticket or record an action."
    }
  ],
  "issues": [],
  "limitations": [
    "No support system was contacted or changed.",
    "A ticket is not marked resolved, and no reply is sent.",
    "Policies, account details, and customer history are not invented.",
    "A category, priority, or escalation flag comes only from the supplied text and the documented rules.",
    "A similar ticket is a suggestion with a confidence level, not a merged case."
  ]
}

cURL

curl -i -X POST "https://brainiac.software/api/v1/customer-support/resolution-suggest" \
  -H 'content-type: application/json' \
  -H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
  --data-binary @- <<'JSON'
{
  "tickets": [
    {
      "id": "t1",
      "customer": "Ada Lovelace",
      "subject": "Invoice 104",
      "body": "Please review invoice 104.",
      "orderId": "104"
    }
  ],
  "policies": [
    {
      "id": "p1",
      "text": "Invoice questions are reviewed on the next business day."
    }
  ]
}
JSON
POSThttps://brainiac.software/api/v1/customer-support/escalation-detect$0.04 USDC

Detect escalation signals

Flag a ticket when the text contains a documented escalation phrase, the priority rules mark it critical, or the same email appears on three tickets in the request. No escalation is performed.

Body

FieldRequiredNotes
ticketsNoarray; Array
messagesNoarray; Array
textNostring
csvNostring
jsonNostring
fileNoobject; Object
categoriesNoarray; Array
policiesNoarray; Array

Request exampleJSON

{
  "tickets": [
    {
      "id": "t1",
      "body": "I will speak with my lawyer about this charge."
    },
    {
      "id": "t2",
      "body": "How do I update my profile name?"
    }
  ]
}

Response exampleJSON

{
  "checkedAt": "2026-11-03T12:00:00.000Z",
  "ticketsModified": false,
  "actionTaken": false,
  "issueResolved": false,
  "status": "checked",
  "ticketCount": 2,
  "escalated": false,
  "tickets": [
    {
      "id": "t1",
      "row": 1,
      "potential": true,
      "rule": "escalation_phrase",
      "detail": "The customer text contains: lawyer."
    },
    {
      "id": "t2",
      "row": 2,
      "potential": false,
      "rule": "",
      "detail": "No escalation signal was found in the supplied text."
    }
  ],
  "issues": [],
  "limitations": [
    "No support system was contacted or changed.",
    "A ticket is not marked resolved, and no reply is sent.",
    "Policies, account details, and customer history are not invented.",
    "A category, priority, or escalation flag comes only from the supplied text and the documented rules.",
    "A similar ticket is a suggestion with a confidence level, not a merged case."
  ]
}

cURL

curl -i -X POST "https://brainiac.software/api/v1/customer-support/escalation-detect" \
  -H 'content-type: application/json' \
  -H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
  --data-binary @- <<'JSON'
{
  "tickets": [
    {
      "id": "t1",
      "body": "I will speak with my lawyer about this charge."
    },
    {
      "id": "t2",
      "body": "How do I update my profile name?"
    }
  ]
}
JSON
POSThttps://brainiac.software/api/v1/customer-support/quality-audit$0.12 USDC

Audit support reply quality

Check supplied replies for a resolution claim, a missing reply, or an email, amount, order, or policy that was not in the ticket. The audit does not confirm that any action happened.

Body

FieldRequiredNotes
ticketsNoarray; Array
messagesNoarray; Array
textNostring
csvNostring
jsonNostring
fileNoobject; Object
categoriesNoarray; Array
policiesNoarray; Array

Request exampleJSON

{
  "tickets": [
    {
      "id": "t1",
      "body": "I cannot log in.",
      "reply": "I have resolved this and refunded $50."
    },
    {
      "id": "t2",
      "body": "Where is invoice 104?"
    }
  ]
}

Response exampleJSON

{
  "checkedAt": "2026-11-03T12:00:00.000Z",
  "ticketsModified": false,
  "actionTaken": false,
  "issueResolved": false,
  "status": "checked",
  "ticketCount": 2,
  "findingCount": 3,
  "findings": [
    {
      "kind": "claim",
      "code": "resolution_claim",
      "ticketId": "t1",
      "field": "reply",
      "detail": "The reply contains \"resolved, refunded\". The claim was not verified, and this audit does not record a resolution."
    },
    {
      "kind": "claim",
      "code": "unsupported_detail",
      "ticketId": "t1",
      "field": "amount",
      "detail": "The reply includes $50, which is not in the supplied ticket or policies."
    },
    {
      "kind": "missing",
      "code": "missing_reply",
      "ticketId": "t2",
      "field": "reply",
      "detail": "No agent reply was supplied. None was written."
    }
  ],
  "issues": [],
  "limitations": [
    "No support system was contacted or changed.",
    "A ticket is not marked resolved, and no reply is sent.",
    "Policies, account details, and customer history are not invented.",
    "A category, priority, or escalation flag comes only from the supplied text and the documented rules.",
    "A similar ticket is a suggestion with a confidence level, not a merged case."
  ]
}

cURL

curl -i -X POST "https://brainiac.software/api/v1/customer-support/quality-audit" \
  -H 'content-type: application/json' \
  -H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
  --data-binary @- <<'JSON'
{
  "tickets": [
    {
      "id": "t1",
      "body": "I cannot log in.",
      "reply": "I have resolved this and refunded $50."
    },
    {
      "id": "t2",
      "body": "Where is invoice 104?"
    }
  ]
}
JSON