Skip to Content
Extraction objects

Create an extraction object

Permissionextraction-objects:createRetriesIdempotency-Key requiredAuthentication
POST
/extraction-objects

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.

Authorization

bearerAuth
headerAuthorizationBearer <token>

Use a Voice API key or connected-app OAuth access token. Authentication.

Header Parameters

Idempotency-Key*string

Required. Reuse the same key to retry this write safely. Retries and idempotency.

Match^[A-Za-z0-9!#$%&'*+.^_`|~-]+$
Length1 <= length <= 255

Request Body

application/json
  1. body
name*string
Length1 <= length <= 120
description?|

Null or a blank string normalizes to null.

Lengthlength <= 2000
fields*array<|||||>
Items1 <= items <= 100

Response Body

Extraction object created. The response contains the fully normalized schema.

application/json
  1. response
id*string
Formatuuid
name*string
description*string|null
fields*array<>
Items1 <= items <= 100
archived_at*|
Formatdate-time
created_at*string
Formatdate-time
updated_at*string
Formatdate-time
Example Request
curl -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"}