Referência REST

Mídia

As rotas de Mídia. Todo corpo é JSON, e o erro sempre volta como um objeto com código e mensagem.

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.

Parâmetros de query

numberIdstringObrigatório
The number id, as returned by list_numbers.

Resposta (object)

mediaIdstringObrigatório
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.

Parâmetros de caminho

messageIdstringObrigatório
The Zaiped message id from the webhook event.

Resposta (object)

urlstringObrigatório
expiresAtnumberObrigatório
mimeTypestring
fileNamestring
curl -X GET "https://zaiped.com/v1/media/YOUR_MESSAGE_ID" \
  -H "Authorization: Bearer zp_..."
Referência REST