> ## Documentation Index
> Fetch the complete documentation index at: https://docs.contraforce.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Link ticket



## OpenAPI

````yaml /api-reference/openapi.json post /api/v2/workspaces/{workspaceId}/tickets/link
openapi: 3.1.1
info:
  title: ContraForce API
  description: ContraForce platform API for security operations management.
  version: '2.0'
servers: []
security: []
tags:
  - name: Incidents
  - name: Gamebooks
  - name: Data sources
  - name: Service tickets
  - name: Investigation
  - name: Cross-workspace incidents
  - name: Cross-workspace gamebooks
  - name: Cross-workspace data sources
  - name: Webhooks
  - name: Service accounts
  - name: Users
  - name: Azure resources
paths:
  /api/v2/workspaces/{workspaceId}/tickets/link:
    post:
      tags:
        - Service tickets
      summary: Link ticket
      operationId: v2-link-ticket
      parameters:
        - name: workspaceId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LinkServiceTicketRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponseOfServiceTicketDto'
        '400':
          description: Bad request — validation or parameter binding failed.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ApiProblemDetails'
        '401':
          description: Unauthorized — missing or invalid Bearer token.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ApiProblemDetails'
        '403':
          description: Forbidden — insufficient scope or workspace access.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ApiProblemDetails'
        '404':
          description: Not found — workspace or resource is missing.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ApiProblemDetails'
        '500':
          description: Internal server error.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ApiProblemDetails'
