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

# Import media from URL

> Downloads the file at `url` and creates a media item from it.

The URL must serve the file to a plain `GET` request, without
credentials. A presigned URL works. The server determines the media
MIME type from the file. Maximum size is 5 GB.




## OpenAPI

````yaml /openapi.yaml post /media/imports
openapi: 3.1.0
info:
  title: WoopSocial API
  version: 1.0.0
  summary: API for WoopSocial integrations.
  description: >
    This is the public-facing OpenAPI contract for WoopSocial. It supports
    scheduling posts for various social media platforms such as Bluesky,
    Facebook, Instagram, LinkedIn, LinkedIn Pages, Pinterest, Threads, TikTok, X
    (formerly Twitter) and YouTube.
servers:
  - url: https://api.woopsocial.com/v1
    description: WoopSocial API URL.
  - url: http://localhost:9123/api/external/v1
    description: Local WoopSocial API URL.
security: []
tags:
  - name: Posts
    description: Post scheduling endpoints.
  - name: Projects
    description: Project discovery endpoints.
  - name: Social Accounts
    description: Connected social account discovery endpoints.
  - name: Media
    description: Media upload endpoints.
  - name: Webhooks
    description: Webhook endpoint management.
  - name: Feedback
    description: Send product feedback to the WoopSocial team.
  - name: Health
    description: Basic connectivity endpoints.
  - name: Me
    description: The WoopSocial user a connection acts as.
paths:
  /media/imports:
    post:
      tags:
        - Media
      summary: Import media from URL
      description: |
        Downloads the file at `url` and creates a media item from it.

        The URL must serve the file to a plain `GET` request, without
        credentials. A presigned URL works. The server determines the media
        MIME type from the file. Maximum size is 5 GB.
      operationId: importMedia
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ImportMediaRequest'
      responses:
        '200':
          description: Media imported.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateMediaResponse'
        '429':
          $ref: '#/components/responses/TooManyConcurrentRequests'
      security:
        - ApiKey: []
components:
  schemas:
    ImportMediaRequest:
      type: object
      additionalProperties: false
      required:
        - projectId
        - url
      properties:
        projectId:
          type: string
          description: Project that will own the imported media.
        url:
          type: string
          format: uri
          description: Public `http` or `https` URL of the file.
          x-woopsocial-mcp-openai-file-param: file
          x-woopsocial-mcp-description: The file attached to this chat.
    CreateMediaResponse:
      type: object
      additionalProperties: false
      required:
        - mediaId
      properties:
        mediaId:
          type: string
          description: Media identifier.
    ConcurrencyLimitErrorResponse:
      type: object
      additionalProperties: false
      required:
        - code
        - message
      properties:
        code:
          $ref: '#/components/schemas/ConcurrencyLimitErrorCode'
        message:
          type: string
    ConcurrencyLimitErrorCode:
      type: string
      enum:
        - TOO_MANY_CONCURRENT_REQUESTS
  responses:
    TooManyConcurrentRequests:
      description: Too many requests are already in progress for this API key.
      headers:
        Retry-After:
          description: Number of seconds to wait before retrying.
          required: true
          schema:
            type: integer
            format: int32
            minimum: 1
            example: 1
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ConcurrencyLimitErrorResponse'
  securitySchemes:
    ApiKey:
      type: http
      scheme: bearer
      bearerFormat: API key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.