Create an incident
- Permission required
incidents:write/incidents:agent
When to use it
Opens an incident. With a personal key it is created as you (needs incidents.handle; assigning needs incidents.assign), like in the panel. With an agent key it is created as the organization's agent (needs incidents.create): the conversation or phone is required, the conversation's open one is reused, at most 10 per conversation and hour, and it returns spoken_reference and customer_message to read to the customer.
Input
| Field | Type | Description |
|---|---|---|
organization_id | integer | Only to narrow: must be your organization (Autonex staff may pick another) |
titleRequired | string | What happened, in one line |
description | string | Detail |
priority | "urgent" | "high" | "medium" | "low" | |
conversation_id | integer | Conversation to link (the customer's) |
pause_agent | boolean | true = the conversation goes to a person while the incident is open |
category_id | integer | People: category id (incident_options) |
location_id | integer | People: centre |
department_id | integer | People: department |
assignee_user_id | integer | People: who owns it (needs incidents.assign) |
due_at | string | People: due date, YYYY-MM-DD or ISO date-time |
contact_id | integer | People: contact |
force_new | boolean | People: create even if the conversation already has an open one |
contact_phone | string | Agents: customer phone (E.164) when there is no conversation |
contact_name | string | Agents: customer name |
livekit_room | string | Agents: LiveKit room of the call (instead of conversation_id) |
category | string | Agents: category name, if clear |
language | "es" | "ca" | "en" | Agents: customer language for customer_message |
Every tool also accepts lang (es | en) for the language of the text answer.
Output
| Field | Type | Description |
|---|---|---|
incident_idRequired | number | |
identifierRequired | string | null | |
titleRequired | string | |
statusRequired | string | |
reusedRequired | boolean | Agents: the conversation already had an open one, which was reused |
spoken_referenceRequired | string | null | Agents: reference to say aloud |
customer_messageRequired | string | null | Agents: sentence ready to tell the customer |
incidentRequired | object | null | People: the created incident |
Examples
Example 1: A person opens an urgent incident
Call
{
"name": "create_incident",
"arguments": {
"title": "La máquina de la sala 2 no funciona",
"priority": "urgent",
"location_id": 5
}
}Example 2: The voice agent opens an incident during a call
Call
{
"name": "create_incident",
"arguments": {
"title": "Quiere cambiar la cita del jueves",
"livekit_room": "room-abc123",
"contact_phone": "+34600111222",
"category": "Citas",
"language": "es"
}
}Response
{
"incident_id": 812,
"identifier": "HEM-142",
"title": "Quiere cambiar la cita del jueves",
"status": "pending",
"reused": false,
"spoken_reference": "la incidencia ciento cuarenta y dos",
"customer_message": "He abierto la incidencia 142. El equipo la revisará y te contestará lo antes posible.",
"incident": null
}Equivalent JSON-RPC call (POST /mcp)
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "create_incident",
"arguments": {
"title": "La máquina de la sala 2 no funciona",
"priority": "urgent",
"location_id": 5
}
}
}