Upload or Replace Media

Uploads a file the normal HTTP way. You may add headers to the request in order to provide some control to your media-file.

Bandwidth retains uploaded media for up to 48 hours.

Request URL



Header Description Mandatory
Content-Length Indicates the size of the entity-body. Yes
Cache-Control General-header field is used to specify directives that MUST be obeyed by all caching mechanisms along the request/response chain. No
Content-Type The media type of the entity-body. Yes

Example 1 of 1: Upload an MP3 File

curl -v -X PUT https://messaging.bandwidth.com/api/v2/users/{accountId}/media/{file.mp3} -H "Content-Type: audio/mpeg" -u {{token}}:{{secret}} --data-binary "@{/filepath/file.mp3}"

results matching ""

    No results matching ""