Skip to content
Follow yggy on LinkedInFollow @yggy_tech on X

Upload and queue a document for async processing (project-scoped)

POST
/api/v1/projects/{projectId}/documents/upload
curl --request POST \
--url https://api.yggy.tech/api/v1/projects/example/documents/upload \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form file=@file \
--form text=example \
--form noteKind=capture \
--form parentNoteId=example \
--form forLinkId=example \
--form title=example \
--form source=example \
--form originSystem=example \
--form projectId=example \
--form desiredTier=auto \
--form inferenceMode=cloud

Uploads a document to storage, binds it to the project from the path, and queues it for processing.

projectId
required
string
>= 1 characters
host
string | null
x-yggy-organization-id
string | null
Media type multipart/form-data
object
file

The document file to upload. Optional when text is set.

string format: binary
text

Plain text or markdown body. Used when no file is uploaded.

string
noteKind

Note kind. When set, the upload is stored on the caller’s personal organization.

string
Allowed values: capture daily note
parentNoteId

Yggy notes: attach the file to this note. The file becomes a document of its own that belongs to the note, and needs a file.

string
/^[A-Za-z0-9_-]{1,128}$/
forLinkId

Yggy Notes: the link attachment of the same note this file was uploaded for (its audio, for a transcript). Needs parentNoteId.

string
/^[A-Za-z0-9_-]{1,128}$/
title

Document title

string
source

Source identifier

string
originSystem

Business system the data originates from

string
<= 80 characters
projectId

Project ID to bind the document to at upload time

string
desiredTier

Model tier for extraction. Defaults to auto.

string
Allowed values: auto fast balanced accurate extract
inferenceMode

Inference routing for extraction. Defaults to org settings.

string
Allowed values: cloud self-hosted hybrid

Document queued for processing

Media type application/json
object
success
required
boolean
documentId
required
string format: uuid
internalId
required
string
invocationId
required
string
status
required

Stored: saved without analysis because the account has no credits

string
Allowed values: queued stored
storagePath
required
string | null
storageUrl
required
string | null
message
required
string
Example
{
"status": "queued"
}

Invalid request

Media type application/json
object
success
boolean
error
required
string
message
string
Example
{
"success": false
}

Failed to queue document

Media type application/json
object
success
boolean
error
required
string
message
string
Example
{
"success": false
}