Skip to main content
POST
/
api
/
tickets
Create Ticket
curl --request POST \
  --url https://api.example.com/api/tickets \
  --header 'Content-Type: application/json' \
  --data '
{
  "Titulo": "<string>",
  "Descripcion": "<string>",
  "UsuarioId": "<string>",
  "AreaId": 123,
  "PrioridadId": 123,
  "EstadoId": 123
}
'
{
  "IdTicket": "<string>",
  "Codigo": "<string>",
  "Titulo": "<string>",
  "Descripcion": "<string>",
  "UsuarioId": "<string>",
  "AreaId": 123,
  "PrioridadId": 123,
  "EstadoId": 123,
  "FechaCreacion": "<string>",
  "FechaActualizacion": "<string>"
}

Authentication

This endpoint requires JWT authentication. Include the bearer token in the Authorization header.
Authentication is currently commented out in the controller but should be enabled in production.

Request Body

Titulo
string
required
The title of the ticket
Descripcion
string
required
Detailed description of the ticket
UsuarioId
string
required
UUID of the user creating the ticket
AreaId
integer
required
ID of the area/department this ticket belongs to
PrioridadId
integer
required
Priority level ID for the ticket
EstadoId
integer
required
Initial status ID for the ticket

Response

IdTicket
string
Unique identifier (GUID) for the created ticket
Codigo
string
Tracking code for the ticket
Titulo
string
Title of the ticket
Descripcion
string
Description of the ticket
UsuarioId
string
UUID of the user who created the ticket
AreaId
integer
Area/department ID
PrioridadId
integer
Priority level ID
EstadoId
integer
Current status ID
FechaCreacion
string
Timestamp when the ticket was created (ISO 8601 format)
FechaActualizacion
string
Timestamp when the ticket was last updated (ISO 8601 format)

Example Request

curl -X POST https://api.example.com/api/tickets \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "Titulo": "Cannot access dashboard",
    "Descripcion": "I am unable to log into the dashboard. The page returns a 500 error.",
    "UsuarioId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "AreaId": 1,
    "PrioridadId": 2,
    "EstadoId": 1
  }'

Example Response

200 - Success
{
  "IdTicket": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
  "Codigo": "TKT-2024-001234",
  "Titulo": "Cannot access dashboard",
  "Descripcion": "I am unable to log into the dashboard. The page returns a 500 error.",
  "UsuarioId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "AreaId": 1,
  "PrioridadId": 2,
  "EstadoId": 1,
  "FechaCreacion": "2024-03-15T10:30:00Z",
  "FechaActualizacion": "2024-03-15T10:30:00Z"
}
400 - Bad Request
{
  "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
  "title": "One or more validation errors occurred.",
  "status": 400,
  "errors": {
    "Titulo": [
      "The Titulo field is required."
    ]
  }
}

Build docs developers (and LLMs) love