components:
  schemas:
    LinkServiceTicketRequest:
      type: object
      properties:
        ticketId:
          type:
            - 'null'
            - string
        incident:
          $ref: '#/components/schemas/IncidentReference'
    ApiResponseOfServiceTicketDto:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/ServiceTicketDto'
        meta:
          $ref: '#/components/schemas/ResponseMeta'
      description: Standard v2 API response envelope for single-item responses.
    ApiProblemDetails:
      type: object
      properties:
        type:
          type:
            - 'null'
            - string
        title:
          type:
            - 'null'
            - string
        status:
          pattern: ^-?(?:0|[1-9]\d*)$
          type:
            - 'null'
            - integer
            - string
          format: int32
        detail:
          type:
            - 'null'
            - string
        instance:
          type:
            - 'null'
            - string
        code:
          type:
            - 'null'
            - string
        requestId:
          type:
            - 'null'
            - string
        timestamp:
          type:
            - 'null'
            - string
        target:
          type:
            - 'null'
            - string
        errors:
          type:
            - 'null'
            - object
          additionalProperties:
            type: array
            items:
              type: string
      description: "API extension of ProblemDetails that surfaces the stable error code,\r\ntrace identifier, timestamp, optional target, and optional field-keyed validation\r\nerror map alongside the RFC 7807 members."
    IncidentReference:
      type: object
      properties:
        id:
          type:
            - 'null'
            - string
        source:
          $ref: '#/components/schemas/IncidentSource'
        workspaceId:
          type:
            - 'null'
            - string
        number:
          type:
            - 'null'
            - string
    ServiceTicketDto:
      type: object
      properties:
        autotaskTicket:
          $ref: '#/components/schemas/AutotaskTicketDto'
        serviceNowTicket:
          $ref: '#/components/schemas/ServiceNowTicketDto'
        jiraTicket:
          $ref: '#/components/schemas/JiraTicketDto'
        ticketingSystemType:
          $ref: '#/components/schemas/ServiceTicketingSystemType'
        isTicketSet:
          type: boolean
    ResponseMeta:
      type: object
      properties:
        requestId:
          type:
            - 'null'
            - string
        timestamp:
          type:
            - 'null'
            - string
    IncidentSource:
      enum:
        - Sentinel
        - DefenderXDR
        - QRadar
        - Splunk
        - CrowdStrike
        - SentinelOne
    AutotaskTicketDto:
      type: object
      properties:
        id:
          pattern: ^-?(?:0|[1-9]\d*)$
          type:
            - integer
            - string
          format: int32
        companyId:
          pattern: ^-?(?:0|[1-9]\d*)$
          type:
            - integer
            - string
          format: int32
        projectId:
          pattern: ^-?(?:0|[1-9]\d*)$
          type:
            - 'null'
            - integer
            - string
          format: int32
        assignedResourceId:
          pattern: ^-?(?:0|[1-9]\d*)$
          type:
            - 'null'
            - integer
            - string
          format: int64
        assignedResourceRoleId:
          pattern: ^-?(?:0|[1-9]\d*)$
          type:
            - 'null'
            - integer
            - string
          format: int64
        billingCodeId:
          pattern: ^-?(?:0|[1-9]\d*)$
          type:
            - 'null'
            - integer
            - string
          format: int32
        categoryId:
          pattern: ^-?(?:0|[1-9]\d*)$
          type:
            - integer
            - string
          format: int32
        number:
          type:
            - 'null'
            - string
        type:
          pattern: ^-?(?:0|[1-9]\d*)$
          type:
            - integer
            - string
          format: int32
        title:
          type:
            - 'null'
            - string
        description:
          type:
            - 'null'
            - string
        priority:
          $ref: '#/components/schemas/AutotaskTicketPriority'
        status:
          pattern: ^-?(?:0|[1-9]\d*)$
          type:
            - integer
            - string
          format: int32
        queueId:
          pattern: ^-?(?:0|[1-9]\d*)$
          type:
            - integer
            - string
          format: int32
        dueDateTime:
          type: string
          format: date-time
        notes:
          type:
            - 'null'
            - array
          items:
            $ref: '#/components/schemas/AutotaskTicketNoteDto'
    ServiceNowTicketDto:
      type: object
      properties:
        id:
          type:
            - 'null'
            - string
        description:
          type:
            - 'null'
            - string
        shortDescription:
          type:
            - 'null'
            - string
        number:
          type:
            - 'null'
            - string
        state:
          $ref: '#/components/schemas/ServiceNowTicketState'
        urgency:
          $ref: '#/components/schemas/ServiceNowTicketUrgency'
        comments:
          type:
            - 'null'
            - array
          items:
            $ref: '#/components/schemas/ServiceNowTicketCommentDto'
    JiraTicketDto:
      type: object
      properties:
        id:
          type:
            - 'null'
            - string
        description:
          type:
            - 'null'
            - string
        summary:
          type:
            - 'null'
            - string
        number:
          type:
            - 'null'
            - string
        currentStatus:
          $ref: '#/components/schemas/JiraStatusDto'
        priority:
          $ref: '#/components/schemas/JiraPriorityDto'
        assignee:
          $ref: '#/components/schemas/JiraUserDto'
        project:
          $ref: '#/components/schemas/JiraServiceDeskProjectDto'
        issueType:
          $ref: '#/components/schemas/JiraIssueTypeDto'
        requestType:
          $ref: '#/components/schemas/JiraServiceDeskRequestTypeDto'
        labels:
          type:
            - 'null'
            - array
          items:
            type: string
        availablePriorities:
          type:
            - 'null'
            - array
          items:
            $ref: '#/components/schemas/JiraPriorityDto'
        availableStatuses:
          type:
            - 'null'
            - array
          items:
            $ref: '#/components/schemas/JiraStatusDto'
    ServiceTicketingSystemType:
      enum:
        - Autotask
        - ServiceNow
        - Jira
        - Zendesk
        - None
    AutotaskTicketPriority:
      enum:
        - High
        - Medium
        - Low
        - Critical
    AutotaskTicketNoteDto:
      type: object
      properties:
        id:
          pattern: ^-?(?:0|[1-9]\d*)$
          type:
            - integer
            - string
          format: int32
        description:
          type:
            - 'null'
            - string
        ticketId:
          pattern: ^-?(?:0|[1-9]\d*)$
          type:
            - integer
            - string
          format: int32
        title:
          type:
            - 'null'
            - string
    ServiceNowTicketState:
      enum:
        - New
        - InProgress
        - OnHold
        - Resolved
        - Closed
        - Canceled
    ServiceNowTicketUrgency:
      enum:
        - High
        - Medium
        - Low
    ServiceNowTicketCommentDto:
      type: object
      properties:
        sysId:
          type:
            - 'null'
            - string
        elementId:
          type:
            - 'null'
            - string
        value:
          type:
            - 'null'
            - string
        createdOn:
          type: string
          format: date-time
        createdBy:
          type:
            - 'null'
            - string
        element:
          type:
            - 'null'
            - string
    JiraStatusDto:
      type: object
      properties:
        id:
          type:
            - 'null'
            - string
        name:
          type:
            - 'null'
            - string
    JiraPriorityDto:
      type: object
      properties:
        id:
          type:
            - 'null'
            - string
        name:
          type:
            - 'null'
            - string
    JiraUserDto:
      type: object
      properties:
        accountId:
          type:
            - 'null'
            - string
        displayName:
          type:
            - 'null'
            - string
        active:
          type: boolean
    JiraServiceDeskProjectDto:
      type: object
      properties:
        id:
          type:
            - 'null'
            - string
        name:
          type:
            - 'null'
            - string
        key:
          type:
            - 'null'
            - string
    JiraIssueTypeDto:
      type: object
      properties:
        id:
          type:
            - 'null'
            - string
        name:
          type:
            - 'null'
            - string
        projectId:
          type:
            - 'null'
            - string
        subtask:
          type: boolean
    JiraServiceDeskRequestTypeDto:
      type: object
      properties:
        id:
          type:
            - 'null'
            - string
        name:
          type:
            - 'null'
            - string

````