Skip to main content
POST
/
v2
/
tickets
Create Ticket
curl --request POST \
  --url https://public.api.serval.com/v2/tickets \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "teamId": "<string>",
  "name": "<string>",
  "description": "<string>",
  "createdByUserId": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "assignedToUserId": "<string>",
  "parentTicketId": "<string>",
  "channelSyncTargets": [
    {
      "email": {
        "targetUserType": "CHANNEL_SYNC_USER_TYPE_UNSPECIFIED"
      }
    }
  ],
  "aiActive": true,
  "type": "TICKET_TYPE_UNSPECIFIED",
  "workflowRelationship": {
    "workflowId": "<string>",
    "relationshipType": "WORKFLOW_RELATIONSHIP_TYPE_UNSPECIFIED",
    "initialInputData": {}
  },
  "ticketRelationships": [
    {
      "ticketId": "<string>",
      "relationshipType": "TICKET_RELATIONSHIP_TYPE_UNSPECIFIED"
    }
  ],
  "requesterUserId": "<string>",
  "dueDate": {
    "year": 123,
    "month": 123,
    "day": 123
  }
}
'
{
  "data": {
    "id": "<string>",
    "friendlyIdentifier": "<string>",
    "teamId": "<string>",
    "name": "<string>",
    "description": "<string>",
    "createdAt": "2023-11-07T05:31:56Z",
    "completedAt": "2023-11-07T05:31:56Z",
    "escalatedAt": "2023-11-07T05:31:56Z",
    "createdByUserId": "<string>",
    "assignedToUserId": "<string>",
    "requesterUserId": "<string>",
    "statusId": "<string>",
    "escalationLevel": "AI",
    "priorityId": "<string>",
    "slaStartedAt": "2023-11-07T05:31:56Z",
    "slaBreachesAt": "2023-11-07T05:31:56Z",
    "labelIds": [
      "<string>"
    ],
    "type": "TICKET_TYPE_UNSPECIFIED",
    "dueDate": {
      "year": 123,
      "month": 123,
      "day": 123
    },
    "isOverdue": true,
    "childTicketIds": [
      "<string>"
    ],
    "linkedTicketIds": [
      "<string>"
    ],
    "duplicateTicketIds": [
      "<string>"
    ],
    "dependsOnTicketIds": [
      "<string>"
    ],
    "parentTicketId": "<string>"
  }
}

Authorizations

Authorization
string
header
required

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

Body

application/json
teamId
string
name
string
description
string
createdByUserId
string
createdAt
string<date-time> | null

A timestamp in RFC 3339 format (e.g., "2017-01-15T01:30:15.01Z").

assignedToUserId
string | null
parentTicketId
string | null

Optional. The ID of the parent ticket (this is a special relationship type)

channelSyncTargets
(Email · object | Slack Dm · object)[]

Note that these are ADDITIONAL sync targets. There may be some "default" sync targets for the team (e.g. ServiceNow, JSM etc).

aiActive
boolean | null

Optional. Whether AI is active for this ticket. Defaults to false. When true, users can chat with Serval for assistance on this ticket.

type
enum<string> | null

Optional. The type of ticket to create. Defaults to REQUEST. If parent_ticket_id is set, this must be TASK (or omitted, in which case TASK is used).

Available options:
TICKET_TYPE_UNSPECIFIED,
TICKET_TYPE_REQUEST,
TICKET_TYPE_TASK,
TICKET_TYPE_INCIDENT,
TICKET_TYPE_CONVERSATION,
TICKET_TYPE_JOURNEY
workflowRelationship
workflow_relationship · object

Optional. A workflow to associate with this ticket. The workflow will show a form to collect inputs, then run when the user fills the form.

ticketRelationships
CreateTicketRelationshipInput · object[]

Optional. Relationships to create with other tickets. For example, to indicate this ticket depends on another ticket.

requesterUserId
string | null

Optional. The ID of the user this ticket is created on behalf of (the requester). Defaults to created_by_user_id if not provided. Use this when creating a ticket on behalf of someone else, e.g., when creating child tasks in a journey where the requester should be the journey's requester.

dueDate
due_date · object

Optional. Due date (date only, no time component).

Response

Success

data
data · object