Skip to main content
POST
/
{phone_number_id}
/
media
curl --request POST \
--url https://api.kapso.ai/meta/whatsapp/{phone_number_id}/media \
--header 'Content-Type: multipart/form-data' \
--header 'X-API-Key: <api-key>' \
--form messaging_product=whatsapp \
--form file=@example-file
{
  "id": "4490709327384033"
}

Authorizations

X-API-Key
string
header
required

Project API key for authentication. This is the recommended authentication method.

Get your API key from the Kapso dashboard under Project Settings > API Keys.

Path Parameters

phone_number_id
string
required

WhatsApp Business Phone Number ID

Body

multipart/form-data
file
file
required

Media file to upload

messaging_product
enum<string>
required

Always "whatsapp"

Available options:
whatsapp

Response

Media uploaded successfully

id
string

Media ID to use when sending messages

Example:

"4490709327384033"