Skip to main content
POST
Add a field to a document type

Authorizations

Authorization
string
header
required

A firm API key, shown once when it is made, or a connected app’s OAuth access token. Each operation lists the scope it needs, such as clients:write.

Path Parameters

type
string
required

The document type key, such as payslip, from list_document_types.

Required string length: 1 - 60

Body

application/json
label
string
required
Required string length: 1 - 80
value_type
enum<string>
required

text, date (YYYY-MM-DD), amount (dollars), number or percent. A field that fills a fact holds the same type as the fact.

Available options:
text,
date,
amount,
number,
percent
instruction
string · null · null

What the reader is told about the value when the label is not enough, such as where on the page it is.

Maximum string length: 300
section
string | null

On a built-in type, one of the section labels get_document_type shows, such as Pay. On the firm's own type, any name; Details when left out.

Maximum string length: 80
required
boolean | null
fact_key
string · null · null

The client fact an approved value fills: a key from list_fact_definitions whose type matches, or null for none.

Maximum string length: 64

Response

Created.

object
enum<string>
required
Available options:
document_type_field
id
string | null
required

Null for a built-in field.

key
string
required
label
string
required
type
enum<string>
required

text, date (YYYY-MM-DD), amount (dollars), number or percent. A field that fills a fact holds the same type as the fact.

Available options:
text,
date,
amount,
number,
percent
section
string
required
required
boolean
required
instruction
string | null
required

What the reader is told. Only the firm's own fields show theirs.

origin
enum<string>
required

redbark for Redbark's own, which cannot be changed; firm for the firm's own.

Available options:
redbark,
firm
archived
boolean
required

No longer read from new documents. Values already read stay and still show.

fact_key
string | null
required

The client fact an approved value fills, or null.