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

---

[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)
