---
title: "Upsert Tcn Config"
method: PUT
path: "/integrations/telephony/tcn/config"
tags: ["integrations", "telephony"]
---

# Upsert Tcn Config

`PUT /integrations/telephony/tcn/config`

## Request

- Base URL: `https://dev.whispa.net` (the document declares no server; this is the origin it was published from)
- URL: `https://dev.whispa.net/integrations/telephony/tcn/config`
- Auth: one of:
  - OAuth 2
    - Password
    - Token URL: `auth/bearer/login`
  - API key in cookie `access_token`

Create or update TCN configuration.

## Request body

- TCNIntegrationConfig: Request model for TCN integration config.
  - `provider` 'tcn'
  - `enabled` boolean
  - `config` TCNConfigInput, required: Configuration for TCN integration. TCN exposes a single org-wide server-streaming endpoint (``/api/v1alpha1/asm/asm/managerstreamagentstate``) that emits per-agent state frames. Authentication is a Personal Access Token (Bearer).
    - `voice_agent` TCNVoiceAgentConfig: Dedicated bot identity; SIP networking is configured on the worker.
      - `enabled` boolean
      - `agent_sid` string
      - `hunt_group_sid` string
      - `bots` TCNBotConfig[]
        - `name` string
        - `agent_sid` string, required
        - `api_key` string
        - `tcn_user_id` string
        - `enabled` boolean
      - `max_outbound_calls` integer
      - `caller_id` string
      - `human_queue` string
      - `default_region` string
    - `store_audio` boolean
    - `api_key` string, required: TCN Personal Access Token (JWT)
    - `base_url` string: TCN API base URL (region-specific)
    - `tcn_user_map` object: Maps TCN userId (UUID string) to Whispa user_id
    - `suspend_grace_seconds` number: How long a session stays open after the agent leaves a call without wrap-up (payment-line park), awaiting a resume of the same TCN call. 0 disables suspend/resume.

## Response `200`

Successful Response

- TCNIntegrationResponse: Response model for TCN integration config.
  - `id` string, uuid, required
  - `provider` 'tcn'
  - `enabled` boolean, required
  - `config` TCNConfigOutput, required: Configuration for TCN integration. TCN exposes a single org-wide server-streaming endpoint (``/api/v1alpha1/asm/asm/managerstreamagentstate``) that emits per-agent state frames. Authentication is a Personal Access Token (Bearer).
    - `voice_agent` TCNVoiceAgentConfig: Dedicated bot identity; SIP networking is configured on the worker.
      - `enabled` boolean
      - `agent_sid` string
      - `hunt_group_sid` string
      - `bots` TCNBotConfig[]
        - `name` string
        - `agent_sid` string, required
        - `api_key` string
        - `tcn_user_id` string
        - `enabled` boolean
      - `max_outbound_calls` integer
      - `caller_id` string
      - `human_queue` string
      - `default_region` string
    - `store_audio` boolean
    - `api_key` string, required: TCN Personal Access Token (JWT)
    - `base_url` string: TCN API base URL (region-specific)
    - `tcn_user_map` object: Maps TCN userId (UUID string) to Whispa user_id
    - `suspend_grace_seconds` number: How long a session stays open after the agent leaves a call without wrap-up (payment-line park), awaiting a resume of the same TCN call. 0 disables suspend/resume.
  - `reload_warning` string, nullable: Set when the saved config could not be applied to the live adapter. DB is updated but the running stream may still use the previous config until the backend restarts.

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/whispa/apis/whispa-api.md) - [All operations](https://skmtc.dev/whispa/apis/whispa-api/llms.txt) - [OpenAPI document](https://skmtc.dev/whispa/apis/whispa-api/revisions/12c2e4aca43c?raw)
