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": {},
    "allowAssigneeRetry": true,
    "pollingIntervalMs": "<unknown>",
    "timeoutMs": "<unknown>"
  },
  "ticketRelationships": [
    {
      "ticketId": "<string>",
      "relationshipType": "TICKET_RELATIONSHIP_TYPE_UNSPECIFIED"
    }
  ],
  "requesterUserId": "<string>",
  "dueDate": {
    "year": 123,
    "month": 123,
    "day": 123
  },
  "waitUntil": "2023-11-07T05:31:56Z",
  "nameTranslations": {},
  "descriptionTranslations": {}
}
'
{
  "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>",
    "conversationThreadTicketIds": [
      "<string>"
    ],
    "conversationThreadParentTicketId": "<string>",
    "nameTranslations": {},
    "descriptionTranslations": {}
  }
}

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., "2025-01-15T01:30:15Z").

assignedToUserId
string | null
parentTicketId
string | null

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

channelSyncTargets
(Email · object | Microsoft Teams Dm · 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, Serval's AI will respond to messages on this ticket. When false, AI will not respond even if the ticket is at the AI escalation level.

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,
TICKET_TYPE_JOURNEY_CONVERSATION
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).

waitUntil
string<date-time> | null

Optional. Timestamp until which this ticket is waiting. Workflow calls on this ticket will not run until this time has passed.

nameTranslations
name_translations · object

Per-language translations. Key = BCP 47 language code, value = translated string.

descriptionTranslations
description_translations · object

Response

Success

data
data · object