Skip to main content

POST /dispositions/

Creates a new disposition. If agent_id is provided, the disposition is automatically linked to that agent upon creation.

Request Body

FieldTypeRequiredDescription
namestringYesDisplay name shown in results
questionstringYesThe prompt sent to the LLM to evaluate the transcript
categorystringNoGrouping label for the disposition (default: "General")
agent_idstringNoIf provided, links the disposition to this agent on creation
system_promptstringNoOptional system context for the LLM
modelstringNoLLM model to use for evaluation (default: "gpt-4.1-mini")
is_subjectiveboolNoEnable free-text response (default: false)
is_objectiveboolNoEnable pre-defined value selection (default: false)
objective_optionsarrayConditionalRequired when is_objective is true. Must be non-empty.
At least one of is_subjective or is_objective must be true. When is_objective is true, you must provide objective_options.
See ObjectiveOption Schema for the full structure including nested sub_options.

Response

201 Created
{
  "message": "Disposition created successfully",
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}

Examples

curl --request POST \
  --url 'https://api.bolna.dev/dispositions/' \
  --header 'Authorization: Bearer {api_key}' \
  --header 'Content-Type: application/json' \
  --data '{
    "agent_id": "{agent_id}",
    "name": "Call Outcome",
    "question": "What was the final outcome of this call?",
    "category": "Lead Quality",
    "is_subjective": true,
    "is_objective": true,
    "model": "gpt-4.1-mini",
    "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"
      }
    ]
  }'

Error Responses

StatusDescription
403Access denied for the given agent_id
422Validation error — e.g., is_objective is true but objective_options is missing or empty
500Internal server error