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

# Sync Ticket to Channel

> Sync an existing Serval ticket to a channel by creating an external ticket in that channel and establishing ongoing bidirectional sync. Supports ticket sources (Jira, Linear, ServiceNow, etc.) and direct messaging channels (Slack DM, Email).



## OpenAPI

````yaml /sections/api-reference/openapi-spec-v2.yaml post /v2/tickets/{ticket_id}/sync
openapi: 3.1.0
info:
  title: Serval Public API
  description: Serval Public API
  contact:
    name: Serval
    url: https://serval.com
    email: support@serval.com
  license:
    name: Serval License
    url: https://serval.com/license
  version: 2.0.0
servers:
  - url: https://public.api.serval.com
security:
  - BearerAuth: []
tags:
  - name: Access Policy API
  - name: Access Policy Approval Procedure API
  - name: Access Profile API
  - name: Access Relationship API
  - name: Access Request API
  - name: Agent API
  - name: App Instance API
  - name: App Resource API
  - name: App Resource Role API
  - name: Approval Delegation API
  - name: Approval Request API
  - name: Audit Log API
  - name: Change Blackout API
  - name: Change Model API
  - name: Custom Field API
  - name: Custom Service API
  - name: Entity API
  - name: Entity Field Mapping API
  - name: Entity Ingestion Config API
  - name: Entity Type API
  - name: Folder API
  - name: Group API
  - name: Guidance API
  - name: Help Agent API
  - name: Journey API
  - name: Knowledge API
  - name: Knowledge Base API
  - name: Report API
  - name: SLA API
  - name: Schedule API
  - name: Tag API
  - name: Team API
  - name: Team User API
  - name: Ticket API
  - name: Topic API
  - name: User API
  - name: User Relationship API
  - name: Workflow API
  - name: Workflow Approval Procedure API
  - name: Workflow Run API
paths:
  /v2/tickets/{ticket_id}/sync:
    post:
      tags:
        - Ticket API
      summary: Sync Ticket to Channel
      description: >-
        Sync an existing Serval ticket to a channel by creating an external
        ticket in that channel and establishing ongoing bidirectional sync.
        Supports ticket sources (Jira, Linear, ServiceNow, etc.) and direct
        messaging channels (Slack DM, Email).
      operationId: svrelay.publicv2.PublicAPIServiceV2.SyncTicketToChannel
      parameters:
        - name: ticket_id
          in: path
          required: true
          schema:
            type: string
            title: ticket_id
            description: The Serval ticket ID to sync
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                channelTarget:
                  $ref: '#/components/schemas/svhelp.pubapimodels.ChannelTarget'
                  title: channel_target
                  description: >-
                    The channel to sync to (creates external ticket and
                    establishes ongoing sync)
              title: SyncTicketToChannelRequest
              additionalProperties: false
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/svhelp.publicapi.SyncTicketToChannelResponse
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/connect.error'
      security:
        - BearerAuth: []
