---
title: "Create Agent Draft"
method: POST
path: "/v1/convai/agents/{agent_id}/drafts"
tags: ["Agents Platform"]
---

# Create Agent Draft

`POST /v1/convai/agents/{agent_id}/drafts`

Create a new draft for an agent

## Path parameters

- `agent_id` string, required — The id of an agent. This is returned on agent creation.

## Query parameters

- `branch_id` string, required — The ID of the agent branch to use

## Headers

- `xi-api-key` string, nullable — Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.

## Request body

- BodyCreateAgentDraftV1ConvaiAgentsAgentIdDraftsPost
  - `conversation_config` object, required — Conversation config for the draft
  - `platform_settings` object, required — Platform settings for the draft
  - `workflow` AgentWorkflowRequestModel, required
    - `edges` object
    - `nodes` object
    - `prevent_subagent_loops` boolean — Whether to prevent loops in the workflow execution.
  - `name` string, required — Name for the draft
  - `tags` string[], nullable — Tags to help classify and filter the agent

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/elevenlabs/apis/elevenlabs-api-documentation.md) · [All operations](https://skmtc.net/elevenlabs/apis/elevenlabs-api-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/elevenlabs/elevenlabs-api-documentation/versions/57d56f34628a/schema)
