---
title: "Duplicate an agent configuration and training sources as a draft"
method: POST
path: "/workspaces/{workspaceId}/agents/{agentId}/duplicate"
tags: ["Agents"]
---

# Duplicate an agent configuration and training sources as a draft

`POST /workspaces/{workspaceId}/agents/{agentId}/duplicate`

## Request

- Base URL: `https://app.communicate.so/api/v1`
- URL: `https://app.communicate.so/api/v1/workspaces/{workspaceId}/agents/{agentId}/duplicate`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `__Secure-better-auth.session_token`
  - API key in cookie `better-auth.session_token`

Use an explicitly scoped user-bound account bearer credential or an application session. Scope grants are intersected with live membership, role, tenant isolation, agent access and plan limits; a credential does not grant an owner role. Invitation acceptance requires the verified recipient email.

## Path parameters

- `workspaceId` string, required
- `agentId` string, required

## Response `201`

Duplicate an agent configuration and training sources as a draft

- DuplicateAgentResponse
  - `id` string, required
  - `workspaceId` string, required
  - `name` string, required
  - `systemPrompt` string, nullable, required
  - `status` 'active' | 'inactive' | 'draft', required
  - `inTransfer` boolean, required
  - `model` string, required
  - `temperature` number, required
  - `rateLimitPerMinute` integer, required
  - `allowedDomains` string[], required
  - `widgetConfig` object, required
    - `accentColor` string
    - `displayName` string
    - `greeting` string
    - `suggestedPrompts` string[]
    - `promptGroups` object[]
      - `title` string, required
      - `prompts` string[], required
    - `labels` object
      - `locale` 'en' | 'es' | 'fr' | 'de' | 'pt'
      - `composerPlaceholder` string
      - `sendButton` string
      - `openButton` string
      - `poweredBy` string
    - `messagePlaceholder` string
    - `privacyPolicyUrl` string, uri: A URL with HTTP or HTTPS protocol.
    - `dictationEnabled` boolean
    - `showPoweredBy` boolean
    - `bubblePosition` 'right' | 'left'
    - `socialLinks` object[]
      - `label` string, required
      - `url` string, uri, required: A URL with HTTP or HTTPS protocol.
    - `showSupportEmail` boolean
    - `chatPageTheme` 'light' | 'dark' | 'both'
    - `widgetEnabled` boolean
    - `preChatForm` object
      - `enabled` boolean, required
      - `fields` object[], required
        - `id` string, required
        - `label` string, required
        - `type` 'email' | 'text' | 'select', required
        - `required` boolean, required
        - `options` string[]
        - `showWhen` object
          - `fieldId` string, required
          - `equals` string, required
    - `offlineForm` object
      - `enabled` boolean, required
  - `notifyConfig` object, required
    - `email` string, email
    - `onNewConversation` boolean
  - `voiceConfig` object, required
    - `enabled` boolean, required
    - `voiceId` string
    - `language` string, required
    - `consentCopy` string, required
    - `maxDurationSeconds` integer, required
  - `learningConfig` object, required
    - `captureEnabled` boolean
  - `escalationTeamId` string, nullable, required
  - `supportEmail` string, nullable, required
  - `website` string, nullable, required
  - `logoUrl` string, nullable, required
  - `chatPageEnabled` boolean, required
  - `chatPageBlockedAt` string, date-time, nullable, required
  - `indexable` boolean, required
  - `emailFromName` string, nullable, required
  - `deletionScheduledAt` string, date-time, nullable, required
  - `deletionRequestedBy` string, nullable, required
  - `createdAt` string, date-time, required
  - `updatedAt` string, date-time, required

## Other responses

- `401`: Missing, invalid, expired or revoked account credential or application session.
- `402`: Plan entitlement, capacity or credits do not allow this operation.
- `403`: Required account scope, live verified identity, membership or role permission is missing.
- `404`: Workspace or addressed resource is not visible to this member.
- `409`: Support handle, source URL or pending transfer conflicts with this operation.
- `422`: Website URL or extraction source is not supported.
- `429`: Agent request or website crawl rate limit exceeded.
- `500`: Unexpected server failure.
- `503`: Authorization service temporarily unavailable.

---

[API](https://skmtc.dev/communicate/apis/communicate-public-rest-api-2.md) · [All operations](https://skmtc.dev/communicate/apis/communicate-public-rest-api-2/llms.txt) · [OpenAPI document](https://skmtc.dev/communicate/apis/communicate-public-rest-api-2/revisions/db6be3d36733?raw)
