---
title: "Copy a file from a public URL into your uploads"
method: POST
path: "/uploads/from-url"
tags: ["Uploads"]
---

# Copy a file from a public URL into your uploads

`POST /uploads/from-url`

## Request

- Base URL: `https://www.sociahive.com/api/v1`
- URL: `https://www.sociahive.com/api/v1/uploads/from-url`
- Auth: one of:
  - API key in header `X-API-Key`
  - OAuth 2 (authorization code, authorization URL `/api/oauth/authorize`, token URL `/api/oauth/token`, scopes: `uploads:write`)

For clients that cannot send file bytes. The server downloads the URL (public addresses only), checks the type from the bytes and the size against your plan's upload limit, and stores it under `uploads/{user_id}/{uuid}.{ext}`. 30 imports per hour. Behind the MEDIA_UPLOAD_FROM_URL feature flag (403 `feature_disabled` while off).

## Request body

- UploadFromUrlRequest
  - `url` string, uri, required: Public http(s) URL of a JPEG, PNG, WebP, MP4 or MOV file.

## Response `200`

Stored copy

- UploadFromUrlResponse
  - `url` string, uri, required: Public URL of the stored copy. Use it as post media.
  - `key` string, required
  - `size_bytes` integer, required
  - `mime_type` 'image/jpeg' | 'image/png' | 'image/webp' | 'video/mp4' | 'video/quicktime', required

## Other responses

- `400`: Bad request — invalid parameters
- `401`: Authentication required — provide X-API-Key or Bearer token
- `403`: Insufficient scope for this operation
- `413`: File larger than the plan allows
- `415`: Not an allowed image or video type
- `422`: The site refused the download (`upstream_refused`, with its HTTP status in `details.reason`), timed out (`upstream_timeout`) or could not be reached (`upstream_unreachable`)
- `429`: Rate limit exceeded
- `500`: Internal server error

---

[API](https://skmtc.dev/sociahive/apis/sociahive-api.md) · [All operations](https://skmtc.dev/sociahive/apis/sociahive-api/llms.txt) · [OpenAPI document](https://skmtc.dev/sociahive/apis/sociahive-api/revisions/791b8548d288?raw)
