PUT
/
document_types
/
{type-id}
curl --request PUT \
  --url https://api.sensible.so/v0/document_types/{type-id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "pay_stubs",
  "schema": {
    "validations": [
      {
        "description": "total pay is listed in paystub",
        "condition": {
          "exists": [
            {
              "var": "total_pay.value"
            }
          ]
        },
        "severity": "warning"
      }
    ]
  }
}'
{
  "name": "auto_insurance_quotes_all_carriers",
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "created": "2023-11-07T05:31:56Z",
  "schema": {
    "fingerprint_mode": "fallback_to_all",
    "ocr_engine": "microsoft",
    "prevent_default_merge_lines": true,
    "ocr_level": 0,
    "validations": [
      {
        "description": "Broker's email is in string@string format",
        "condition": {
          "match": [
            {
              "var": "broker\\.email.value"
            },
            "^\\S+\\@\\S+$"
          ]
        },
        "fields": [
          "broker\\.email"
        ],
        "severity": "warning"
      }
    ]
  }
}
curl --location --request PUT 'https://api.sensible.so/v0/document_types/<TYPE_ID>' \
--header 'Authorization: Bearer <YOUR_API_TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{"schema":{"validations":[{"description":"example validation to test broker email format","condition":{"match":[{"var":"broker\\.email.value"},"^\\S+\\@\\S+$"]},"severity":"warning","fields":["test"]}]}} '

Authorizations

Authorization
string
header
required

Sensible uses API keys to authenticate requests. Keep your API keys secure and do not share them publicly accessible areas such as GitHub, client-side code, etc. Authentication to the API is performed via Bearer Authentication. Provide your API key as the bearer auth value.

Path Parameters

type-id
string
required

The unique document type identifier in v4 UUID format. Find IDs using the /document_types endpoint.

Body

application/json
name
string

User-friendly name

Required string length: 3 - 128
schema
object

Response

200
application/json
Identified document type
name
string
required

Unique user-friendly name for a document type

id
string
required

Unique identifier

created
string
required

ISO 8601 date-time.

schema
object
required