Media

Upload media from URL

Download a file from a public URL and store it, the same as an upload. Use the returned id in mediaIds when creating posts.

Allowed types: JPEG, PNG, GIF, WebP, MP4, MOV, PDF

Max file size: 100 MB

post/media/from-url

Request

  • Base URL: https://api.postplanify.com/api/v1
  • URL: https://api.postplanify.com/api/v1/media/from-url
  • Auth: HTTP bearer

Request body

urlstring uri required

Public http(s) URL of the file. Redirects are followed.

filenamestring

Optional file name. Defaults to the name in the URL.

Example request

{
  "url": "https://example.com/photo.jpg"
}

Response

File uploaded successfully

okboolean

Example response

{
  "ok": true,
  "data": {
    "id": "e1a2b3c4-d5e6-f7a8-b9c0-d1e2f3a4b5c6",
    "name": "banner.png",
    "url": "https://cdn.postplanify.com/api-uploads/banner.png",
    "type": "image/png",
    "size": 542000,
    "createdAt": "2026-02-19T10:00:00.000Z",
    "source": "library"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.