Skip to main content
POST
/
dispositions
/
cURL
curl --request POST \
  --url https://api.bolna.ai/dispositions/ \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Call Outcome",
  "question": "What was the final outcome of this call?",
  "agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "category": "Lead Quality",
  "system_prompt": "<string>",
  "model": "gpt-4.1-mini",
  "is_subjective": true,
  "is_objective": true,
  "subjective_type": "text",
  "subjective_type_config": {
    "pattern": "^\\d{10}$",
    "description": "10-digit phone number"
  },
  "objective_options": [
    {
      "value": "interested",
      "condition": "Customer expressed genuine interest and agreed to a next step"
    },
    {
      "value": "not_interested",
      "condition": "Customer declined or was unresponsive to all proposals"
    },
    {
      "value": "follow_up",
      "condition": "Customer asked to be contacted again at a later time"
    }
  ]
}
'
import requests

url = "https://api.bolna.ai/dispositions/"

payload = {
"name": "Call Outcome",
"question": "What was the final outcome of this call?",
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"category": "Lead Quality",
"system_prompt": "<string>",
"model": "gpt-4.1-mini",
"is_subjective": True,
"is_objective": True,
"subjective_type": "text",
"subjective_type_config": {
"pattern": "^\d{10}$",
"description": "10-digit phone number"
},
"objective_options": [
{
"value": "interested",
"condition": "Customer expressed genuine interest and agreed to a next step"
},
{
"value": "not_interested",
"condition": "Customer declined or was unresponsive to all proposals"
},
{
"value": "follow_up",
"condition": "Customer asked to be contacted again at a later time"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Call Outcome',
question: 'What was the final outcome of this call?',
agent_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
category: 'Lead Quality',
system_prompt: '<string>',
model: 'gpt-4.1-mini',
is_subjective: true,
is_objective: true,
subjective_type: 'text',
subjective_type_config: {pattern: '^\d{10}$', description: '10-digit phone number'},
objective_options: [
{
value: 'interested',
condition: 'Customer expressed genuine interest and agreed to a next step'
},
{
value: 'not_interested',
condition: 'Customer declined or was unresponsive to all proposals'
},
{
value: 'follow_up',
condition: 'Customer asked to be contacted again at a later time'
}
]
})
};

