Underlying REST API that the support CLI wraps. Base URL defaults to
https://support.virtuals.io; override via ACP_BASE. Auth is
Authorization: Bearer acp_live_....
Consult this file when you need to call the API directly (for example, from code that can't shell out to the CLI).
- All request bodies are JSON (
Content-Type: application/json). - Mutations accept
Idempotency-Key: <unique>as a header andversionin the body. - Keys are scoped to
(token, METHOD path)for 24 hours — reusing a key across different endpoints returns422. - Error responses have shape
{ "error": "<message>" }. Some also includecurrentVersionon 409 version mismatches. - A
404may mean "does not exist" or "exists but on another team" — identical response either way.
Returns the admin and token bound to the bearer. CLI: support me.
{
"admin": { "id": 7, "username": "alice", "email": "...", "agentTag": "Axelrod", "teamId": 3, "role": "admin" },
"token": { "id": 42, "name": "prod-integration", "createdAt": "...", "lastUsedAt": "..." }
}Query: status, jobId (both optional). CLI: support ticket list.
{ "count": 2, "tickets": [ { "id": "FB123", "status": "pending", "version": 1, "...": "..." } ] }Full ticket. CLI: support ticket get.
Returns the user-facing comment thread. CLI: support ticket comments.
Returns the audit log; each entry includes tokenId and sourceIp. CLI: support ticket audit.
CLI: support ticket status <id> <new_status> [--message] [--tx-hash].
| Field | Type | Req | Notes |
|---|---|---|---|
status |
string | yes | One of pending, in-progress, resolved, refunded, rejected |
message |
string | no | User-visible; appended to adminNotes. Max 5000 chars. |
transactionHash |
string | no | For refunds. Max 255 chars. |
version |
number | no | Optimistic concurrency. |
Same-status returns { success: true, ticket, noChange: true }. Terminal status
transitions return 409. Emails the user when ticket.contactMethod === 'email'.
CLI: support ticket comment <id> <body> [--email].
| Field | Type | Req | Notes |
|---|---|---|---|
body |
string | yes | Plain text. Max 5000 chars. |
sendEmail |
boolean | no | True to also email the user. |
Response includes emailSent: boolean reflecting what actually happened — an email
with sendEmail: true but no contactMethod=email/username persists the comment
but returns emailSent: false.
Email-on-terminal returns 409.
CLI: support ticket notes <id> <text>.
| Field | Type | Req | Notes |
|---|---|---|---|
notes |
string | yes | Max 5000 chars. Pass "" to clear. |
version |
number | no | Optimistic concurrency. |
Never emailed. Replaces the field — read first if appending.
CLI: support ticket assign <id> --reason <r> [--team <t>] [--admin <u>].
| Field | Type | Req | Notes |
|---|---|---|---|
toTeam |
string | one-of | Destination team name |
toAdminUsername |
string | one-of | Must belong to toTeam (or be on ALL) |
reason |
string | yes | Required. Max 500 chars. Appended to notes. |
version |
number | no | Optimistic concurrency. |
Rate-limited to 10/hour per token. After reassignment the ticket is invisible to this token.
| Limit | Default | Env override |
|---|---|---|
| All requests / minute | 30 | AGENT_API_RATE_LIMIT_PER_MINUTE |
| User-facing emails / minute | 5 | AGENT_API_EMAIL_LIMIT_PER_MINUTE |
| Reassigns / hour | 10 | AGENT_API_REASSIGN_LIMIT_PER_HOUR |
status_change, comment_added, comment_added_email, notes_update, assigned,
assigned_to_admin.