Extraction objects
Create an extraction object
POST
Creates a reusable structured-output schema. Attach its id to an agent version's after-call configuration to produce schema-validated JSON for future calls. Names are unique per workspace, including archived objects.
bearerAuthheader
AuthorizationBearer <token>Use a Voice API key or connected-app OAuth access token. Authentication.
Idempotency-Key*stringRequired. Reuse the same key to retry this write safely. Retries and idempotency.
Match
^[A-Za-z0-9!#$%&'*+.^_`|~-]+$Length
1 <= length <= 255application/json- body
name*stringLength
1 <= length <= 120description?|Null or a blank string normalizes to null.
Length
length <= 2000fields*array<|||||>Items
1 <= items <= 100Extraction object created. The response contains the fully normalized schema.
application/json- response
id*stringFormat
uuidname*stringdescription*string|nullfields*array<>Items
1 <= items <= 100archived_at*|Format
date-timecreated_at*stringFormat
date-timeupdated_at*stringFormat
date-timecurl -X POST 'https://api.kejue.co/v1/extraction-objects' \ -H 'Idempotency-Key: string' \ -H 'Content-Type: application/json' \ -d '{ "name": "string", "fields": [ { "name": "string", "type": "string" } ]}'Example Response
{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "description": "string", "fields": [ { "name": "string", "type": "string", "description": "string", "required": true, "enum_values": [ "string" ], "item_type": "string" } ], "archived_at": "2019-08-24T14:15:22Z", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z"}