WhatsAble
API v1Media

Upload a file to send by its id

posthttps://api.whatsable.app/v1/media
Build a request to copy

This page never sends a request. Fill in the fields, then copy the request and run it from your server.

The body is multipart/form-data. Send the file as the file part.

Request
curl -X POST 'https://api.whatsable.app/v1/media' \
  -F 'file=string'

Uploads one file. For 30 days, you can send it by its id from any number this key may use. Send a multipart/form-data body with one file part.

Authorization

bearerAuth
headerAuthorizationBearer <nfy_live_<32 characters>>

An API key from Settings > API keys, sent as Authorization: Bearer <key>.

Header Parameters

Idempotency-Key?string

Any string up to 255 characters. A repeat with the same key and body answers the stored response; with another body, 409 idempotency_key_reused.

Lengthlength <= 255

Request Body

multipart/form-data
  1. body

One file to upload, in a file part.

file*file

The file, at most 100 MiB, of a type WhatsApp can send. The bytes decide the type, or the part's content type and file name when the bytes name none.

Formatbinary

Response Body

The file was stored.

application/json
  1. response

An uploaded file, sendable by its id for 30 days. Each send checks the file against its own type's limits: a 10 MiB JPEG can be sent as a document, and as an image it answers 400 media_too_large.

object*string
id*string

Send it as media_id in POST /v1/messages, POST /v1/scheduled-messages or a template's media header, from any number this key may use.

Length1 <= length <= 64
mime_type*string

The file's content type, read from its bytes whenever they name one.

size_bytes*integer

The file size in bytes.

Range0 <= value <= 9007199254740991
filename*|

The name the upload gave the file, or null when its part carried none.

expires_at*string

When the media_id stops working, 30 days after the upload. Upload the file again after it.

Formatdate-time
Example Request
curl -X POST 'https://api.whatsable.app/v1/media' \  -F 'file=string'
Example Response
{  "object": "media",  "id": "cm2v8u1a00001qz8h2b3c4d5e",  "mime_type": "image/jpeg",  "size_bytes": 48213,  "filename": "box.jpg",  "expires_at": "2026-11-20T19:51:21Z"}