Skip to content

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

View user information data such as username, name, email, blog, and Gravatar.

ResourceDescription
GET/sites/$site/usersList the users of a site.
POST/sites/$site/users/$user_idUpdate details of a user of a site.
POST/sites/$site/invites/newInvite one or more users to your site.
GET/sites/$site/users/login:$user_idGet details of a user of a site by login.
POST/sites/$site/users/$user_ID/deleteDeletes or removes a user of a site.
GET/users/suggestGet a list of possible users to suggest for @mentions.
GET/meGet metadata about the current user.
GET/me/billing-historyGet 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/validateVerify strength of a user’s new password.
GET/me/settings/profile-links/Get current user’s profile links.
POST/me/settings/profile-links/newAdd a link to current user’s profile.
POST/me/settings/profile-links/$slug/deleteDelete a link from current user’s profile.
GET/me/connected-applications/Get current user’s connected applications.
GET/me/connected-applications/$IDGet one of current user’s connected applications.
POST/me/connected-applications/$ID/deleteDelete one of current user’s connected application access tokens.
GET/me/two-stepGet information about current user’s two factor configuration.
POST/me/two-step/sms/newSends a two-step code via SMS to the current user.
GET/me/likes/Get a list of the current user’s likes.

Sites

View general site information and options.

ResourceDescription
GET/sites/$site/shortcodes/renderGet a rendered shortcode for a site. Note: The current user must have publishing access.
GET/sites/$site/shortcodesGet a list of shortcodes available on a site. Note: The current user must have publishing access.
GET/sites/$site/embeds/renderGet a rendered embed for a site. Note: The current user must have publishing access.
GET/sites/$site/embedsGet a list of embeds available on a site. Note: The current user must have publishing access.
GET/sites/$siteGet information about a site.
GET/sites/$site/page-templatesGet a list of page templates supported by a site.
GET/sites/$site/post-typesGet a list of post types available for a site.
GET/sites/$site/post-counts/$post_typeGet number of posts in the post type groups by post status
GET/sites/$site/widgetsRetrieve the active and inactive widgets for a site.
POST/sites/$site/widgets/newActivate a widget on a site.
GET/sites/$site/wordads/settingsGet detailed WordAds settings information about a site.
POST/sites/$site/wordads/settingsUpdate WordAds settings for a site.
GET/sites/$site/wordads/earningsGet detailed WordAds earnings information about a site.
GET/sites/$site/wordads/tosGet WordAds TOS information about a site.
POST/sites/$site/wordads/tosUpdate WordAds TOS setting for a site.
POST/sites/$site/wordads/approveRequest streamlined approval to join the WordAds program.
GET/sites/$site/wordads/statsGet WordAds stats for a site
GET/me/sitesGet a list of the current user’s sites.
GET/me/sites/featuresGet a list of the current user’s sites features
GET/me/sites/pluginsGet a list of the current user’s sites plugins
POST/sites/$site/searchSearch within a site using an Elasticsearch Query API.
GET/sites/$site/widgets/widget:$idRetrieve a widget on a site by its ID.
POST/sites/$site/widgets/widget:$idUpdate a widget on a site by its ID.
POST/sites/$site/widgets/widget:$id/deleteDeactivate a widget on a site by its ID. Will delete if already deactivated.
GET/sites/$site/headers/$theme_slugGet the custom header options for a site with a particular theme.
GET/sites/$site/headers/mineGet the custom header options for a site.
POST/sites/$site/headers/mineSet the custom header options for a site.

Posts

View and manage posts including reblogs and likes.

ResourceDescription
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_IDGet a single post (by ID).
POST/sites/$site/posts/$post_IDEdit a post.
GET/sites/$site/posts/slug:$post_slugGet a single post (by slug).
GET/sites/$site/posts/Get a list of matching posts.
POST/sites/$site/posts/newCreate a post.
POST/sites/$site/posts/$post_ID/deleteDelete 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/restoreRestore a post or page from the trash to its previous status.
POST/sites/$site/posts/deleteDelete 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/restoreRestore multiple posts.
GET/me/postsGet 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/newLike a post.
POST/sites/$site/posts/$post_ID/likes/mine/deleteUnlike 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/mineGet subscription status of the specified post for the current user.
POST/sites/$site/posts/$post/subscribers/newSubscribe current user to be notified of the specified post’s comments.
POST/sites/$site/posts/$post/subscribers/mine/updateSubscribe current user to be notified of the specified post’s comments.
POST/sites/$site/posts/$post/subscribers/mine/deleteUnsubscribe the current user from the specified post.
POST/sites/$site/posts/$post_ID/reblogs/newReblog a post.
GET/sites/$site/posts/$post_ID/reblogs/mineGet reblog status for a post.
POST/sites/$site/posts/$post/relatedSearch within a site for related posts.

