Skip to main content
POST
Create Extraction Field

Authorizations

Authorization
string
header
required

Use Tuner API key (tr_api_...) or user session token. Find your API key in Workspace Settings > API Keys.

Path Parameters

agent_id
integer
required

Tuner's internal numeric ID for the agent.

workspace_id
integer
required

Workspace ID. Find this in Workspace > General Settings.

Body

application/json

Input schema for data extraction field.

label
string
required

Display name for this field, and the key it appears under on call records.

Required string length: 1 - 200
field_type
enum<string>
required

Type of the extracted value: text, number, boolean, or enum. Use enum to restrict the value to a fixed set.

Available options:
text,
number,
boolean,
enum
prompt_definition
string
required

Instruction the AI uses to find this value in the transcript. Name what to look for and the form it takes.

Minimum string length: 1
enum_options

Allowed values, required when field_type is enum. Must be omitted otherwise — providing it with any other field_type returns a 422. Accepts an array or a comma-separated string.

Response

Successful Response

Response schema for data extraction field.

id
integer
required

Unique identifier for the data extraction field.

Example:

42

label
string
required

Display name for this field, and the key it appears under on call records.

Example:

"Customer name"

field_type
enum<string>
required

Type of the extracted value: text, number, boolean, or enum. Use enum to restrict the value to a fixed set.

Available options:
text,
number,
boolean,
enum
Example:

"text"

prompt_definition
string
required

Instruction the AI uses to find this value in the transcript. Name what to look for and the form it takes.

Example:

"The full name the caller provides when asked to identify themselves."

enum_options
string | null

Allowed values, present when field_type is enum and null otherwise, returned as a comma-separated string.

Example:

"Sales,Support,Billing"

is_system
boolean
default:false

Whether this field was added automatically as a system default. System fields cannot be modified or deleted.

Example:

false