For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
WebsiteStatusSupportDashboard
DocumentationAPI ReferenceMCPSDKsCLI (new)What's New?
DocumentationAPI ReferenceMCPSDKsCLI (new)What's New?
  • Assistants
    • GETList Assistants
    • POSTCreate Assistant
    • GETGet Assistant
    • DELDelete Assistant
    • PATCHUpdate Assistant
  • Squads
    • GETList Squads
    • POSTCreate Squad
    • GETGet Squad
    • DELDelete Squad
    • PATCHUpdate Squad
  • Calls
    • GETList Calls
    • POSTCreate Call
    • GETGet Call
    • DELDelete Call
    • PATCHUpdate Call
  • Chats
    • GETList Chats
    • POSTCreate Chat
    • GETGet Chat
    • DELDelete Chat
    • POSTCreate Chat (OpenAI Compatible)
  • Campaigns
    • GETList Campaigns
    • POSTCreate Campaign
    • GETGet Campaign
    • DELDelete Campaign
    • PATCHUpdate Campaign
  • Sessions
    • GETList Sessions
    • POSTCreate Session
    • GETGet Session
    • DELDelete Session
    • PATCHUpdate Session
  • Phone Numbers
    • GETList Phone Numbers
    • POSTCreate Phone Number
    • GETList Phone Numbers
    • GETGet Phone Number
    • DELDelete Phone Number
    • PATCHUpdate Phone Number
  • Tools
    • GETList Tools
    • POSTCreate Tool
    • GETGet Tool
    • DELDelete Tool
    • PATCHUpdate Tool
  • Files
    • GETList Files
    • POSTUpload File
    • GETGet File
    • DELDelete File
    • PATCHUpdate File
  • Structured Outputs
    • GETList Structured Outputs
    • POSTCreate Structured Output
    • GETGet Structured Output
    • DELDelete Structured Output
    • PATCHUpdate Structured Output
    • POSTRun Structured Output
  • Insight
    • GETGet Insights
    • POSTCreate Insight
    • GETGet Insight
    • DELDelete Insight
    • PATCHUpdate Insight
    • POSTRun Insight
    • POSTPreview Insight
  • Eval
    • GETList Evals
    • POSTCreate Eval
    • GETGet Eval
    • DELDelete Eval
    • PATCHUpdate Eval
    • GETGet Eval Run
    • DELDelete Eval Run
    • GETList Eval Runs
    • POSTCreate Eval Run
  • Observability Scorecard
    • GETGet Scorecard
    • DELDelete Scorecard
    • PATCHUpdate Scorecard
    • GETList Scorecards
    • POSTCreate Scorecard
  • Provider Resources
    • GETList Provider Resources
    • POSTCreate Provider Resource
    • GETGet Provider Resource
    • DELDelete Provider Resource
    • PATCHUpdate Provider Resource
  • Analytics
    • POSTCreate Analytics Queries
  • Webhooks
    • POSTServer Message
    • POSTClient Message
    • Swagger
    • OpenAPI
LogoLogo
WebsiteStatusSupportDashboard
Structured Outputs

Get Structured Output

