Skip to main content
POST
Upload File
A multipart form with file, plus an optional name and description. The name defaults to the filename. The label is generated for you: the filename slugified, plus a short random suffix — Autumn Brochure 2026.pdf becomes autumn-brochure-2026_7bq2xk. It is unique in the workspace and never changes, so a prompt pointing at it always resolves to the same bytes.
The response’s label is the point. Paste it into an agent’s prompt — for example When a customer asks for the brochure, send autumn-brochure_7bq2xk. — and that agent can send that file. An agent can only send files its own prompt names.
The file’s type is read from its contents, not from its name or the content type you declare. A file whose real type cannot be delivered on WhatsApp is refused here, rather than stored and found undeliverable later with a customer waiting. Call File limits for the accepted list. Every upload is scanned for malware before it is stored. A file that fails the scan is refused and its contents are never kept.

Authorizations

Authorization
string
header
required

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

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.