PerceptionDocs

Save an extraction schema

Saves version 1 of a new schema under a generated schema_id. POST /v1/documents/extract can then name it with schema_id instead of sending schema inline. Free, and works at any balance.

POST
/v1/extraction-schemas
  • Access: only this account can see or use it.
  • Changes: schemas can't be edited or deleted. Add a version instead.
  • Retries: a retried create saves a second schema.

Other errors (413, 500, 502, 503) are on Errors.

Authorization

bearerAuth
AuthorizationBearer <token>

Your API key from the dashboard's API Keys page: nace_sk_ followed by 43 URL-safe characters (A-Z, a-z, 0-9, _ and -), shown once when you create it. Send it as Authorization: Bearer nace_sk_... Any other value returns 401 authentication_error. An account can hold at most 3 active keys.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/extraction-schemas" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "schema": {}  }'
{  "schema_id": "string",  "name": "string",  "description": "string",  "version": 1,  "owner": "account",  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z",  "schema": {}}