Automattic Media API

The media API from Automattic — 14 operation(s) for media.

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).

Operations 26

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /sites/{site}/media/ List a site's media library · Get a list of items in the media library #
Ask an LLM
“How do I list all the images and files in a WordPress.com site's media library?”
“Can I search a site's media library by MIME type or by a keyword?”
Tell an agent
List the media items on site {site}.
Search site {site}'s media library for {search}.
POST /sites/{site}/media/new Upload a new image or video · Upload a new piece of media #
Ask an LLM
“How do I upload a photo to my WordPress site?”
“Can I upload media by URL and set its alt text?”
Tell an agent
Upload media {media} to site {site}.
Add these image URLs to site {site}: {media_urls}.
GET /sites/{site}/media/{media_ID} Get a media item by ID · Get a single media item (by ID) #
Ask an LLM
“How do I fetch one file from a site's media library by its ID?”
“What details are returned for a single media item?”
Tell an agent
Get media item {media_ID} on site {site}.
Show the details of file {media_ID} in {site}'s media library.
POST /sites/{site}/media/{media_ID} Edit a media item's basic info · Edit basic information about a media item #
Ask an LLM
“How do I change the title, caption or alt text of an uploaded image?”
“Can I re-attach a media item to a different post?”
Tell an agent
Set the caption of media {media_ID} on {site} to {caption}.
Move media {media_ID} on {site} to post {parent_id}.
POST /sites/{site}/media/{media_ID}/delete Delete a media item · Delete a piece of media. Note: Media is deleted and not trashed #
Ask an LLM
“How do I permanently delete a file from a site's media library?”
“Is there a trash for deleted media items?”
Tell an agent destructive · confirm first
Delete media item {media_ID} from site {site}.
Permanently remove file {media_ID} on {site}'s media library.
POST /sites/{site}/media/{media_ID}/edit Edit a media item's details via its edit path · Edit a media item #
Ask an LLM
“Can I update the description or artist of an audio file in my media library?”
“What's the way to edit an uploaded file's metadata using the v1.1 edit endpoint?”
Tell an agent
Update the description of file {media_ID} on {site} to {description}.
Set the artist of audio file {media_ID} on {site} to {artist} and the album to {album}.
GET /wp/v2/sites/{wpcom_site}/media List a site's media via the wp/v2 endpoint · GET /wp/v2/sites/{wpcom_site}/media #
Ask an LLM
“How do I list a WordPress.com site's media using the wp/v2 REST endpoint?”
“Can I filter a site's media by MIME type with the wp/v2 API?”
Tell an agent
List media on WordPress.com site {wpcom_site} via wp/v2.
Show {media_type} media on {wpcom_site} using the wp/v2 endpoint.
POST /wp/v2/sites/{wpcom_site}/media Upload media to a site via wp/v2 · POST /wp/v2/sites/{wpcom_site}/media #
Ask an LLM
“How do I upload a new image to a WordPress.com site using the wp/v2 endpoint?”
“Can I sideload an external image URL into a site's media library?”
Tell an agent
Upload {filename} to WordPress.com site {wpcom_site} via wp/v2.
Sideload {url} as a new media item on {wpcom_site} using wp/v2.
GET /wp/v2/sites/{wpcom_site}/media/{id} Get a media item via wp/v2 · GET /wp/v2/sites/{wpcom_site}/media/{id} #
Ask an LLM
“How do I fetch a single media item from a WordPress.com site with the wp/v2 endpoint?”
“What does the wp/v2 media item detail call return?”
Tell an agent
Get media {id} on WordPress.com site {wpcom_site} via wp/v2.
Show the wp/v2 details of file {id} in {wpcom_site}'s media library.
POST /wp/v2/sites/{wpcom_site}/media/{id} Update a media item via wp/v2 · POST /wp/v2/sites/{wpcom_site}/media/{id} #
Ask an LLM
“How do I change a media item's status or slug through the wp/v2 endpoint?”
“Can I edit a media item's attributes with a POST to its edit path?”
Tell an agent
Update media {id} on {wpcom_site} with status {status}.
Set the slug of media {id} on {wpcom_site} to {slug}.
PUT /wp/v2/sites/{wpcom_site}/media/{id} Replace a media item via wp/v2 · PUT /wp/v2/sites/{wpcom_site}/media/{id} #
Ask an LLM
“How do I overwrite an existing media item on a WordPress.com site with a new file?”
“Can I change a media item's alt text through the wp/v2 endpoint?”
Tell an agent
Replace media {id} on {wpcom_site} with {filename}.
Set the alt text of media {id} on {wpcom_site} to {alt_text}.
PATCH /wp/v2/sites/{wpcom_site}/media/{id} Patch a media item via wp/v2 · PATCH /wp/v2/sites/{wpcom_site}/media/{id} #
Ask an LLM
“How do I change just the caption of a media item through the wp/v2 endpoint?”
“Can I partially update a media item's attributes with a PATCH request?”
Tell an agent
Patch media {id} on {wpcom_site} with caption {caption}.
Patch media {id} on {wpcom_site} to status {status}.
DELETE /wp/v2/sites/{wpcom_site}/media/{id} Delete a media item via wp/v2 · DELETE /wp/v2/sites/{wpcom_site}/media/{id} #
Ask an LLM
“How do I delete a media item from a WordPress.com site using the wp/v2 endpoint?”
“Can I force-delete a media item so it skips the trash?”
Tell an agent destructive · confirm first
Delete media {id} from WordPress.com site {wpcom_site} via wp/v2.
Force-delete file {id} on {wpcom_site} using wp/v2.
POST /wp/v2/sites/{wpcom_site}/media/{id}/edit Edit an uploaded image via wp/v2 · POST /wp/v2/sites/{wpcom_site}/media/{id}/edit #
Ask an LLM
“How do I crop or rotate an image I already uploaded to a WordPress.com site?”
“Can I apply image modifiers to an existing media item through wp/v2?”
Tell an agent
Crop image {id} on {wpcom_site} from {x},{y} to {width} wide and {height} tall.
Rotate image {id} on {wpcom_site} by {rotation} degrees.
POST /wp/v2/sites/{wpcom_site}/media/{id}/finalize Finalize a sideloaded image via wp/v2 · POST /wp/v2/sites/{wpcom_site}/media/{id}/finalize #
Ask an LLM
“How do I finalize a media item that was sideloaded into a WordPress.com site?”
“What do I send to finish processing a sideloaded image?”
Tell an agent
Finalize sideloaded image {id} on {wpcom_site} with sub-sizes {sub_sizes}.
Mark the sideloaded file {id} on {wpcom_site} as finalized.
POST /wp/v2/sites/{wpcom_site}/media/{id}/post-process Run a post-processing action on media via wp/v2 · POST /wp/v2/sites/{wpcom_site}/media/{id}/post-process #
Ask an LLM
“How do I trigger a post-processing action on a media item through the wp/v2 endpoint?”
“Can I run a specific action on an uploaded file after it lands?”
Tell an agent
Run post-processing action {action} on media {id} on {wpcom_site}.
Post-process file {id} in {wpcom_site}'s media library with {action}.
POST /wp/v2/sites/{wpcom_site}/media/{id}/sideload Sideload an image into a site via wp/v2 · POST /wp/v2/sites/{wpcom_site}/media/{id}/sideload #
Ask an LLM
“How do I sideload an external image into a WordPress.com site's media library?”
“Can I register a sideloaded image under several sizes at once?”
Tell an agent
Sideload image {id} on {wpcom_site} as size {image_size}.
Register sideloaded file {id} on {wpcom_site} under sizes {image_size}.
POST /wpcom/v2/sites/{wpcom_site}/media/videopress-playback-jwt/{guid} Get a VideoPress playback token · POST /wpcom/v2/sites/{wpcom_site}/media/videopress-playback-jwt/{guid} #
Ask an LLM
“How can I get a signed token to play back a private VideoPress video?”
“Is there a way to request a playback JWT for a VideoPress video using its GUID?”
Tell an agent
Get a playback JWT via POST for VideoPress video {guid} on {wpcom_site}.
Request a signed playback token with POST for VideoPress GUID {guid} on site {wpcom_site}.
PUT /wpcom/v2/sites/{wpcom_site}/media/videopress-playback-jwt/{guid} Get a VideoPress playback JWT · PUT /wpcom/v2/sites/{wpcom_site}/media/videopress-playback-jwt/{guid} #
Ask an LLM
“How do I get a playback link for a VideoPress video?”
“Can I issue a new JWT for a VideoPress file?”
Tell an agent
Create a playback JWT for VideoPress video {guid} on site {wpcom_site}.
Issue a new playback token for VideoPress file {guid} on site {wpcom_site}.
PATCH /wpcom/v2/sites/{wpcom_site}/media/videopress-playback-jwt/{guid} Update a VideoPress playback JWT · PATCH /wpcom/v2/sites/{wpcom_site}/media/videopress-playback-jwt/{guid} #
Ask an LLM
“How do I change an existing VideoPress playback JWT for a video?”
“Can I patch the VideoPress playback token of a video by its GUID?”
Tell an agent
Patch the VideoPress playback JWT of video {guid} on {wpcom_site}.
Update the VideoPress playback token for video {guid} on {wpcom_site} with a new value.
POST /wpcom/v2/sites/{wpcom_site}/media/videopress-privacy-details/{guid} Create privacy details for a VideoPress video · POST /wpcom/v2/sites/{wpcom_site}/media/videopress-privacy-details/{guid} #
Ask an LLM
“How do I create privacy details for a VideoPress video?”
“Can I set VideoPress privacy details for a new video?”
Tell an agent
Create privacy details for VideoPress video {guid} on site {wpcom_site}.
Add privacy settings to VideoPress video {guid}.
PUT /wpcom/v2/sites/{wpcom_site}/media/videopress-privacy-details/{guid} Set VideoPress privacy details · PUT /wpcom/v2/sites/{wpcom_site}/media/videopress-privacy-details/{guid} #
Ask an LLM
“How do I make a VideoPress video private?”
“Can I mark a VideoPress file as password-protected?”
Tell an agent
Set the privacy details of VideoPress video {guid} on site {wpcom_site}.
Mark VideoPress file {guid} on site {wpcom_site} as private.
PATCH /wpcom/v2/sites/{wpcom_site}/media/videopress-privacy-details/{guid} Update VideoPress privacy settings · PATCH /wpcom/v2/sites/{wpcom_site}/media/videopress-privacy-details/{guid} #
Ask an LLM
“Can I change the privacy of a VideoPress video after it is uploaded?”
“Is there a way to switch an existing VideoPress file from private to public?”
Tell an agent
Patch the privacy settings of VideoPress file {guid} on site {wpcom_site}.
Change the privacy of existing VideoPress video {guid} on site {wpcom_site}.
POST /wpcom/v2/sites/{wpcom_site}/media/videopress-upload-jwt Request a VideoPress upload JWT · POST /wpcom/v2/sites/{wpcom_site}/media/videopress-upload-jwt #
Ask an LLM
“How do I request a VideoPress upload JWT for a site?”
“Can I ask for a VideoPress upload token to upload videos?”
Tell an agent
Request a VideoPress upload JWT for site {wpcom_site}.
Ask for a VideoPress upload token for site {wpcom_site}.
PUT /wpcom/v2/sites/{wpcom_site}/media/videopress-upload-jwt Get a VideoPress upload JWT for a site · PUT /wpcom/v2/sites/{wpcom_site}/media/videopress-upload-jwt #
Ask an LLM
“How do I get a VideoPress upload JWT for my site?”
“Can I fetch a fresh VideoPress upload token for a site?”
Tell an agent
Get a VideoPress upload JWT for site {wpcom_site}.
Fetch a new VideoPress upload token for site {wpcom_site}.
PATCH /wpcom/v2/sites/{wpcom_site}/media/videopress-upload-jwt Rotate a VideoPress upload JWT · PATCH /wpcom/v2/sites/{wpcom_site}/media/videopress-upload-jwt #
Ask an LLM
“How do I rotate the VideoPress upload JWT for a site?”
“Can I replace an old VideoPress upload token with a new one?”
Tell an agent
Rotate the VideoPress upload JWT for site {wpcom_site}.
Replace the VideoPress upload token on site {wpcom_site}.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/automattic:automattic-media-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

automattic-media-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Automattic Media API
  x-derived-by: API Evangelist enrichment pipeline
  x-refined-note:
  - x-derived-from differs across the merged source definitions and was not carried
  version: '1.0'
  description: 'Operations tagged media across 4 of this provider''s published API definitions: automattic-wordpress-com-rest-v1-1-openapi.yml, automattic-wordpress-com-rest-v1-2-openapi.yml, automattic-wordpress-com-wp-v2-openapi.yml, automattic-wordpress-com-wpcom-v2-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://public-api.wordpress.com/rest/v1.1
- url: https://public-api.wordpress.com/rest/v1.2
- url: https://public-api.wordpress.com
security:
- bearerAuth: []
tags:


# --- truncated at 32 KB (78 KB total) ---
# Full source: https://artifacts.apis.io/automattic/openapi/automattic-media-api-openapi.yml