> This page is for API Reference, version v0 (default).
> For other versions, use one of these documentation indexes:
> - v0 (default): https://docs.credal.ai/api-reference/v-0/llms.txt
> - v1: https://docs.credal.ai/api-reference/v-1/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.credal.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.credal.ai/_mcp/server.

# Create Copilot

POST https://api.credal.ai/api/v0/copilots/createCopilot
Content-Type: application/json

Create a new agent. The API key used will be added to the agent for future Requests

Reference: https://docs.credal.ai/api-reference/api-reference/copilots/create-copilot

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Body (application/json)

This endpoint expects an object.

- `name` (string, required) — A descriptive name for the agent.
- `description` (string, required) — An in depth name for the agent's function. Useful for routing requests to the right agent.
- `collaborators` (list of Collaborator, required) — A list of collaborator emails and roles that will have access to the agent.

## Response

### 200

- `agentId` (UUID, required)

## Types

### Collaborator

- `email` (string, required)
- `role` (enum, required)
  - Allowed values: `viewer`, `editor`

## Examples

**Request**

```json
{
  "name": "Customer Agent",
  "description": "This agent is used to answer customer requests based on internal documentation.",
  "collaborators": [
    {
      "email": "test@gmail.com",
      "role": "editor"
    }
  ]
}
```

**Response**

```json
{
  "agentId": "ac20e6ba-0bae-11ef-b25a-efca73df4c3a"
}
```