---
title: "Create Ticket External Messages"
method: POST
path: "/v2/tickets/{ticket_id}/external-messages"
tags: ["Ticket API"]
---

# Create Ticket External Messages

`POST /v2/tickets/{ticket_id}/external-messages`

Register Serval messages as already present in an external channel. This records external message links so the egresser will not re-send those messages to the external system. Use this after posting a summary of prior conversation to an external ticket to prevent the individual historical messages from being replayed. Pass a single message to register one, or many to register in bulk.

## Path parameters

- `ticket_id` string, required — The Serval ticket the messages belong to.

## Request body

- object
  - `channelTarget` union — Unified channel target that works across all syncing scenarios. This is used by SyncTicketToChannel and ConnectTicketToExternalTicket endpoints.
    - object
      - `email` SvhelpPubapimodelsEmailChannelTarget, required — For Email channels - uses team email config (no integration needed)
        - `targetUserType` 'CHANNEL_SYNC_USER_TYPE_UNSPECIFIED' | 'CHANNEL_SYNC_TARGET_USER_TICKET_ASSIGNEE' | 'CHANNEL_SYNC_TARGET_USER_TICKET_REQUESTOR'
    - object
      - `slackChannel` SvhelpPubapimodelsSlackChannelTarget, required — 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).
        - `integrationId` string — Integration ID that identifies the Slack app instance
        - `channelId` string — The Slack channel ID (e.g., "C1234567890" for public, "G1234567890" for private)
    - object
      - `slackDm` SvhelpPubapimodelsSlackDMChannelTarget, required — For Slack DM channels - need to specify which user to sync to
        - `integrationId` string — Integration ID that identifies the Slack app instance
        - `targetUserType` 'CHANNEL_SYNC_USER_TYPE_UNSPECIFIED' | 'CHANNEL_SYNC_TARGET_USER_TICKET_ASSIGNEE' | 'CHANNEL_SYNC_TARGET_USER_TICKET_REQUESTOR'
    - object
      - `ticketSource` SvhelpPubapimodelsTicketSourceChannelTarget, required — For ticket source channels (Jira, ServiceNow, Linear, Zendesk, Freshservice, etc.)
        - `ticketSourceId` string — The ticket source ID from svflow - identifies which external system Deprecated: Use integration_id instead
        - `integrationId` string — The integration ID - identifies which external system/integration to sync to
  - `messages` SvhelpPublicapiExternalMessageRegistration[] — The messages to register as already present in the external channel. Provide one for a single registration or many for a bulk registration.
    - `messageId` string — The Serval message ID to register. Must belong to the target ticket.
    - `externalMessageId` string, nullable — Optional. The corresponding message ID in the external system, if known. When omitted, a synthetic identifier is generated so the message is still recorded as accounted-for (and therefore skipped by the egresser).
    - `externalMessageData` GoogleProtobufStruct — `Struct` represents a structured data value, consisting of fields which map to dynamically typed values. In some languages, `Struct` might be supported by a native representation. For example, in scripting languages like JS a struct is represented as an object. The details of that representation are described together with the proto support for the language. The JSON representation for `Struct` is JSON object.

## Response `200`

Success

- SvhelpPublicapiCreateTicketExternalMessagesResponse
  - `data` SvhelpPubapimodelsExternalMessage[] — The external message links that were created or updated.
    - `id` string — The ID of the external message in Serval's system
    - `externalMessageId` string — The ID of the external message in the external system
    - `messageId` string — The ID of the Serval message this external message is linked to
    - `sourceType` 'EXTERNAL_MESSAGE_SOURCE_TYPE_UNSPECIFIED' | 'EXTERNAL_MESSAGE_SOURCE_TYPE_SLACK' | 'EXTERNAL_MESSAGE_SOURCE_TYPE_LINEAR' | 'EXTERNAL_MESSAGE_SOURCE_TYPE_EMAIL' | 'EXTERNAL_MESSAGE_SOURCE_TYPE_JIRA' | 'EXTERNAL_MESSAGE_SOURCE_TYPE_PUBLIC_API' | 'EXTERNAL_MESSAGE_SOURCE_TYPE_FRESHSERVICE' | 'EXTERNAL_MESSAGE_SOURCE_TYPE_ZENDESK' | 'EXTERNAL_MESSAGE_SOURCE_TYPE_SERVICENOW' | 'EXTERNAL_MESSAGE_SOURCE_TYPE_PHONE_CALL' | 'EXTERNAL_MESSAGE_SOURCE_TYPE_MICROSOFT' — External message source types
    - `sourceId` string — The ID of the source/integration in Serval
    - `isOrigin` boolean — Whether this external message is the origin source of the Serval message True if the Serval message was created from this external message
    - `createdAt` string, date-time — A timestamp in RFC 3339 format (e.g., "2025-01-15T01:30:15Z").
    - `updatedAt` string, date-time — A timestamp in RFC 3339 format (e.g., "2025-01-15T01:30:15Z").
    - `toRecipientEmails` string[] — Email-specific fields (only populated when source_type is EMAIL) The To recipient email addresses
    - `ccRecipientEmails` string[] — The CC recipient email addresses

## Other responses

- `default` — Error

---

[API](https://skmtc.net/serval/apis/serval-public-api.md) · [All operations](https://skmtc.net/serval/apis/serval-public-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/serval/serval-public-api/versions/0549515e9384/schema)