fetch('https://api.bolna.ai/dispositions/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.bolna.ai/dispositions/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Call Outcome',
'question' => 'What was the final outcome of this call?',
'agent_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'category' => 'Lead Quality',
'system_prompt' => '<string>',
'model' => 'gpt-4.1-mini',
'is_subjective' => true,
'is_objective' => true,
'subjective_type' => 'text',
'subjective_type_config' => [
'pattern' => '^\\d{10}$',
'description' => '10-digit phone number'
],
'objective_options' => [
[
'value' => 'interested',
'condition' => 'Customer expressed genuine interest and agreed to a next step'
],
[
'value' => 'not_interested',
'condition' => 'Customer declined or was unresponsive to all proposals'
],
[
'value' => 'follow_up',
'condition' => 'Customer asked to be contacted again at a later time'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.bolna.ai/dispositions/"

payload := strings.NewReader("{\n \"name\": \"Call Outcome\",\n \"question\": \"What was the final outcome of this call?\",\n \"agent_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"category\": \"Lead Quality\",\n \"system_prompt\": \"<string>\",\n \"model\": \"gpt-4.1-mini\",\n \"is_subjective\": true,\n \"is_objective\": true,\n \"subjective_type\": \"text\",\n \"subjective_type_config\": {\n \"pattern\": \"^\\\\d{10}$\",\n \"description\": \"10-digit phone number\"\n },\n \"objective_options\": [\n {\n \"value\": \"interested\",\n \"condition\": \"Customer expressed genuine interest and agreed to a next step\"\n },\n {\n \"value\": \"not_interested\",\n \"condition\": \"Customer declined or was unresponsive to all proposals\"\n },\n {\n \"value\": \"follow_up\",\n \"condition\": \"Customer asked to be contacted again at a later time\"\n }\n ]\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.bolna.ai/dispositions/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Call Outcome\",\n \"question\": \"What was the final outcome of this call?\",\n \"agent_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"category\": \"Lead Quality\",\n \"system_prompt\": \"<string>\",\n \"model\": \"gpt-4.1-mini\",\n \"is_subjective\": true,\n \"is_objective\": true,\n \"subjective_type\": \"text\",\n \"subjective_type_config\": {\n \"pattern\": \"^\\\\d{10}$\",\n \"description\": \"10-digit phone number\"\n },\n \"objective_options\": [\n {\n \"value\": \"interested\",\n \"condition\": \"Customer expressed genuine interest and agreed to a next step\"\n },\n {\n \"value\": \"not_interested\",\n \"condition\": \"Customer declined or was unresponsive to all proposals\"\n },\n {\n \"value\": \"follow_up\",\n \"condition\": \"Customer asked to be contacted again at a later time\"\n }\n ]\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.bolna.ai/dispositions/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Call Outcome\",\n \"question\": \"What was the final outcome of this call?\",\n \"agent_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"category\": \"Lead Quality\",\n \"system_prompt\": \"<string>\",\n \"model\": \"gpt-4.1-mini\",\n \"is_subjective\": true,\n \"is_objective\": true,\n \"subjective_type\": \"text\",\n \"subjective_type_config\": {\n \"pattern\": \"^\\\\d{10}$\",\n \"description\": \"10-digit phone number\"\n },\n \"objective_options\": [\n {\n \"value\": \"interested\",\n \"condition\": \"Customer expressed genuine interest and agreed to a next step\"\n },\n {\n \"value\": \"not_interested\",\n \"condition\": \"Customer declined or was unresponsive to all proposals\"\n },\n {\n \"value\": \"follow_up\",\n \"condition\": \"Customer asked to be contacted again at a later time\"\n }\n ]\n}"

response = http.request(request)
puts response.read_body
{
  "message": "Disposition created successfully",
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
{
"error": 123,
"message": "<string>"
}
{
"error": 123,
"message": "<string>"
}
{
"error": 123,
"message": "<string>"
}
At least one of is_subjective or is_objective must be true. When is_objective is true, you must provide objective_options. See the ObjectiveOption schema for the full structure including nested sub_options.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Disposition to create.

Request body for creating a disposition.

agent_id is required — the disposition is linked to that agent on creation. At least one of is_subjective or is_objective must be true. When is_objective is true, objective_options is required and must be non-empty. When subjective_type is regex, subjective_type_config with a pattern is required.

name
string
required

Display name shown in results.

Example:

"Call Outcome"

question
string
required

The prompt sent to the LLM to evaluate the transcript.

Example:

"What was the final outcome of this call?"

agent_id
string<uuid>
required

The agent the disposition will be linked to on creation.

category
string
default:General

Grouping label for the disposition.

Example:

"Lead Quality"

system_prompt
string

Optional system context for the LLM.

model
string
default:gpt-4.1-mini

LLM model to use for evaluation.

Example:

"gpt-4.1-mini"

is_subjective
boolean
default:false

Enable free-text response.

Example:

true

is_objective
boolean
default:false

Enable pre-defined value selection.

Example:

true

subjective_type
enum<string>
default:text

Format constraint for free-text responses. Only allowed when is_subjective is true.

Available options:
text,
timestamp,
numeric,
boolean,
email,
regex
subjective_type_config
object | null

Required when subjective_type is regex.

objective_options
object[]

Required when is_objective is true. Must be non-empty.

Example:
[
{
"value": "interested",
"condition": "Customer expressed genuine interest and agreed to a next step"
},
{
"value": "not_interested",
"condition": "Customer declined or was unresponsive to all proposals"
},
{
"value": "follow_up",
"condition": "Customer asked to be contacted again at a later time"
}
]

Response

Disposition created successfully

Standard response for create/update/delete operations on a single disposition.

message
string
Example:

"Disposition created successfully"

id
string<uuid>
Example:

"3fa85f64-5717-4562-b3fc-2c963f66afa6"