Comments

View and manage a post’s comments.

ResourceDescription
GET/sites/$site/comments/$comment_IDGet a single comment.
POST/sites/$site/comments/$comment_IDEdit 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/newCreate a comment on a post.
POST/sites/$site/comments/$comment_ID/replies/newCreate a comment as a reply to another comment.
POST/sites/$site/comments/$comment_ID/deleteDelete a comment.
GET/sites/$site/comment-countsGet comment counts for each available status
GET/sites/$site/comment-history/$comment_IDGet 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/newLike a comment.
POST/sites/$site/comments/$comment_ID/likes/mine/deleteRemove your like from a comment.
GET/sites/$site/comments/$comment_ID/likes/mine/Get your like status for a comment.
GET/kill-switch/comment-likesKill comment likes

Taxonomy

View and manage a site’s tags and categories.

ResourceDescription
GET/sites/$site/categoriesGet a list of a site’s categories.
GET/sites/$site/tagsGet a list of a site’s tags.
GET/sites/$site/categories/slug:$categoryGet information about a single category.
POST/sites/$site/categories/slug:$categoryEdit a category.
GET/sites/$site/tags/slug:$tagGet information about a single tag.
POST/sites/$site/tags/slug:$tagEdit a tag.
GET/sites/$site/taxonomies/$taxonomy/terms/slug:$slugGet information about a single term.
POST/sites/$site/taxonomies/$taxonomy/terms/slug:$slugEdit a term.
GET/sites/$site/post-types/$post_type/taxonomiesGet a list of taxonomies associated with a post type.
GET/sites/$site/taxonomies/$taxonomy/termsGet a list of a site’s terms by taxonomy.
POST/sites/$site/categories/newCreate a new category.
POST/sites/$site/tags/newCreate a new tag.
POST/sites/$site/categories/slug:$category/deleteDelete a category.
POST/sites/$site/tags/slug:$tag/deleteDelete a tag.
POST/sites/$site/taxonomies/$taxonomy/terms/newCreate a new term.
POST/sites/$site/taxonomies/$taxonomy/terms/slug:$slug/deleteDelete a term.

Follow

Follow and unfollow blogs.

ResourceDescription
GET/sites/$site/follows/List a site’s followers in reverse chronological order.
POST/sites/$site/follows/newFollow a blog.
POST/sites/$site/follows/mine/deleteUnfollow a blog.
GET/sites/$site/follows/mineGet blog following status for the current user.

Sharing

Connect social media services to automatically share new posts and manage sharing buttons on a site.

ResourceDescription
GET/sites/$site/sharing-buttons/Get a list of a site’s sharing buttons.
POST/sites/$site/sharing-buttonsEdit 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/$serviceGet 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_IDGet a single publicize connection that the current user has set up.
POST/me/publicize-connections/$publicize_connection_IDUpdate a single publicize connection belonging to the current user.
POST/me/publicize-connections/$publicize_connection_ID/deleteDelete 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_IDGet a single Keyring connection that the current user has setup.
POST/me/keyring-connections/$keyring_connection_ID/deleteDelete 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_IDGet a single publicize connection that is associated with the specified site.
POST/sites/$site/publicize-connections/$publicize_connection_IDUpdate a single publicize connection belonging to the specified site.
POST/sites/$site/publicize-connections/newCreate a new publicize connection that is associated with the specified site.
POST/sites/$site/publicize-connections/$publicize_connection_ID/deleteDelete the specified publicize connection.
GET/meta/sharing-buttonsGet a list of external services for which sharing buttons are supported.

Freshly Pressed

View Freshly Pressed posts from the WordPress.com homepage.

ResourceDescription
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

View and manage a user’s notifications.

ResourceDescription
POST/notifications/seenSet the timestamp of the most recently seen notification.
POST/notifications/readMark a set of notifications as read.

Insights

View analytics for your application.

