Skip to main content
POST
Create a custom field

Authorizations

Authorization
string
header
required

A CallVA API token, sent as Authorization: Bearer <token>.

Creating one. In the CallVA dashboard, open the organization's Settings, then API Keys, and choose Create API Key: give the key a name, choose its role, and choose its project scope - All projects for an organization-wide token, or one project for a project token. The key is shown once, when it is created, and cannot be read again; store it then. Creating keys needs the api_tokens.create permission, which owners and admins hold, and a key cannot create another key.

Organization-wide or project token. A project token works in the one project it was created for; any project named in the request is ignored. An organization-wide token reaches the projects of its organization, and each request names its project with the X-Project-ID header or project_id (query string for reads and deletes, body for writes).

What it can call. The token's role decides which endpoints it may call; each endpoint names the permission it requires, and a token whose role lacks it is answered 403.

Headers

X-Project-ID
string<uuid>

The project this request acts in. Required with an organization-wide token (or send project_id instead); ignored with a project token, which always acts in its own project.

Body

application/json
entity_type
string
required

The entity the field belongs to.

Example:

"call"

field_key
string
required

The key the field is read and written by: lower case letters, digits and underscores, starting with a letter or underscore.

Example:

"appointment_confirmed"

field_label
string
required

The label people see.

field_type
string
required

One of text, longtext, integer, decimal, date, datetime, select, multiselect, boolean, transcript, json.

Example:

"boolean"

is_required
boolean
is_filterable
boolean
is_sortable
boolean
is_groupable
boolean
is_visible
boolean
sort_order
integer
options
object[] | null

The choices of a select or multiselect field.

validation_rules
object | null
default_value
string | null
help_text
string | null
extraction_enabled
boolean

Whether the value is extracted from the call transcript.

extraction_prompt
string | null

What to extract, when extraction is enabled.

Response

success
boolean
required
message
string
required
Allowed value: "Custom field created successfully"
data
object
required

As just created: the attributes the request set, the key and the timestamps; a column left to its default is absent until the record is read again.