Upload media file
Upload a media file using API key authentication and get back a publicly accessible URL. The URL can be used as attachmentUrl when sending inbox messages.
Files are stored in temporary storage and auto-delete after 7 days. Maximum file size is 25MB.
Unlike /v1/media/upload (which uses upload tokens for end-user flows), this endpoint uses standard Bearer token authentication for programmatic use.
API key authentication - use your Zernio API key as a Bearer token
In: header
The file to upload (max 25MB)
binaryOverride MIME type (e.g. "image/jpeg"). Auto-detected from file if not provided.
Response Body
application/json
application/json
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.messages.uploadMediaDirect();console.log(data);{
"url": "string",
"filename": "string",
"contentType": "string",
"size": 0
}{
"error": "Unauthorized"
}Delete message DELETE
Delete a message from a conversation. Platform support varies: - Telegram: Full delete (bot's own messages anytime, others if admin) - X/Twitter: Full delete (own DM events only) - Bluesky: Delete for self only (recipient still sees it) - Reddit: Delete from sender's view only - Facebook, Instagram, WhatsApp: Not supported (returns 400)
Add reaction POST
Add an emoji reaction to a message. Platform support: - Telegram: Supports a subset of Unicode emoji reactions - WhatsApp: Supports any standard emoji (one reaction per message per sender) - All others: Returns 400 (not supported)