ResourceDescription
GET/insightsGet a list of stats/metrics/insights that the current user has access to.
GET/insights/$slugGet raw data for a particular graph.

Reader

Manage and view a user’s subscriptions to the WordPress.com Reader.

ResourceDescription
GET/read/menu/Get default reader menu.
GET/read/feed/$feed_url_or_idGet details about a feed.
GET/read/sites/$site/posts/$post_IDGet 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/postsGet a list of posts from a tag.
GET/read/tagsGet a list of tags subscribed to by the user.
GET/read/tags/alphabeticGet a filtered list of top tags, grouped by letter.
GET/read/trending/tagsGet a list of trending tags.
GET/read/tags/$tagGet details about a specified tag.
GET/read/tags/$tag/mineGet the subscribed status of the user to a given tag.
POST/read/tags/$tag/mine/newSubscribe to a new tag.
POST/read/tags/$tag/mine/deleteUnsubscribe from a tag.
GET/read/following/mineGet a list of the feeds the user is following.
POST/read/following/mine/newFollow the specified blog.
POST/read/following/mine/deleteUnfollow 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

View stats for a site.

ResourceDescription
GET/sites/$site/stats/highlightsView highlight metrics from the last seven days.
GET/sites/$site/statsGet a site’s stats
GET/sites/$site/stats/summaryView a site’s summarized views, visitors, likes and comments
GET/sites/$site/stats/top-postsView a site’s top posts and pages by views
GET/sites/$site/stats/video/$post_idView the details of a single video
GET/sites/$site/stats/referrersView a site’s referrers
GET/sites/$site/stats/clicksView a site’s outbound clicks
GET/sites/$site/stats/tagsView a site’s views by tags and categories
GET/sites/$site/stats/top-authorsView a site’s top authors
GET/sites/$site/stats/commentsView a site’s top comment authors and most-commented posts
GET/sites/$site/stats/video-playsView a site’s video plays
GET/sites/$site/stats/file-downloadsView a site’s file downloads
GET/sites/$site/stats/post/$post_idView a post’s views
GET/sites/$site/stats/country-viewsView a site’s views by country
GET/sites/$site/stats/followersView a site’s followers
GET/sites/$site/stats/comment-followersView a site’s comment followers
POST/sites/$site/stats/referrers/spam/newReport a referrer as spam
POST/sites/$site/stats/referrers/spam/deleteUnreport a referrer as spam
GET/sites/$site/stats/publicizeView a site’s publicize follower counts
GET/sites/$site/stats/search-termsView search terms used to find the site
GET/sites/$site/stats/views/postsView the total number of views for each post.
GET/sites/$site/stats/emails/summaryView the total number of email opens and clicks for each post.
GET/sites/$site/stats/opens/emails/summaryView the total number of email opens for each post.
GET/sites/$site/stats/opens/emails/$post_idView multiple stats related to email opens by post.
GET/sites/$site/stats/opens/emails/$post_id/clientView email opens stats by client.
GET/sites/$site/stats/opens/emails/$post_id/countryView email opens stats by country.
GET/sites/$site/stats/opens/emails/$post_id/deviceView email opens stats by device.
GET/sites/$site/stats/opens/emails/$post_id/rateView email opens rate by post.
GET/sites/$site/stats/clicks/emails/$post_idView chart stats related to email clicks by period.
GET/sites/$site/stats/clicks/emails/$post_id/rateView email clicks rate by post. Returns mock data.
GET/sites/$site/stats/clicks/emails/$post_id/countryView email clicks by country.
GET/sites/$site/stats/clicks/emails/$post_id/deviceView email clicks by device.
GET/sites/$site/stats/clicks/emails/$post_id/clientView email clicks by client.
GET/sites/$site/stats/clicks/emails/$post_id/linkView email clicks by link.
GET/sites/$site/stats/clicks/emails/$post_id/user-content-linkView email clicks by user content link.
GET/sites/$site/stats/clicks/emails/summaryView the total number of email clicks for each post.
GET/sites/$site/stats/utm/$utm_param_nameFetch site’s UTM param statistics.
GET/sites/$site/stats/utm/$utm_param_name/top_postsFetch top posts for a given UTM parameter value.
GET/sites/$site/stats/streakGet stats for Calendar Heatmap. Returns data with each post timestamp.

Media

Manage a site’s media library.

