---
title: "Create agent"
method: POST
path: "/v1/agents"
tags: ["Agents"]
---

# Create agent

`POST /v1/agents`

Create a new agent within a workspace. Requires workspaceId and name. Optional fields include prompt, voiceConfig, widgetConfig, and language.

## Request body

- CreateAgent
  - `workspaceId` string, uuid, required — Workspace ID to create agent in (required)
  - `name` string, required — Agent name (required)
  - `prompt` string — System prompt for the agent
  - `voiceConfig` object — Voice configuration settings (JSON)
  - `widgetConfig` object — Widget appearance settings (JSON)
  - `language` string — Agent language code

## Response `201`

Agent created successfully

- Agent
  - `id` string, uuid, required — Unique agent identifier
  - `workspaceId` string, uuid, required — Workspace ID that owns this agent
  - `name` string, required — Agent name
  - `prompt` string, nullable, required — System prompt for the agent
  - `voiceConfig` object, nullable, required — Voice configuration settings (JSON)
  - `widgetConfig` object, nullable, required — Widget appearance settings (JSON)
  - `language` string, nullable, required — Agent language code
  - `createdAt` string, date-time, required — Agent creation timestamp
  - `updatedAt` string, date-time, required — Agent last update timestamp
  - `deletedAt` string, date-time, nullable, required — Soft delete timestamp (null if active)

## Other responses

- `400` — Validation error - invalid request body
- `401` — Missing or invalid API key
- `403` — API key does not have access to this workspace

---

[API](https://skmtc.net/nedzo/apis/nedzo-api.md) · [All operations](https://skmtc.net/nedzo/apis/nedzo-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/nedzo/nedzo-api/revisions/f2607cdb56fa/schema)
