---
title: "Upload Media Ep"
method: POST
path: "/wordpress/sites/{site_id}/media"
tags: ["wordpress"]
---

# Upload Media Ep

`POST /wordpress/sites/{site_id}/media`

## Request

- Base URL: `https://api.xeorank.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.xeorank.com/wordpress/sites/{site_id}/media`
- Auth: API key in header `X-Agent-Key`

Sideload an image (from a URL, or from base64 bytes a client already has
locally) into the site's WordPress media library and return the HOSTED url —
use it in a `sections` image widget or swap an image via wp_patch_page.
Write-gated. Plugin transport needs Xyle Connector >= 0.2.0 (>= 0.9.8 for
image_data). image_data is plugin-transport only — SSH sites must host the
image publicly and use image_url.

## Path parameters

- `site_id` string, uuid, required

## Query parameters

- `email` string, nullable

## Request body

- MediaUploadBody
  - `image_url` string, nullable
  - `image_data` string, nullable
  - `filename` string, nullable
  - `title` string, nullable
  - `alt` string, nullable

## Response `200`

Successful Response

- object

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/xeorank/apis/seo-intelligence-engine.md) · [All operations](https://skmtc.dev/xeorank/apis/seo-intelligence-engine/llms.txt) · [OpenAPI document](https://skmtc.dev/xeorank/apis/seo-intelligence-engine/revisions/449a3fd73454?raw)