ResourceDescription
POST/sites/$site/media/$media_ID/deleteDelete a piece of media. Note: Media is deleted and not trashed.
GET/sites/$site/media/$media_IDGet a single media item (by ID).
POST/sites/$site/media/$media_IDEdit basic information about a media item.
GET/sites/$site/media/Get a list of items in the media library.
POST/sites/$site/media/newUpload a new piece of media.
POST/sites/$site/media/$media_ID/editEdit a media item.

Menus

View and manage a site’s menus.

ResourceDescription
POST/sites/$site/menus/newCreate a new navigation menu.
POST/sites/$site/menus/$menu_idUpdate a navigation menu.
GET/sites/$site/menus/$menu_idGet a single navigation menu.
GET/sites/$site/menusGet a list of all navigation menus.
POST/sites/$site/menus/$menu_id/deleteDelete a navigation menu

Batch

Batch several API GET requests into one.

ResourceDescription
GET/batch/Run several GET endpoints and return them as an array.

Videos

View video information.

ResourceDescription
GET/videos/$guidGet the metadata for a specified VideoPress video.
GET/videos/$guid/posterGet the poster for a specified VideoPress video.
POST/videos/$guid/posterUpload and set a poster for a specified VideoPress video.
GET/videos/$guid/chaptersGet the chapters for a specified VideoPress video.
GET/videos/$guid/playlist/$formatGet the poster for a specified VideoPress video.
POST/videos/$guid/tracksUpload a subtitle/caption track for a specified VideoPress video.
POST/videos/$guid/tracks/deleteDelete an existing subtitle/caption track for a specified VideoPress video.

Agencies

Manage agency sites and tools.

ResourceDescription
GET /wpcom/v2/agency/$agency_id/sitesGet a list of sites managed by the agency.
GET /wpcom/v2/agency/$agency_id/sites/pendingGet a list of sites that are available for provision.
POST /wpcom/v2/agency/$agency_id/sites/$site_id/provisionProvision of a new site for the agency.
GET /wpcom/v2/sites/$wpcom_site/staging-siteRetrieves the staging site associated with a specified production site.
POST /wpcom/v2/sites/$wpcom_site/staging-siteCreates a staging site for an existing site.
DELETE /wpcom/v2/sites/$wpcom_site/staging-site/$staging_site_idDeletes the staging site associated with the specified production site.
GET /sites/$site/automated-transfers/statusReturns the current status of Automated Transfer for a site.

GitHub Deployments

Deploy code on WordPress.com infrastructure.

ResourceDescription
GET /hosting/github/installationsReturn a list of installations that a GitHub user has access to through app installations.
GET /hosting/github/repositoriesGet a list of repositories and their external_repository_ids.
GET /sites/$wpcom_site/hosting/code-deploymentsGet a list of site code deployments configured for this site.
POST /sites/$wpcom_site/hosting/code-deploymentsCreate or update a deployment configuration for this site.
DELETE /wpcom/v2/sites/$wpcom_site/hosting/code-deployments/$deployment_idDelete a deployment configuration for a site.
GET /wpcom/v2/sites/$wpcom_site/hosting/code-deployments/$deployment_id/runsGet code deployment runs.
POST /sites/$wpcom_site/hosting/code-deployments/$deployment_id/runsInitiate 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

Create and manage SSH access to WordPress.com servers.

ResourceDescription
GET /wpcom/v2/sites/$wpcom_site/hosting/ssh-usersGet SSH users for a site.
POST /wpcom/v2/sites/$wpcom_site/hosting/ssh-userCreate an SSH user for a site.
POST /wpcom/v2/sites/$wpcom_site/hosting/ssh-user/$ssh_user/reset-passwordRotate the SSH user password and return it.
GET /wpcom/v2/sites/$wpcom_site/hosting/ssh-accessGets the SSH access setting type for a site.
POST /wpcom/v2/sites/$wpcom_site/hosting/ssh-accessSets the SSH access setting for a site.
GET /wpcom/v2/sites/$wpcom_site/hosting/ssh-keysGet SSH keys for a site.
POST /wpcom/v2/sites/$wpcom_site/hosting/ssh-keysAttach a new SSH key to a site.
DELETE /wpcom/v2/sites/$wpcom_site/hosting/ssh-keys/$user_name/$nameDetach an SSH key from a site.

Last updated: June 12, 2024