> ## Documentation Index
> Fetch the complete documentation index at: https://docs.postiz.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Upload from URL

> Upload a file from an existing URL.

Fetch a remote URL and store the result as a Postiz media asset. Useful when your media already lives on a CDN or external storage and you don't want to round-trip it through your client.

## Requirements for the source URL

* Must be reachable from the Postiz backend (publicly resolvable HTTPS, no auth required).
* Detected MIME type must be in the allowlist documented on [Upload File](/public-api/uploads/upload-file).
* Postiz performs an [SSRF-safe fetch](https://github.com/nodejs/undici) — private IP ranges, link-local addresses, and `localhost` are rejected.

## Example

```bash theme={null}
curl -X POST "https://api.postiz.com/public/v1/upload-from-url" \
  -H "Authorization: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com/photo.jpg"}'
```

Response shape matches [Upload File](/public-api/uploads/upload-file).

## When to prefer multipart upload

If your source URLs are slow or unreliable, the round-trip through Postiz can fail or take a long time. For best results:

* Cache stable, fast HTTPS source URLs (S3, R2, Cloudflare Images, etc.).
* For one-off uploads, pre-download the file locally and POST it to [`/public/v1/upload`](/public-api/uploads/upload-file) instead.
* Don't link to signed URLs that may expire before Postiz fetches them.

See [Uploads troubleshooting](/troubleshooting/uploads) for common failure modes.


## OpenAPI

````yaml POST /upload-from-url
openapi: 3.1.0
info:
  title: Postiz Public API
  description: >-
    API for managing social media posts, integrations, and media uploads in
    Postiz.


    ## Authentication


    All endpoints require an API key passed in the `Authorization` header:


    ```

    Authorization: your-api-key

    ```


    Get your API key from Postiz Settings.


    ## Rate Limits


    There is a limit of **30 requests per hour**.


    ## Terminology


    The UI uses `channel`, but the API uses `integration`. They refer to the
    same thing.


    ## Supported Platforms (27)


    **Social Platforms:** X (Twitter), LinkedIn, LinkedIn Page, Facebook,
    Instagram, Instagram Standalone, Threads, Bluesky, Mastodon, Warpcast
    (Farcaster), Nostr, VK


    **Video Platforms:** YouTube, TikTok


    **Community Platforms:** Reddit, Lemmy, Discord, Slack, Telegram


    **Design Platforms:** Pinterest, Dribbble


    **Blogging Platforms:** Medium, Dev.to, Hashnode, WordPress


    **Business:** Google My Business (GMB), Listmonk (newsletters)
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.postiz.com/public/v1
    description: Postiz Cloud
  - url: https://{your-domain}/api/public/v1
    description: Self-hosted
    variables:
      your-domain:
        default: localhost:5000
        description: Your Postiz instance domain
security:
  - ApiKeyAuth: []
tags:
  - name: Integrations
    description: Manage connected social media channels
  - name: Posts
    description: Create, list, and delete posts
  - name: Uploads
    description: Upload media files
  - name: Notifications
    description: View organization notifications
  - name: Analytics
    description: View analytics for integrations and posts
  - name: Video Generation
    description: Generate videos with AI
paths:
  /upload-from-url:
    post:
      tags:
        - Uploads
      summary: Upload from URL
      description: Upload a file from an existing URL.
      operationId: uploadFromUrl
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                url:
                  type: string
                  format: uri
                  description: URL of the file to upload
              required:
                - url
            example:
              url: https://example.com/image.png
      responses:
        '200':
          description: File uploaded successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MediaFile'
components:
  schemas:
    MediaFile:
      type: object
      properties:
        id:
          type: string
          description: Unique file ID
        name:
          type: string
          description: File name
        path:
          type: string
          description: File URL
        organizationId:
          type: string
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      example:
        id: e639003b-f727-4a1e-87bd-74a2c48ae41e
        name: image.png
        path: https://uploads.postiz.com/image.png
        organizationId: 85460a39-6329-4cf4-a252-187ce89a3480
        createdAt: '2024-12-14T08:18:54.274Z'
        updatedAt: '2024-12-14T08:18:54.274Z'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: Your Postiz API key

````