---
title: "Replicate agent by given ID."
method: POST
path: "/api/v1/projects/{projectId}/replicate"
tags: ["Agents"]
---

# Replicate agent by given ID.

`POST /api/v1/projects/{projectId}/replicate`

Replicate an agent (formerly known as project) by copying the agent info, settings, sitemap sources and uploaded files. This endpoint enables you to initiate the replication of an agent by supplying the necessary ID. The system will process the replicated data and generate a new agent based on the information of existing agent.

## Path parameters

- `projectId` integer, required

## Response `201`

Agent has been created

- object
  - `status` 'error' | 'success' — The status of the response
  - `data` Project
    - `id` integer — Agent ID
    - `project_name` string — Agent name
    - `sitemap_path` string — Agent sitemap
    - `is_chat_active` boolean — Whether the agent is active or not
    - `user_id` integer — User ID of the agent owner
    - `team_id` integer — Team ID of the agent owner
    - `created_at` string, date-time — Date and time when the agent was created
    - `updated_at` string, date-time — Date and time when the agent was last updated
    - `deleted_at` string, date-time, nullable — Date and time when the agent was deleted
    - `type` 'SITEMAP' | 'URL' — Agent type
    - `is_shared` boolean — Is the agent public or not
    - `shareable_slug` string, md5, nullable — Shareable slug that can be used to share the agent
    - `shareable_link` string, url, nullable — Shareable link that can be used to share the agent
    - `embed_code` string, html, nullable — Embed code that can be used to embed the agent
    - `live_chat_code` string, html, nullable — Live chat code that can be used to embed the live chat
    - `are_licenses_allowed` boolean — Whether licenses are allowed or not
    - `subdomain_slug` string, md5, nullable — Subdomain slug that can be used to share the agent

## Other responses

- `400` — Agent creation failed
- `401` — API Token is either missing or invalid
- `500` — Internal Server Error

---

[API](https://skmtc.net/poll-the-people/apis/customgpt-ai.md) · [All operations](https://skmtc.net/poll-the-people/apis/customgpt-ai/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/poll-the-people/customgpt-ai/revisions/b80e6dfcf78d/schema)
