Errors

Code Description
401 Unauthorized
500 Internal Server Error
422 Missing parameters

Examples

POST /api/v2/assets/342uT3wBW4fR4Me2-HzL/media
{
  "file_url": "http://www.example.com/jpgfile.jpg",
  "filename": "jpgfile.jpg"
}
200
{
  "ok": "ok"
}
POST /api/v2/assets/4I2uT3wBW4fR4Me2_HzP/media
{
  "file_url": "https://www.example.com/jpgfile.jpg",
  "filename": "jpgfile.jpg"
}
200
{
  "ok": "ok"
}
POST /api/v2/assets/4Y2vT3wBW4fR4Me2AHzQ/media
{
  "file_url": "/local/downloads/myfile.jpg",
  "filename": "myfile.jpg"
}
200
{
  "error": "not a valid url"
}

Params

Param name Description
asset_id
required

Asset ID

Validations:

  • Must be a String

file_url
required

URL where file is located and can be downloaded by Media Pocket

Validations:

  • Must be a String

filename
required

Original filename

Validations:

  • Must be a String

Headers

Header name Description
Content-Type
required
application/json
X-API-KEY
required
YOUR_API_KEY