components:
  schemas:
    svhelp.pubapimodels.ChannelTarget:
      type: object
      oneOf:
        - $ref: '#/components/schemas/svhelp.pubapimodels.ChannelTarget.Email'
        - $ref: '#/components/schemas/svhelp.pubapimodels.ChannelTarget.SlackChannel'
        - $ref: '#/components/schemas/svhelp.pubapimodels.ChannelTarget.SlackDm'
        - $ref: '#/components/schemas/svhelp.pubapimodels.ChannelTarget.TicketSource'
      title: ChannelTarget
      description: |-
        Unified channel target that works across all syncing scenarios.
         This is used by SyncTicketToChannel and ConnectTicketToExternalTicket endpoints.
    svhelp.publicapi.SyncTicketToChannelResponse:
      type: object
      title: SyncTicketToChannelResponse
      additionalProperties: false
    connect.error:
      type: object
      properties:
        code:
          type: string
          examples:
            - not_found
          enum:
            - canceled
            - unknown
            - invalid_argument
            - deadline_exceeded
            - not_found
            - already_exists
            - permission_denied
            - resource_exhausted
            - failed_precondition
            - aborted
            - out_of_range
            - unimplemented
            - internal
            - unavailable
            - data_loss
            - unauthenticated
          description: >-
            The status code, which should be an enum value of
            [google.rpc.Code][google.rpc.Code].
          x-stainless-terraform-configurability: optional
        message:
          type: string
          description: >-
            A developer-facing error message, which should be in English. Any
            user-facing error message should be localized and sent in the
            [google.rpc.Status.details][google.rpc.Status.details] field, or
            localized by the client.
          x-stainless-terraform-configurability: optional
        detail:
          $ref: '#/components/schemas/google.protobuf.Any'
          x-stainless-terraform-configurability: optional
      title: Connect Error
      additionalProperties: true
      description: >-
        Error type returned by Connect:
        https://connectrpc.com/docs/go/errors/#http-representation
    svhelp.pubapimodels.ChannelTarget.Email:
      type: object
      title: Email
      properties:
        email:
          $ref: '#/components/schemas/svhelp.pubapimodels.EmailChannelTarget'
          title: email
          x-stainless-terraform-configurability: optional
      required:
        - email
      additionalProperties: false
    svhelp.pubapimodels.ChannelTarget.SlackChannel:
      type: object
      title: Slack Channel
      properties:
        slackChannel:
          $ref: '#/components/schemas/svhelp.pubapimodels.SlackChannelTarget'
          title: slack_channel
          x-stainless-terraform-configurability: optional
      required:
        - slackChannel
      additionalProperties: false
    svhelp.pubapimodels.ChannelTarget.SlackDm:
      type: object
      title: Slack Dm
      properties:
        slackDm:
          $ref: '#/components/schemas/svhelp.pubapimodels.SlackDMChannelTarget'
          title: slack_dm
          x-stainless-terraform-configurability: optional
      required:
        - slackDm
      additionalProperties: false
    svhelp.pubapimodels.ChannelTarget.TicketSource:
      type: object
      title: Ticket Source
      properties:
        ticketSource:
          $ref: '#/components/schemas/svhelp.pubapimodels.TicketSourceChannelTarget'
          title: ticket_source
          x-stainless-terraform-configurability: optional
      required:
        - ticketSource
      additionalProperties: false
    google.protobuf.Any:
      type: object
      properties:
        type:
          type: string
          x-stainless-terraform-configurability: optional
        value:
          type: string
          format: binary
          x-stainless-terraform-configurability: optional
        debug:
          type: object
          additionalProperties: true
          x-stainless-terraform-configurability: optional
      additionalProperties: true
      description: >-
        Contains an arbitrary serialized message along with a @type that
        describes the type of the serialized message.
    svhelp.pubapimodels.EmailChannelTarget:
      type: object
      properties:
        targetUserType:
          $ref: '#/components/schemas/svhelp.pubapimodels.ChannelSyncTargetUserType'
          title: target_user_type
          description: Which user to send the email to
          x-stainless-terraform-configurability: optional
      title: EmailChannelTarget
      additionalProperties: false
      description: For Email channels - uses team email config (no integration needed)
    svhelp.pubapimodels.SlackChannelTarget:
      type: object
      properties:
        integrationId:
          type: string
          title: integration_id
          description: Integration ID that identifies the Slack app instance
          x-stainless-terraform-configurability: optional
        channelId:
          type: string
          title: channel_id
          description: >-
            The Slack channel ID (e.g., "C1234567890" for public, "G1234567890"
            for private)
          x-stainless-terraform-configurability: optional
      title: SlackChannelTarget
      additionalProperties: false
      description: >-
        For Slack channels (public or private) - link a ticket to a thread in a
        Slack channel.
         The channel must already be connected to Serval (i.e., Serval bot is in the channel
         and the channel is configured with a non-disabled mode).
    svhelp.pubapimodels.SlackDMChannelTarget:
      type: object
      properties:
        integrationId:
          type: string
          title: integration_id
          description: Integration ID that identifies the Slack app instance
          x-stainless-terraform-configurability: optional
        targetUserType:
          $ref: '#/components/schemas/svhelp.pubapimodels.ChannelSyncTargetUserType'
          title: target_user_type
          description: Which user to send the DM to
          x-stainless-terraform-configurability: optional
      title: SlackDMChannelTarget
      additionalProperties: false
      description: For Slack DM channels - need to specify which user to sync to
    svhelp.pubapimodels.TicketSourceChannelTarget:
      type: object
      properties:
        ticketSourceId:
          type: string
          title: ticket_source_id
          description: |-
            The ticket source ID from svflow - identifies which external system
             Deprecated: Use integration_id instead
          x-stainless-terraform-configurability: optional
        integrationId:
          type: string
          title: integration_id
          description: >-
            The integration ID - identifies which external system/integration to
            sync to
          x-stainless-terraform-configurability: optional
      title: TicketSourceChannelTarget
      additionalProperties: false
      description: >-
        For ticket source channels (Jira, ServiceNow, Linear, Zendesk,
        Freshservice, etc.)
    svhelp.pubapimodels.ChannelSyncTargetUserType:
      type: string
      title: ChannelSyncTargetUserType
      enum:
        - CHANNEL_SYNC_USER_TYPE_UNSPECIFIED
        - CHANNEL_SYNC_TARGET_USER_TICKET_ASSIGNEE
        - CHANNEL_SYNC_TARGET_USER_TICKET_REQUESTOR
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````