---
title: "Create a new agent."
method: POST
path: "/api/v1/projects"
tags: ["Agents"]
---

# Create a new agent.

`POST /api/v1/projects`

Create a new agent by importing data either from a sitemap or an uploaded file. This endpoint enables you to initiate the creation of a new agent by supplying the necessary agent data that will be used as the context. You can choose to import the agent knowledge and content from a sitemap url or upload a specific file format that contains the context can be any text, audio or video format. The system will process the provided data and generate a new agent based on the imported or uploaded information.
Here is an example to create an agent using a sitemap: [API](https://github.com/Poll-The-People/customgpt-cookbook/blob/main/examples/Create_Bot_By_Sitemap.ipynb) [SDK](https://github.com/Poll-The-People/customgpt-cookbook/blob/main/examples/SDK_Create_Bot_By_Sitemap.ipynb).

## 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

## Changes

- **2026-07-17** `b80e6dfcf78d` — 2 warning, 9 info
  - added the new `Agent name can't be empty` enum value to the `data/message` response property for the response status `400`
  - added the new `You have reached your agent limit` enum value to the `data/message` response property for the response status `400`
  - api tag `Agents` added
  - api tag `Projects` removed
  - …7 more
- **2023-07-12** `1675fc6aa16a` — 1 warning, 14 info
  - removed the optional property `data/project` from the response with the `201` status
  - added the optional property `data/created_at` to the response with the `201` status
  - added the optional property `data/deleted_at` to the response with the `201` status
  - added the optional property `data/embed_code` to the response with the `201` status
  - …11 more
- **2023-06-15** `754bec1d3aae` — 1 breaking, 1 info
  - removed the media type `application/json` from the request body
  - added the media type `multipart/form-data` to the request body
- **2023-06-02** `1842d7fd0430` — 1 breaking, 19 warning, 6 info
  - removed the media type `multipart/form-data` from the request body
  - removed the optional property `data/are_licenses_allowed` from the response with the `201` status
  - removed the optional property `data/created_at` from the response with the `201` status
  - removed the optional property `data/deleted_at` from the response with the `201` status
  - …22 more

[Change history](https://skmtc.dev/poll-the-people/apis/customgpt-ai/changes/api/v1/projects/post.md)

---

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