---
title: "Import one attached photo or video, or a public media URL, into this workspace’s Hive Asset Library so a post can use it. Supply exactly one of file or url. This publishes nothing. Private network addresses, insecure redirects, files over 100 MB and unsupported types are refused."
method: POST
path: "/api/v1/tools/upload_media_from_url"
---

# Import one attached photo or video, or a public media URL, into this workspace’s Hive Asset Library so a post can use it. Supply exactly one of file or url. This publishes nothing. Private network addresses, insecure redirects, files over 100 MB and unsupported types are refused.

`POST /api/v1/tools/upload_media_from_url`

## Request

- Base URL: `https://hivepublish.com`
- URL: `https://hivepublish.com/api/v1/tools/upload_media_from_url`
- Auth: HTTP bearer

## Headers

- `Idempotency-Key` string, required

## Request body

- object
  - `url` string: The public link to the photo or video.
  - `file` object
    - `download_url` string, required
    - `file_id` string, required
    - `mime_type` string
    - `file_name` string
  - `title` string: A name for the Asset Library item.
  - `altText` string: Accessibility text saved with the item.
  - `folderId` string: An Asset Library folder to file it in.
  - `channelGroupId` string: An accessible channel group from read_media_library. Required when the library saves assets per group.

## Response `200`

Tool result

- ToolResult
  - `data` unknown, required
  - `meta` object, required
    - `tool` string
    - `workspaceId` string, uuid

## Other responses

- `400`: Invalid input
- `401`: Missing or invalid credential
- `403`: Missing workspace scope, role permission, or plan entitlement
- `409`: Idempotency conflict, replay, or request still in progress
- `429`: Rate limit exceeded

---

[API](https://skmtc.dev/hivepublish/apis/hive-developer-api.md) · [All operations](https://skmtc.dev/hivepublish/apis/hive-developer-api/llms.txt) · [OpenAPI document](https://skmtc.dev/hivepublish/apis/hive-developer-api/revisions/b440c763583e?raw)
