POST
/
document_types
curl --request POST \
  --url https://api.sensible.so/v0/document_types \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "auto_insurance_quotes_all_carriers",
  "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"
      }
    ]
  }
}'
{
  "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"
      }
    ]
  }
}

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.

Body

application/json
name
string
required

Unique user-friendly name for a document type

schema
object
required

Response

200
application/json
List of document types for the current account
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