Skip to main content
POST
Create a retrieval document

Authorizations

Authorization
string
header
required

Use a JWT bearer token or a Veryfront API key in the Authorization header.

Path Parameters

project_reference
string
required

Project ID or slug.

Body

application/json
title
string
required

Document title, at least one character.

Minimum string length: 1
source
string

Upstream source reference, such as a file path or URL. Defaults to "".

type
string

Document type label. Defaults to "".

metadata
object

Structured metadata stored with the record: an object of string keys to JSON values.

id
string<uuid>

Caller-chosen record ID. Omit to let the API choose one. An ID that already exists is a conflict. Create the record before writing its chunks; use update to change an existing record.

Response

The created record with its first revision.

id
string<uuid>
required

Retrieval document ID.

revision
string
required

Opaque revision of this record. Send it as expected_revision to update or delete exactly this version.

Pattern: ^[a-f0-9]{64}$
title
string
required

Document title.

source
string
required

Upstream source reference, such as a file path or URL; empty when not set.

type
string
required

Document type label; empty when not set.

metadata
object
required

Structured metadata stored with the record: an object of string keys to JSON values.

created_at
string<date-time>
required

When the record was created (RFC 3339, UTC).

updated_at
string<date-time>
required

When the record last changed (RFC 3339, UTC).