GET
https://api.vapi.ai/structured-output/:id
GET
/structured-output/:id
$curl https://api.vapi.ai/structured-output/id \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json"
200Retrieved
1{
2 "id": "a3f47b9e-8c2d-4f1a-9b7e-2d5f3c6a7b8d",
3 "orgId": "org-9f8e7d6c5b4a3",
4 "createdAt": "2024-01-15T09:30:00Z",
5 "updatedAt": "2024-01-15T09:30:00Z",
6 "name": "Customer Feedback Extraction",
7 "schema": {
8 "type": "object",
9 "properties": {
10 "customerName": {
11 "type": "string",
12 "description": "Name of the customer providing feedback."
13 },
14 "feedbackDate": {
15 "type": "string",
16 "description": "Date and time when the feedback was given.",
17 "format": "date-time"
18 },
19 "rating": {
20 "type": "integer",
21 "description": "Customer rating from 1 to 5."
22 },
23 "comments": {
24 "type": "string",
25 "description": "Additional comments provided by the customer."
26 },
27 "topics": {
28 "type": "array",
29 "items": {
30 "type": "string"
31 },
32 "description": "List of key topics mentioned in the feedback."
33 }
34 },
35 "description": "Schema defining the structure of extracted customer feedback data.",
36 "required": [
37 "customerName",
38 "feedbackDate",
39 "rating"
40 ],
41 "title": "CustomerFeedbackSchema"
42 },
43 "type": "ai",
44 "regex": "\\d{3}-\\d{2}-\\d{4}",
45 "model": {
46 "provider": "openai",
47 "model": "gpt-5.4",
48 "temperature": 1.1,
49 "maxTokens": 5030
50 },
51 "compliancePlan": {
52 "forceStoreOnHipaaEnabled": false
53 },
54 "description": "Extracts customer feedback details including sentiment and key topics from conversation transcripts.",
55 "assistantIds": [
56 "assistant-12345"
57 ],
58 "workflowIds": [
59 "workflow-67890"
60 ]
61}
Was this page helpful?
Previous

Delete Structured Output

Next
Built with

Authentication

AuthorizationBearer

Retrieve your API Key from Dashboard.

Path parameters

idstringRequired

Response

idstring
This is the unique identifier for the structured output.
orgIdstring
This is the unique identifier for the org that this structured output belongs to.
createdAtdatetime

This is the ISO 8601 date-time string of when the structured output was created.

updatedAtdatetime

This is the ISO 8601 date-time string of when the structured output was last updated.

namestring1-40 characters
This is the name of the structured output.
schemaobject

This is the JSON Schema definition for the structured output.

Defines the structure and validation rules for the data that will be extracted. Supports all JSON Schema features including:

  • Objects and nested properties
  • Arrays and array validation
  • String, number, boolean, and null types
  • Enums and const values
  • Validation constraints (min/max, patterns, etc.)
  • Composition with allOf, anyOf, oneOf
typeenum

This is the type of structured output.

  • ‘ai’: Uses an LLM to extract structured data from the conversation (default).
  • ‘regex’: Uses a regex pattern to extract data from the transcript without an LLM.
Allowed values:
regexstring1-1000 characters

This is the regex pattern to match against the transcript.

Only used when type is ‘regex’. Supports both raw patterns (e.g. ‘\d+’) and regex literal format (e.g. ’/\d+/gi’). Uses RE2 syntax for safety.

The result depends on the schema type:

  • boolean: true if the pattern matches, false otherwise
  • string: the first match or first capture group
  • number/integer: the first match parsed as a number
  • array: all matches
modelobject

This is the model that will be used to extract the structured output.

To provide your own custom system and user prompts for structured output extraction, populate the messages array with your system and user messages. You can specify liquid templating in your system and user messages. Between the system or user messages, you must reference either ‘transcript’ or ‘messages’ with the {{}} syntax to access the conversation history. Between the system or user messages, you must reference a variation of the structured output with the {{}} syntax to access the structured output definition. i.e.: {{structuredOutput}} {{structuredOutput.name}} {{structuredOutput.description}} {{structuredOutput.schema}}

If model is not specified, GPT-4.1 will be used by default for extraction, utilizing default system and user prompts. If messages or required fields are not specified, the default system and user prompts will be used.

compliancePlanobject
Compliance configuration for this output. Only enable overrides if no sensitive data will be stored.
descriptionstring
This is the description of what the structured output extracts. Use this to provide context about what data will be extracted and how it will be used.
assistantIdslist of strings
These are the assistant IDs that this structured output is linked to. When linked to assistants, this structured output will be available for extraction during those assistant's calls.
workflowIdslist of strings
These are the workflow IDs that this structured output is linked to. When linked to workflows, this structured output will be available for extraction during those workflow's execution.