> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nedzo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Create an extraction field

> Add a detail for an agent to pull out of each conversation.

> [!NOTE]
>
> This endpoint is for the VIP plan only. Other plans get a `403`. See [Plan access](https://docs.nedzo.ai/api-reference/introduction.md#plan-access).

After each conversation, the agent fills in its extraction fields. They show in the conversation log and in the post-conversation webhook, and each one saves its value to a custom field on the contact. First name, last name, email, phone and company are filled in on their own, so they need no field.

Returns `201`.

## Path Parameters

**agentId** `string` *required*

Agent UUID

## Body

**targetCustomVariableId** `string` *required*

The custom field in the workspace to save the value to. Get ids from the contact custom fields endpoint.

**description** `string`

What to pull out, in plain words. The agent reads this.

The field's `name` and `type` come from the custom field, the same as in the dashboard. `targetContactField` is always `null` on new fields.

```bash cURL theme={null}
curl -X POST "https://api.nedzo.ai/v1/agents/123e4567-e89b-12d3-a456-426614174000/extraction-fields" \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "targetCustomVariableId": "0e1f2a3b-4c5d-4e6f-8a9b-0c1d2e3f4a5b",
      "description": "The budget the caller gives, in dollars"
    }'
```

```json 201 theme={null}
{
  "id": "2c4e6f80-1a3b-4c5d-8e9f-0a1b2c3d4e5f",
  "agentId": "123e4567-e89b-12d3-a456-426614174000",
  "name": "budget",
  "type": "number",
  "description": "The budget the caller gives, in dollars",
  "targetContactField": null,
  "targetCustomVariableId": "0e1f2a3b-4c5d-4e6f-8a9b-0c1d2e3f4a5b",
  "createdAt": "2026-10-11T10:00:00Z",
  "updatedAt": "2026-10-11T10:00:00Z"
}
```

## Errors

| Status | When |
| - | - |
| `400` | A field is wrong, no custom field was chosen, a contact field was chosen, or the custom field is not in the agent's workspace. |
| `404` | The agent is not in your API key's scope. |
| `409` | The agent already has a field with this name. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.