Header name | Description |
---|---|
Content-Type required |
application/json |
X-API-KEY required |
YOUR_API_KEY |
Param name | Description |
---|---|
asset_id required |
Asset ID Validations:
|
file_url required |
URL where file is located and can be downloaded by Media Pocket Validations:
|
filename required |
Original filename Validations:
|
// HTTP file URL POST /api/v2/assets/4Z1MJ6s7L1HqPBf7Mol5/media { "file_url": "http://www.example.com/jpgfile.jpg", "filename": "jpgfile.jpg" } 200 { "ok": "ok" }
// HTTPS file URL POST /api/v2/assets/xGZbvO04EXYglsPR1xuL/media { "file_url": "https://www.example.com/jpgfile.jpg", "filename": "jpgfile.jpg" } 200 { "ok": "ok" }
// Invalid file URL POST /api/v2/assets/5f-96poumuaeFIVS0u2F/media { "file_url": "/local/downloads/myfile.jpg", "filename": "myfile.jpg" } 400 { "error": "not a valid HTTP URL" }
Code | Description |
---|---|
401 | Unauthorized |
404 | Not found |
500 | Internal Server Error |
422 | Missing parameters |