Step in
The AI runs each chat on its own, but you can take part at any point.
Send a message
curl https://api.refundhunter.io/api/tasks/$TASK_ID/message \
-H "Authorization: Bearer $CHATTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "content": "I also have the receipt if that helps." }'The message goes to the retailer's rep as the customer. In the transcript it is marked isHumanOverride: true.
Pause and resume the AI
POST /api/tasks/{id}/pause stops the AI from replying. The chat stays open, and you can keep sending messages yourself. POST /api/tasks/{id}/resume hands it back.
Answer a help request
Sometimes the AI stops and asks. The task then has an activeIntervention:
{
"activeIntervention": {
"type": "verification_failed",
"reason": "The rep says the phone number does not match the order.",
"problematicFields": ["customerPhone"],
"currentValues": { "customerPhone": "555-010-2030" }
}
}type is one of verification_failed, info_needed, stuck, decision_needed.
Answer with POST /api/tasks/{id}/intervention and one of three actions:
Correct the details
{ "action": "update_fields", "updatedFields": { "customerPhone": "555-010-9999" } }Tell it to keep going as is
{ "action": "ignore_and_push" }Give it an instruction
{ "action": "custom_directive", "directive": "Ask for a supervisor and mention the case number from last week." }If the task is not waiting for help, you get 409 with code no_pending_intervention. A chat that waits too long for an answer is closed to save credits, so answer promptly or have your agent watch for activeIntervention.
Cancel, restart, follow up
| Action | Endpoint | What it does |
|---|---|---|
| Cancel | POST /api/tasks/{id}/cancel | Ends a running, queued or scheduled chat |
| Restart | POST /api/tasks/{id}/restart | Runs the same chat again as a new task |
| Follow up | POST /api/tasks/{id}/followup | Starts a new chat that knows what happened in this one. Add a note to steer it |
| Delete | DELETE /api/tasks/{id} | Removes the chat and its transcript for good |
Restart and follow-up return a new taskId, accept scheduledAt, and should be sent with an Idempotency-Key.