Create Structured Output
Request body
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.
Defaults to 'ai' if not specified.
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
This is the name of the structured output.
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.
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.
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.
Response
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.
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
This is the unique identifier for the structured output.
This is the unique identifier for the org that this structured output belongs to.
This is the ISO 8601 date-time string of when the structured output was created.
This is the ISO 8601 date-time string of when the structured output was last updated.
This is the name of the structured output.
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.
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.
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.