REST reference

Media

The Media routes. Every body is JSON, and an error always comes back as an object with a code and a message.

POST

/v1/media

Upload media to send

Raw bytes in the request body with the `Content-Type` of the file (image, video, audio, document). Returns a `mediaId` to use as `media: { path }` in send_message. Not available as an MCP tool.

Query parameters

numberIdstringRequired
The number id, as returned by list_numbers.

Response (object)

mediaIdstringRequired
curl -X POST "https://zaiped.com/v1/media" \
  -H "Authorization: Bearer zp_..."
GET

/v1/media/{messageId}

Get a download URL for received media

The `messageId` comes in the `message.received` webhook event. The URL is signed and short-lived.

Path parameters

messageIdstringRequired
The Zaiped message id from the webhook event.

Response (object)

urlstringRequired
expiresAtnumberRequired
mimeTypestring
fileNamestring
curl -X GET "https://zaiped.com/v1/media/YOUR_MESSAGE_ID" \
  -H "Authorization: Bearer zp_..."
REST reference