WatificationDocs
Media

Upload media

Store a file for later use as mediaId in a message. Requires the messages.send scope. Send either the raw file bytes with the vendor content type application/vnd.watification.api-upload and the X-Filename and X-Content-Type headers (optional X-Media-Kind declares the kind, such as sticker), or a JSON body with a public url that Watification fetches. The response expiresAt is 24 hours after the upload.

Responses

StatusMeaning and codes
201Stored.
401undefined
403undefined
413undefined
415undefined
422undefined
429undefined

Success and handled error responses send Cache-Control: no-store and X-Correlation-ID (the resolved/generated UUID). Errors use application/problem+json and the reusable ProblemDetails schema below. Retry-After: 1 is sent only for RATE_LIMITED. Request examples read your key from a server environment variable; replace all fictional values.

Schemas and examples

POST
/media

Authorization

ApiKey
headerAuthorizationBearer <token>

Server-side API key. publicId is 12 lowercase base32 characters (a-z, 2-7); secret is 43 base64url characters from 32 random bytes. Use Authorization: Bearer <complete key>. The API key determines the workspace; requests cannot select another workspace. All public routes share 20 requests per second per key. See API-key authentication.

Header Parameters

X-Correlation-ID?string

Optional tracing ID. A UUID-shaped value is echoed in the response. Missing or invalid values are replaced with a generated UUID, not rejected.

Request Body

body*file
Formatbinary

Response Body

Stored.

application/json
  1. response
mediaId*string
Formatuuid
kind*string
mimeType*string
sizeBytes*integer
filename*string
expiresAt*string

24 hours after the upload.

Formatdate-time