REST API
REST API
Welcome to the WordPress.com REST API. Below, you’ll find a full listing of all the
available endpoints. As we add more endpoints, they will be automatically
documented here and available through the Developer Console.
If you’re not sure how to make calls to the API, you might want to check out the
Getting Started guide or the walkthrough on authentication.
For more information about a particular endpoint, click on its name under the
Resource header. You’ll be taken to the endpoint’s documentation page, which
includes what query parameters the endpoint will accept, what the JSON object’s
parameters will be in the response, and an example query/response.
If you’re looking for the WordPress REST API that shipped as part of WordPress core
in version 4.7, see its documentation. Note that this API is also enabled on
WordPress.com, but the URL structure on WordPress.com is slightly different than
for self-hosted sites. See this post for more details.
Users
Top ↑
View user information data such as username, name, email, blog, and Gravatar.
Resource Description
GET/sites/$site/users List the users of a site.
POST/sites/$site/users/$user_id Update details of a user of a site.
POST/sites/$site/invites/new Invite one or more users to your site.
GET/sites/$site/users/login:$user_id Get details of a user of a site by login.
POST/sites/$site/users/$user_ID/delete Deletes or removes a user of a site.
GET/users/suggest Get a list of possible users to suggest for @mentions.
GET/me Get metadata about the current user.
GET/me/billing-history Get list of current user’s billing history and upcoming
charges.
GET/me/settings/ Get the current user’s settings.
POST/me/settings/ Update the current user’s settings.
GET/me/preferences/ Get the current user’s settings.
POST/me/preferences/ Update the current user’s preferences.
POST/me/settings/password/validate Verify strength of a user’s new password.
GET/me/settings/profile-links/ Get current user’s profile links.
POST/me/settings/profile-links/new Add a link to current user’s profile.
POST/me/settings/profile-links/$slug/delete Delete a link from current user’s
profile.
GET/me/connected-applications/ Get current user’s connected applications.
GET/me/connected-applications/$ID Get one of current user’s connected
applications.
POST/me/connected-applications/$ID/delete Delete one of current user’s connected
application access tokens.
GET/me/two-step Get information about current user’s two factor configuration.
POST/me/two-step/sms/new Sends a two-step code via SMS to the current user.
GET/me/likes/ Get a list of the current user’s likes.
Sites
Top ↑
View general site information and options.
Resource Description
GET/sites/$site/shortcodes/render Get a rendered shortcode for a site. Note: The
current user must have publishing access.
GET/sites/$site/shortcodes Get a list of shortcodes available on a site. Note:
The current user must have publishing access.
GET/sites/$site/embeds/render Get a rendered embed for a site. Note: The current
user must have publishing access.
GET/sites/$site/embeds Get a list of embeds available on a site. Note: The current
user must have publishing access.
GET/sites/$site Get information about a site.
GET/sites/$site/page-templates Get a list of page templates supported by a
site.
GET/sites/$site/post-types Get a list of post types available for a site.
GET/sites/$site/post-counts/$post_type Get number of posts in the post type
groups by post status
GET/sites/$site/widgets Retrieve the active and inactive widgets for a site.
POST/sites/$site/widgets/new Activate a widget on a site.
GET/sites/$site/wordads/settings Get detailed WordAds settings information about
a site.
POST/sites/$site/wordads/settings Update WordAds settings for a site.
GET/sites/$site/wordads/earnings Get detailed WordAds earnings information about
a site.
GET/sites/$site/wordads/tos Get WordAds TOS information about a site.
POST/sites/$site/wordads/tos Update WordAds TOS setting for a site.
POST/sites/$site/wordads/approve Request streamlined approval to join the
WordAds program.
GET/sites/$site/wordads/stats Get WordAds stats for a site
GET/me/sites Get a list of the current user’s sites.
GET/me/sites/features Get a list of the current user’s sites features
GET/me/sites/plugins Get a list of the current user’s sites plugins
POST/sites/$site/search Search within a site using an Elasticsearch Query API.
GET/sites/$site/widgets/widget:$id Retrieve a widget on a site by its ID.
POST/sites/$site/widgets/widget:$id Update a widget on a site by its ID.
POST/sites/$site/widgets/widget:$id/delete Deactivate a widget on a site by
its ID. Will delete if already deactivated.
GET/sites/$site/headers/$theme_slug Get the custom header options for a site with a
particular theme.
GET/sites/$site/headers/mine Get the custom header options for a site.
POST/sites/$site/headers/mine Set the custom header options for a site.
Posts
Top ↑
View and manage posts including reblogs and likes.
Resource Description
GET/sites/$site/dropdown-pages/ Get a list of pages to be displayed as options
in a select-a-page-dropdown.
GET/sites/$site/posts/$post_ID Get a single post (by ID).
POST/sites/$site/posts/$post_ID Edit a post.
GET/sites/$site/posts/slug:$post_slug Get a single post (by slug).
GET/sites/$site/posts/ Get a list of matching posts.
POST/sites/$site/posts/new Create a post.
POST/sites/$site/posts/$post_ID/delete Delete a post. Note: If the trash is
enabled, this request will send the post to the trash. A second request will
permanently delete the post.
POST/sites/$site/posts/$post_ID/restore Restore a post or page from the trash to
its previous status.
POST/sites/$site/posts/delete Delete multiple posts. Note: If the trash is enabled,
this request will send non-trashed posts to the trash. Trashed posts will be
permanently deleted.
POST/sites/$site/posts/restore Restore multiple posts.
GET/me/posts Get a list of posts across all the user’s sites.
GET/sites/$site/posts/$post_ID/likes/ Get a list of the likes for a post.
POST/sites/$site/posts/$post_ID/likes/new Like a post.
POST/sites/$site/posts/$post_ID/likes/mine/delete Unlike a post.
GET/sites/$site/posts/$post_ID/likes/mine/ Get the current user’s like status
for a post.
GET/sites/$site/posts/$post/subscribers/ Get a list of the specified post’s
subscribers.
GET/sites/$site/posts/$post/subscribers/mine Get subscription status of the
specified post for the current user.
POST/sites/$site/posts/$post/subscribers/new Subscribe current user to be
notified of the specified post’s comments.
POST/sites/$site/posts/$post/subscribers/mine/update Subscribe current user to be
notified of the specified post’s comments.
POST/sites/$site/posts/$post/subscribers/mine/delete Unsubscribe the current user
from the specified post.
POST/sites/$site/posts/$post_ID/reblogs/new Reblog a post.
GET/sites/$site/posts/$post_ID/reblogs/mine Get reblog status for a post.
POST/sites/$site/posts/$post/related Search within a site for related posts.
Comments
Top ↑
View and manage a post’s comments.
Resource Description
GET/sites/$site/comments/$comment_ID Get a single comment.
POST/sites/$site/comments/$comment_ID Edit a comment.
GET/sites/$site/comments/ Get a list of recent comments.
GET/sites/$site/posts/$post_ID/replies/ Get a list of recent comments on a post.
POST/sites/$site/posts/$post_ID/replies/new Create a comment on a post.
POST/sites/$site/comments/$comment_ID/replies/new Create a comment as a reply
to another comment.
POST/sites/$site/comments/$comment_ID/delete Delete a comment.
GET/sites/$site/comment-counts Get comment counts for each available status
GET/sites/$site/comment-history/$comment_ID Get the audit history for given
comment
GET/sites/$site/comments/$comment_ID/likes/ Get the likes for a comment.
POST/sites/$site/comments/$comment_ID/likes/new Like a comment.
POST/sites/$site/comments/$comment_ID/likes/mine/delete Remove your like from a
comment.
GET/sites/$site/comments/$comment_ID/likes/mine/ Get your like status for a
comment.
GET/kill-switch/comment-likes Kill comment likes
Taxonomy
Top ↑
View and manage a site’s tags and categories.
Resource Description
GET/sites/$site/categories Get a list of a site’s categories.
GET/sites/$site/tags Get a list of a site’s tags.
GET/sites/$site/categories/slug:$category Get information about a single category.
POST/sites/$site/categories/slug:$category Edit a category.
GET/sites/$site/tags/slug:$tag Get information about a single tag.
POST/sites/$site/tags/slug:$tag Edit a tag.
GET/sites/$site/taxonomies/$taxonomy/terms/slug:$slug Get information about a
single term.
POST/sites/$site/taxonomies/$taxonomy/terms/slug:$slug Edit a term.
GET/sites/$site/post-types/$post_type/taxonomies Get a list of taxonomies
associated with a post type.
GET/sites/$site/taxonomies/$taxonomy/terms Get a list of a site’s terms by
taxonomy.
POST/sites/$site/categories/new Create a new category.
POST/sites/$site/tags/new Create a new tag.
POST/sites/$site/categories/slug:$category/delete Delete a category.
POST/sites/$site/tags/slug:$tag/delete Delete a tag.
POST/sites/$site/taxonomies/$taxonomy/terms/new Create a new term.
POST/sites/$site/taxonomies/$taxonomy/terms/slug:$slug/delete Delete a term.
Follow
Top ↑
Follow and unfollow blogs.
Resource Description
GET/sites/$site/follows/ List a site’s followers in reverse chronological
order.
POST/sites/$site/follows/new Follow a blog.
POST/sites/$site/follows/mine/delete Unfollow a blog.
GET/sites/$site/follows/mine Get blog following status for the current user.
Sharing
Top ↑
Connect social media services to automatically share new posts and manage sharing
buttons on a site.
Resource Description
GET/sites/$site/sharing-buttons/ Get a list of a site’s sharing buttons.
POST/sites/$site/sharing-buttons Edit all sharing buttons for a site.
GET/meta/external-services/ Get a list of third-party services that WordPress.com
or Jetpack sites can integrate with via keyring.
GET/meta/external-services/$service Get information about a single external service
that WordPress.com or Jetpack sites can integrate with via keyring.
GET/me/publicize-connections/ Get a list of publicize connections that the current
user has set up.
GET/me/publicize-connections/$publicize_connection_ID Get a single publicize
connection that the current user has set up.
POST/me/publicize-connections/$publicize_connection_ID Update a single
publicize connection belonging to the current user.
POST/me/publicize-connections/$publicize_connection_ID/delete Delete the
specified publicize connection.
GET/me/keyring-connections/ Get a list of all the keyring connections associated
with the current user.
GET/me/keyring-connections/$keyring_connection_ID Get a single Keyring
connection that the current user has setup.
POST/me/keyring-connections/$keyring_connection_ID/delete Delete the Keyring
connection (and associated token) with the provided ID. Also deletes all associated
publicize connections.
GET/sites/$site/publicize-connections/ Get a list of publicize connections that
are associated with the specified site.
GET/sites/$site/publicize-connections/$publicize_connection_ID Get a single
publicize connection that is associated with the specified site.
POST/sites/$site/publicize-connections/$publicize_connection_ID Update a single
publicize connection belonging to the specified site.
POST/sites/$site/publicize-connections/new Create a new publicize connection
that is associated with the specified site.
POST/sites/$site/publicize-connections/$publicize_connection_ID/delete Delete the
specified publicize connection.
GET/meta/sharing-buttons Get a list of external services for which sharing
buttons are supported.
Freshly Pressed
Top ↑
View Freshly Pressed posts from the WordPress.com homepage.
Resource Description
GET/freshly-pressed/ Get a list of Freshly Pressed posts. (Note: Freshly Pressed
has been retired. Please visit https://discover.wordpress.com to get the best
content published across our network.)
Notifications
Top ↑
View and manage a user’s notifications.
Resource Description
POST/notifications/seen Set the timestamp of the most recently seen notification.
POST/notifications/read Mark a set of notifications as read.
Insights
Top ↑
View analytics for your application.
Resource Description
GET/insights Get a list of stats/metrics/insights that the current user has
access to.
GET/insights/$slug Get raw data for a particular graph.
Reader
Top ↑
Manage and view a user’s subscriptions to the WordPress.com Reader.
Resource Description
GET/read/menu/ Get default reader menu.
GET/read/feed/$feed_url_or_id Get details about a feed.
GET/read/sites/$site/posts/$post_ID Get a single post (by ID).
GET/read/following/ Get a list of posts from the blogs a user follows.
GET/read/liked/ Get a list of posts from the blogs a user likes.
GET/read/tags/$tag/posts Get a list of posts from a tag.
GET/read/tags Get a list of tags subscribed to by the user.
GET/read/tags/alphabetic Get a filtered list of top tags, grouped by letter.
GET/read/trending/tags Get a list of trending tags.
GET/read/tags/$tag Get details about a specified tag.
GET/read/tags/$tag/mine Get the subscribed status of the user to a given tag.
POST/read/tags/$tag/mine/new Subscribe to a new tag.
POST/read/tags/$tag/mine/delete Unsubscribe from a tag.
GET/read/following/mine Get a list of the feeds the user is following.
POST/read/following/mine/new Follow the specified blog.
POST/read/following/mine/delete Unfollow the specified blog.
GET/read/feed/ Get the ID and subscribe URL of one or more matching feeds by
domain or URL.
GET/read/email-settings/ Returns the email settings
POST/read/email-settings/ Returns the email settings
GET/read/subscriptions-count/ Returns the number of blog, comment and pending
subscriptions.
GET/read/recommendations/mine/ Get a list of blog recommendations for the
current user.
Stats
Top ↑
View stats for a site.
Resource Description
GET/sites/$site/stats/highlights View highlight metrics from the last seven
days.
GET/sites/$site/stats Get a site’s stats
GET/sites/$site/stats/summary View a site’s summarized views, visitors, likes and
comments
GET/sites/$site/stats/top-posts View a site’s top posts and pages by views
GET/sites/$site/stats/video/$post_id View the details of a single video
GET/sites/$site/stats/referrers View a site’s referrers
GET/sites/$site/stats/clicks View a site’s outbound clicks
GET/sites/$site/stats/tags View a site’s views by tags and categories
GET/sites/$site/stats/top-authors View a site’s top authors
GET/sites/$site/stats/comments View a site’s top comment authors and most-
commented posts
GET/sites/$site/stats/video-plays View a site’s video plays
GET/sites/$site/stats/file-downloads View a site’s file downloads
GET/sites/$site/stats/post/$post_id View a post’s views
GET/sites/$site/stats/country-views View a site’s views by country
GET/sites/$site/stats/followers View a site’s followers
GET/sites/$site/stats/comment-followers View a site’s comment followers
POST/sites/$site/stats/referrers/spam/new Report a referrer as spam
POST/sites/$site/stats/referrers/spam/delete Unreport a referrer as spam
GET/sites/$site/stats/publicize View a site’s publicize follower counts
GET/sites/$site/stats/search-terms View search terms used to find the site
GET/sites/$site/stats/views/posts View the total number of views for each post.
GET/sites/$site/stats/emails/summary View the total number of email opens and
clicks for each post.
GET/sites/$site/stats/opens/emails/summary View the total number of email
opens for each post.
GET/sites/$site/stats/opens/emails/$post_id View multiple stats related to
email opens by post.
GET/sites/$site/stats/opens/emails/$post_id/client View email opens stats by
client.
GET/sites/$site/stats/opens/emails/$post_id/country View email opens stats by
country.
GET/sites/$site/stats/opens/emails/$post_id/device View email opens stats by
device.
GET/sites/$site/stats/opens/emails/$post_id/rate View email opens rate by
post.
GET/sites/$site/stats/clicks/emails/$post_id View chart stats related to email
clicks by period.
GET/sites/$site/stats/clicks/emails/$post_id/rate View email clicks rate by
post. Returns mock data.
GET/sites/$site/stats/clicks/emails/$post_id/country View email clicks by country.
GET/sites/$site/stats/clicks/emails/$post_id/device View email clicks by device.
GET/sites/$site/stats/clicks/emails/$post_id/client View email clicks by client.
GET/sites/$site/stats/clicks/emails/$post_id/link View email clicks by link.
GET/sites/$site/stats/clicks/emails/$post_id/user-content-link View email clicks
by user content link.
GET/sites/$site/stats/clicks/emails/summary View the total number of email
clicks for each post.
GET/sites/$site/stats/utm/$utm_param_name Fetch site’s UTM param statistics.
GET/sites/$site/stats/utm/$utm_param_name/top_posts Fetch top posts for a given
UTM parameter value.
GET/sites/$site/stats/streak Get stats for Calendar Heatmap. Returns data with
each post timestamp.
Media
Top ↑
Manage a site’s media library.
Resource Description
POST/sites/$site/media/$media_ID/delete Delete a piece of media. Note: Media is
deleted and not trashed.
GET/sites/$site/media/$media_ID Get a single media item (by ID).
POST/sites/$site/media/$media_ID Edit basic information about a media item.
GET/sites/$site/media/ Get a list of items in the media library.
POST/sites/$site/media/new Upload a new piece of media.
POST/sites/$site/media/$media_ID/edit Edit a media item.
Menus
Top ↑
View and manage a site’s menus.
Resource Description
POST/sites/$site/menus/new Create a new navigation menu.
POST/sites/$site/menus/$menu_id Update a navigation menu.
GET/sites/$site/menus/$menu_id Get a single navigation menu.
GET/sites/$site/menus Get a list of all navigation menus.
POST/sites/$site/menus/$menu_id/delete Delete a navigation menu
Batch
Top ↑
Batch several API GET requests into one.
Resource Description
GET/batch/ Run several GET endpoints and return them as an array.
Videos
Top ↑
View video information.
Resource Description
GET/videos/$guid Get the metadata for a specified VideoPress video.
GET/videos/$guid/poster Get the poster for a specified VideoPress video.
POST/videos/$guid/poster Upload and set a poster for a specified VideoPress
video.
GET/videos/$guid/chapters Get the chapters for a specified VideoPress video.
GET/videos/$guid/playlist/$format Get the poster for a specified VideoPress
video.
POST/videos/$guid/tracks Upload a subtitle/caption track for a specified
VideoPress video.
POST/videos/$guid/tracks/delete Delete an existing subtitle/caption track for a
specified VideoPress video.
Agencies
Top ↑
Manage agency sites and tools.
Resource Description
GET /wpcom/v2/agency/$agency_id/sites Get a list of sites managed by the
agency.
GET /wpcom/v2/agency/$agency_id/sites/pending Get a list of sites that are
available for provision.
POST /wpcom/v2/agency/$agency_id/sites/$site_id/provision Provision of a new site
for the agency.
GET /wpcom/v2/sites/$wpcom_site/staging-site Retrieves the staging site
associated with a specified production site.
POST /wpcom/v2/sites/$wpcom_site/staging-site Creates a staging site for an
existing site.
DELETE /wpcom/v2/sites/$wpcom_site/staging-site/$staging_site_id Deletes the
staging site associated with the specified production site.
GET /sites/$site/automated-transfers/status Returns the current status of
Automated Transfer for a site.
GitHub Deployments
Top ↑
Deploy code on WordPress.com infrastructure.
Resource Description
GET /hosting/github/installations Return a list of installations that a GitHub
user has access to through app installations.
GET /hosting/github/repositories Get a list of repositories and their
external_repository_ids.
GET /sites/$wpcom_site/hosting/code-deployments Get a list of site code deployments
configured for this site.
POST /sites/$wpcom_site/hosting/code-deployments Create or update a deployment
configuration for this site.
DELETE /wpcom/v2/sites/$wpcom_site/hosting/code-deployments/$deployment_id Delete
a deployment configuration for a site.
GET /wpcom/v2/sites/$wpcom_site/hosting/code-deployments/$deployment_id/runs Get
code deployment runs.
POST /sites/$wpcom_site/hosting/code-deployments/$deployment_id/runs Initiate a
manual deployment run of a code using its deployment_id.
GET /sites/$wpcom_site/hosting/code-deployments/$deployment_id/
runs/$deployment_run_id/logs Get the logs for a deployment run of a code using its
deployment_id and deployment_run_id.
SSH Management
Top ↑
Create and manage SSH access to WordPress.com servers.
Resource Description
GET /wpcom/v2/sites/$wpcom_site/hosting/ssh-users Get SSH users for a site.
POST /wpcom/v2/sites/$wpcom_site/hosting/ssh-user Create an SSH user for a
site.
POST /wpcom/v2/sites/$wpcom_site/hosting/ssh-user/$ssh_user/reset-password Rotate
the SSH user password and return it.
GET /wpcom/v2/sites/$wpcom_site/hosting/ssh-access Gets the SSH access setting
type for a site.
POST /wpcom/v2/sites/$wpcom_site/hosting/ssh-access Sets the SSH access setting
for a site.
GET /wpcom/v2/sites/$wpcom_site/hosting/ssh-keys Get SSH keys for a site.
POST /wpcom/v2/sites/$wpcom_site/hosting/ssh-keys Attach a new SSH key to a
site.
DELETE /wpcom/v2/sites/$wpcom_site/hosting/ssh-keys/$user_name/$name Detach an
SSH key from a site.
Last updated: June 12, 2024