Skip to main content
PATCH
Update File
The contents never change, and neither does the label. Agents point at the label, so swapping what it resolves to would quietly change what they send. This endpoint edits the display name and the description only. To replace a file’s contents, upload a new file and update the prompts that name the old one.

Authorizations

Authorization
string
header
required

Your API key as a Bearer token, e.g. Authorization: Bearer vk_….

Path Parameters

file_ref
string
required

The file's label or id.

Body

application/json

Rename and re-describe. The file's CONTENTS and its LABEL never change: an agent's prompt points at the label, so replacing what it resolves to would silently change what that agent sends. Upload a new file instead.

name
string | null

A new name for the file. Must be unique in the workspace.

Maximum string length: 120
Example:

"Autumn brochure"

description
string | null

A new note about what the file is for.

Maximum string length: 500
Example:

"Two-page product brochure, updated October."

Response

Successful Response

label
string
required

Identifier for this file: its filename slugified, plus a short random suffix. Paste it into an agent's prompt to let that agent send the file. It never changes.

Example:

"autumn-brochure_7bq2xk"

id
string
required

The file's unique id. Either this or the label works wherever a path takes a file reference.

name
string
required

What the file is called in your library. Editable; the label is not.

Example:

"Autumn brochure"

mime_type
string
required

The file's type, read from its contents rather than its name.

Example:

"application/pdf"

kind
string
required

One of image, video, audio or document.

Example:

"document"

size_bytes
integer
required

The file's size in bytes.

Example:

184320

status
string
required

ready when the file can be sent. A file that failed its malware scan is quarantined and holds no contents; a deleted file is deleted.

Example:

"ready"

description
string
default:""

Your note about what the file is for. Agents read it when choosing which file to send.

filename
string
default:""

The file's original name. This is the document name the recipient sees on WhatsApp.

Example:

"autumn-brochure.pdf"

created_at
string | null

When the file was uploaded.