Skip to main content
PUT
/
v1
/
views
/
{view_id}
Update a view
curl --request PUT \
  --url http://localhost:8000/v1/views/{view_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "description": "<string>",
  "fields": [
    "<string>"
  ],
  "is_default": true
}
'
{
  "view_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "document_type": "<string>",
  "name": "<string>",
  "fields": [
    "<string>"
  ],
  "is_default": true,
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "description": "<string>"
}

Authorizations

Authorization
string
header
required

API Key authentication. Format: dk_test_ or dk_live_

Path Parameters

view_id
string<uuid>
required

View ID

Body

application/json

Request for updating a view (PUT /v1/views/{view_id}).

All fields are optional - only provided fields will be updated.

name
string | null

New view name

Required string length: 3 - 100
description
string | null

New description

Maximum string length: 500
fields
string[] | null

New list of field names

Minimum array length: 1
is_default
boolean | null

Set as default view

Response

Updated view

Tenant view response.

Views define which fields from extracted data are returned when querying documents.

view_id
string<uuid>
required

Unique identifier for the view

document_type
string
required

Document type code this view applies to

name
string
required

View name (e.g., 'accounting', 'compliance')

fields
string[]
required

List of field names included in this view

is_default
boolean
required

Whether this is the default view for this document type

created_at
string<date-time>
required

View creation timestamp (ISO 8601)

updated_at
string<date-time>
required

Last modification timestamp (ISO 8601)

description
string | null

Optional description of the view's purpose