POST
/
v1
/
teams
/
{team_id}
/
tickets
Create Ticket
curl --request POST \
  --url https://public.api.serval.com/v1/teams/{team_id}/tickets \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "<string>",
  "description": "<string>",
  "createdByUserId": "<string>",
  "createdAt": "1s",
  "assignedToUserId": "<string>"
}'
{
  "ticket": {
    "id": "<string>",
    "friendlyIdentifier": "<string>",
    "forTeam": {
      "id": "<string>",
      "name": "<string>"
    },
    "name": "<string>",
    "description": "<string>",
    "createdAt": "1s",
    "completedAt": "1s",
    "escalatedAt": "1s",
    "createdByUser": {
      "id": "<string>",
      "email": "<string>"
    },
    "assignedToUser": {
      "id": "<string>",
      "email": "<string>"
    },
    "requesterUser": {
      "id": "<string>",
      "email": "<string>"
    },
    "status": {
      "id": "<string>",
      "teamId": "<string>",
      "statusGroup": "TICKET_STATUS_GROUP_UNSPECIFIED",
      "name": "<string>",
      "description": "<string>",
      "isDefault": true
    },
    "escalationLevel": "AI",
    "priority": {
      "id": "<string>",
      "teamId": "<string>",
      "priority": "TICKET_PRIORITY_UNSPECIFIED",
      "description": "<string>"
    },
    "slaStartedAt": "1s",
    "slaBreachesAt": "1s",
    "labels": [
      {
        "id": "<string>",
        "teamId": "<string>",
        "name": "<string>",
        "description": "<string>"
      }
    ]
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

team_id
string
required

The ID of the team that the ticket should be created in.

Body

application/json
name
string

A name or title for the ticket.

description
string

A description of the ticket.

createdByUserId
string

The ID of the Serval user who created the ticket.

createdAt
string<date-time>

Timestamp indicating when the ticket was created. Must be in RFC 3339 format (e.g., "2017-01-15T01:30:15.01Z"). Accepts UTC timestamps with nanosecond precision. If not provided, defaults to the current server time.

Examples:

"1s"

"1.000340012s"

assignedToUserId
string | null

The ID of the Serval user who is assigned to the ticket.

Response

Success

ticket
object

The created ticket.