# Upload a file from a URL (/en/reference/media/create-media-from-url)

OpenAPI operation (components in https://api.tebar.app/v1/openapi.json):

```json
[
  {
    "operationId": "createMediaFromUrl",
    "tags": [
      "Media"
    ],
    "summary": "Upload a file from a URL",
    "description": "Tebar downloads the file (public http/https hosts on port 80 or 443 only).\n\nRequires the write scope.",
    "parameters": [
      {
        "$ref": "#/components/parameters/TebarProfile"
      }
    ],
    "requestBody": {
      "required": true,
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/CreateMediaFromUrlRequest"
          }
        }
      }
    },
    "responses": {
      "201": {
        "description": "The media, ready to use.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Media"
            }
          }
        }
      },
      "400": {
        "$ref": "#/components/responses/BadRequest"
      },
      "401": {
        "$ref": "#/components/responses/Unauthorized"
      },
      "403": {
        "$ref": "#/components/responses/Forbidden"
      },
      "429": {
        "$ref": "#/components/responses/RateLimited"
      }
    }
  }
]
```