WordPress.com REST API v1.2

Additive alternate version of the WordPress.com REST API. Publishes only the 38 endpoints whose contract differs from v1.1; clients mix versions per endpoint rather than migrating wholesale.

OpenAPI Specification

automattic-wordpress-com-rest-v1-2-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: WordPress.com REST API v1.2
  version: v1.2
  description: 'The WordPress.com REST API, operated by Automattic. Derived by API Evangelist from Automattic''s
    own self-describing help document at https://public-api.wordpress.com/rest/v1.2/help (Accept: application/json),
    which publishes every endpoint''s method, path, description, path/query/body parameters and response fields.
    Security schemes come from https://public-api.wordpress.com/.well-known/openid-configuration. The error envelope
    was observed live.'
  termsOfService: https://wordpress.com/tos/
  contact:
    name: WordPress.com Developer Resources
    url: https://developer.wordpress.com/docs/api/
  x-derived-from: https://public-api.wordpress.com/rest/v1.2/help
  x-derived-by: API Evangelist enrichment pipeline
servers:
- url: https://public-api.wordpress.com/rest/v1.2
tags:
- name: alternates
- name: batch
- name: comments
- name: comments-tree
- name: media
- name: posts
- name: read
- name: sites
- name: tests
- name: users
paths:
  /batch/:
    get:
      operationId: getBatch
      summary: Run several GET endpoints and return them as an array.
      description: Run several GET endpoints and return them as an array.
      tags:
      - batch
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authorization required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      parameters:
      - name: http_envelope
        in: query
        required: false
        schema:
          type: boolean
        description: 'false: (default); true: Some environments (like in-browser JavaScript or Flash) block or divert
          responses with a non-200 HTTP status code.  Setting this parameter will force the HTTP status code to
          always be 200.  The JSON response is wrapped in an "envelope" containing the "real" HTTP status code and
          headers.'
      - name: pretty
        in: query
        required: false
        schema:
          type: boolean
        description: 'false: (default); true: Output pretty JSON'
      - name: meta
        in: query
        required: false
        schema:
          type: string
        description: 'Optional. Loads data from the endpoints found in the ''meta'' part of the response. Comma-separated
          list. Example: meta=site,likes'
      - name: fields
        in: query
        required: false
        schema:
          type: string
        description: 'Optional. Returns specified fields only. Comma-separated list. Example: fields=ID,title'
      - name: callback
        in: query
        required: false
        schema:
          type: string
        description: An optional JSONP callback function.
      - name: urls
        in: query
        required: false
        schema:
          type: array
          items: {}
        description: Array of endpoints to call
  /me/settings/profile-links/new:
    post:
      operationId: postMeSettingsProfileLinksNew
      summary: Add one or more links to current user's profile.
      description: Add one or more links to current user's profile.
      tags:
      - users
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  added:
                    type: array
                    items: {}
                    description: A list of just the profile links that were added.
                  malformed:
                    type: array
                    items: {}
                    description: A list of links that were not added because they were missing a title or value
                      or had a bad scheme in the value.
                  duplicate:
                    type: array
                    items: {}
                    description: A list of the links that were already in the user's profile thus skipped.
                  profile_links:
                    type: array
                    items: {}
                    description: A complete list of user's profile links.
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authorization required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      parameters:
      - name: context
        in: query
        required: false
        schema:
          type: string
          enum:
          - display
          - edit
        description: 'display: (default) Formats the output as HTML for display.  Shortcodes are parsed, paragraph
          tags are added, etc..; edit: Formats the output for editing.  Shortcodes are left unparsed, significant
          whitespace is kept, etc..'
      - name: http_envelope
        in: query
        required: false
        schema:
          type: boolean
        description: 'false: (default); true: Some environments (like in-browser JavaScript or Flash) block or divert
          responses with a non-200 HTTP status code.  Setting this parameter will force the HTTP status code to
          always be 200.  The JSON response is wrapped in an "envelope" containing the "real" HTTP status code and
          headers.'
      - name: pretty
        in: query
        required: false
        schema:
          type: boolean
        description: 'false: (default); true: Output pretty JSON'
      - name: meta
        in: query
        required: false
        schema:
          type: string
        description: 'Optional. Loads data from the endpoints found in the ''meta'' part of the response. Comma-separated
          list. Example: meta=site,likes'
      - name: fields
        in: query
        required: false
        schema:
          type: string
        description: 'Optional. Returns specified fields only. Comma-separated list. Example: fields=ID,title'
      - name: callback
        in: query
        required: false
        schema:
          type: string
        description: An optional JSONP callback function.
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                links:
                  type: array
                  items: {}
                  description: An array of links to add to the current user, with each link specifying title and
                    value.`
  /me/sites:
    get:
      operationId: getMeSites
      summary: Get a list of the current user's sites.
      description: Get a list of the current user's sites.
      tags:
      - sites
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  sites:
                    type: array
                    items: {}
                    description: List of sites.
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authorization required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      parameters:
      - name: context
        in: query
        required: false
        schema:
          type: string
          enum:
          - display
          - edit
        description: 'display: (default) Formats the output as HTML for display.  Shortcodes are parsed, paragraph
          tags are added, etc..; edit: Formats the output for editing.  Shortcodes are left unparsed, significant
          whitespace is kept, etc..'
      - name: http_envelope
        in: query
        required: false
        schema:
          type: boolean
        description: 'false: (default); true: Some environments (like in-browser JavaScript or Flash) block or divert
          responses with a non-200 HTTP status code.  Setting this parameter will force the HTTP status code to
          always be 200.  The JSON response is wrapped in an "envelope" containing the "real" HTTP status code and
          headers.'
      - name: pretty
        in: query
        required: false
        schema:
          type: boolean
        description: 'false: (default); true: Output pretty JSON'
      - name: meta
        in: query
        required: false
        schema:
          type: string
        description: 'Optional. Loads data from the endpoints found in the ''meta'' part of the response. Comma-separated
          list. Example: meta=site,likes'
      - name: fields
        in: query
        required: false
        schema:
          type: string
        description: 'Optional. Returns specified fields only. Comma-separated list. Example: fields=ID,title'
      - name: callback
        in: query
        required: false
        schema:
          type: string
        description: An optional JSONP callback function.
      - name: source
        in: query
        required: false
        schema:
          type: string
        description: Optional. Identifier for the caller; used for perf tracking.
      - name: site_visibility
        in: query
        required: false
        schema:
          type: string
          enum:
          - all
          - visible
          - hidden
          - deleted
        description: 'all: (default) Return all sites user is a member of, both visible and hidden.; visible: Only
          return sites set to visible for the user.; hidden: Only return sites set to hidden for the user.; deleted:
          Only return sites set to deleted for the user.'
      - name: options
        in: query
        required: false
        schema:
          type: string
        description: 'Optional. Returns specified options only. Comma-separated list. Example: options=login_url,timezone'
      - name: include_domain_only
        in: query
        required: false
        schema:
          type: boolean
        description: Optional. Whether to include domain-only sites
      - name: include_redirect
        in: query
        required: false
        schema:
          type: boolean
        description: 'Optional. Whether to include redirect sites. Default: true.'
      - name: include_a8c_owned
        in: query
        required: false
        schema:
          type: boolean
        description: 'Optional. Whether to include A8C owned sites. Default: true.'
      - name: include_staging
        in: query
        required: false
        schema:
          type: boolean
        description: 'Optional. Whether to include staging sites. Default: true.'
      - name: site_activity
        in: query
        required: false
        schema:
          type: string
          enum:
          - all
          - active
          - inactive
        description: 'all: (default) Return all sites both active or inactive.; active: Only return active sites.;
          inactive: Only return inactive sites.'
      - name: filters
        in: query
        required: false
        schema:
          type: string
        description: 'Optional. Returns sites that satisfy the given filters only. Example: filters=jetpack,atomic,wpcom'
  /read/feed/{feed_url_or_id}/posts/{feed_item_id}:
    get:
      operationId: getReadFeedByFeedUrlOrIdPostsByFeedItemId
      summary: Get a single post from a feed (by ID).
      description: Get a single post from a feed (by ID).
      tags:
      - read
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  ID:
                    type: integer
                    description: The post ID.
                  site_ID:
                    type: integer
                    description: The site ID.
                  author:
                    type: object
                    description: The author of the post.
                  date:
                    type: string
                    format: date-time
                    description: The post's creation time.
                  modified:
                    type: string
                    format: date-time
                    description: The post's most recent update time.
                  title:
                    type: string
                    description: context dependent.
                  URL:
                    type: string
                    format: uri
                    description: The full permalink URL to the post.
                  short_URL:
                    type: string
                    format: uri
                    description: The wp.me short URL.
                  content:
                    type: string
                    description: context dependent.
                  excerpt:
                    type: string
                    description: context dependent.
                  slug:
                    type: string
                    description: The name (slug) for the post, used in URLs.
                  guid:
                    type: string
                    description: The GUID for the post.
                  status:
                    type: string
                    description: 'publish: The post is published.; draft: The post is saved as a draft.; pending:
                      The post is pending editorial approval.; private: The post is published privately; future:
                      The post is scheduled for future publishing.; trash: The post is in the trash.; auto-draft:
                      The post is a placeholder for a new post.'
                    enum:
                    - publish
                    - draft
                    - pending
                    - private
                    - future
                    - trash
                    - auto-draft
                  sticky:
                    type: boolean
                    description: Is the post sticky?
                  password:
                    type: string
                    description: The plaintext password protecting the post, or, more likely, the empty string if
                      the post is not password protected.
                  has_password:
                    type: boolean
                    description: Whether the post is password protected, regardless of whether the current user
                      can access it.
                  parent:
                    type: string
                    description: A reference to the post's parent, if it has one.
                  type:
                    type: string
                    description: The post's post_type. Post types besides post, page and revision need to be whitelisted
                      using the rest_api_allowed_post_types filter.
                  discussion:
                    type: object
                    description: Hash of discussion options for the post
                  likes_enabled:
                    type: boolean
                    description: Is the post open to likes?
                  sharing_enabled:
                    type: boolean
                    description: Should sharing buttons show on this post?
                  like_count:
                    type: integer
                    description: The number of likes for this post.
                  i_like:
                    type: boolean
                    description: Does the current user like this post?
                  is_reblogged:
                    type: boolean
                    description: Did the current user reblog this post?
                  is_following:
                    type: boolean
                    description: Is the current user following this blog?
                  global_ID:
                    type: string
                    description: A unique WordPress.com-wide representation of a post.
                  featured_image:
                    type: string
                    format: uri
                    description: The URL to the featured image for this post if it has one.
                  post_thumbnail:
                    type: object
                    description: The attachment object for the featured image if it has one.
                  format:
                    type: string
                    description: 'standard: Standard; aside: Aside; chat: Chat; gallery: Gallery; link: Link; image:
                      Image; quote: Quote; status: Status; video: Video; audio: Audio'
                    enum:
                    - standard
                    - aside
                    - chat
                    - gallery
                    - link
                    - image
                    - quote
                    - status
                    - video
                    - audio
                  geo:
                    type: string
                  menu_order:
                    type: integer
                    description: (Pages Only) The order pages should appear in.
                  page_template:
                    type: string
                    description: (Pages Only) The page template this page is using.
                  publicize_URLs:
                    type: array
                    items: {}
                    description: Array of Facebook URLs published by this post.
                  terms:
                    type: object
                    description: Hash of taxonomy names mapping to a hash of terms keyed by term name.
                  tags:
                    type: object
                    description: Hash of tags (keyed by tag name) applied to the post.
                  categories:
                    type: object
                    description: Hash of categories (keyed by category name) applied to the post.
                  attachments:
                    type: object
                    description: Hash of post attachments (keyed by attachment ID). Returns the most recent 20 attachments.
                      Use the `/sites/$site/media` endpoint to query the attachments beyond the default of 20 that
                      are returned here.
                  attachment_count:
                    type: integer
                    description: The total number of attachments for this post. Use the `/sites/$site/media` endpoint
                      to query the attachments beyond the default of 20 that are returned here.
                  metadata:
                    type: array
                    items: {}
                    description: Array of post metadata keys and values. All unprotected meta keys are available
                      by default for read requests. Both unprotected and protected meta keys are available for authenticated
                      requests with access. Protected meta keys can be made available with the rest_api_allowed_public_metadata
                      filter.
                  meta:
                    type: object
                    description: API result meta data
                  capabilities:
                    type: object
                    description: List of post-specific permissions for the user; publish_post, edit_post, delete_post
                  revisions:
                    type: array
                    items: {}
                    description: List of post revision IDs. Only available for posts retrieved with context=edit.
                  other_URLs:
                    type: object
                    description: List of URLs for this post. Permalink and slug suggestions.
                  post:
                    type: array
                    items: {}
                    description: A post object.
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authorization required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      parameters:
      - name: feed_url_or_id
        in: path
        required: true
        schema:
          type: string
        description: The URL for the feed you would like more details on, or the id of the Feed. If a URL is passed,
          it MUST be URL-encoded.
      - name: feed_item_id
        in: path
        required: true
        schema:
          type: string
        description: The feed item ID
      - name: context
        in: query
        required: false
        schema:
          type: string
          enum:
          - display
          - edit
        description: 'display: (default) Formats the output as HTML for display.  Shortcodes are parsed, paragraph
          tags are added, etc..; edit: Formats the output for editing.  Shortcodes are left unparsed, significant
          whitespace is kept, etc..'
      - name: http_envelope
        in: query
        required: false
        schema:
          type: boolean
        description: 'false: (default); true: Some environments (like in-browser JavaScript or Flash) block or divert
          responses with a non-200 HTTP status code.  Setting this parameter will force the HTTP status code to
          always be 200.  The JSON response is wrapped in an "envelope" containing the "real" HTTP status code and
          headers.'
      - name: pretty
        in: query
        required: false
        schema:
          type: boolean
        description: 'false: (default); true: Output pretty JSON'
      - name: meta
        in: query
        required: false
        schema:
          type: string
        description: 'Optional. Loads data from the endpoints found in the ''meta'' part of the response. Comma-separated
          list. Example: meta=site,likes'
      - name: fields
        in: query
        required: false
        schema:
          type: string
        description: 'Optional. Returns specified fields only. Comma-separated list. Example: fields=ID,title'
      - name: callback
        in: query
        required: false
        schema:
          type: string
        description: An optional JSONP callback function.
  /read/following/mine:
    get:
      operationId: getReadFollowingMine
      summary: Get a list of the feeds the user is following.
      description: Get a list of the feeds the user is following.
      tags:
      - read
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  ID:
                    type: integer
                    description: The post ID.
                  site_ID:
                    type: integer
                    description: The site ID.
                  author:
                    type: object
                    description: The author of the post.
                  date:
                    type: string
                    format: date-time
                    description: The post's creation time.
                  modified:
                    type: string
                    format: date-time
                    description: The post's most recent update time.
                  title:
                    type: string
                    description: context dependent.
                  URL:
                    type: string
                    format: uri
                    description: The full permalink URL to the post.
                  short_URL:
                    type: string
                    format: uri
                    description: The wp.me short URL.
                  content:
                    type: string
                    description: context dependent.
                  excerpt:
                    type: string
                    description: context dependent.
                  slug:
                    type: string
                    description: The name (slug) for the post, used in URLs.
                  guid:
                    type: string
                    description: The GUID for the post.
                  status:
                    type: string
                    description: 'publish: The post is published.; draft: The post is saved as a draft.; pending:
                      The post is pending editorial approval.; private: The post is published privately; future:
                      The post is scheduled for future publishing.; trash: The post is in the trash.; auto-draft:
                      The post is a placeholder for a new post.'
                    enum:
                    - publish
                    - draft
                    - pending
                    - private
                    - future
                    - trash
                    - auto-draft
                  sticky:
                    type: boolean
                    description: Is the post sticky?
                  password:
                    type: string
                    description: The plaintext password protecting the post, or, more likely, the empty string if
                      the post is not password protected.
                  has_password:
                    type: boolean
                    description: Whether the post is password protected, regardless of whether the current user
                      can access it.
                  parent:
                    type: string
                    description: A reference to the post's parent, if it has one.
                  type:
                    type: string
                    description: The post's post_type. Post types besides post, page and revision need to be whitelisted
                      using the rest_api_allowed_post_types filter.
                  discussion:
                    type: object
                    description: Hash of discussion options for the post
                  likes_enabled:
                    type: boolean
                    description: Is the post open to likes?
                  sharing_enabled:
                    type: boolean
                    description: Should sharing buttons show on this post?
                  like_count:
                    type: integer
                    description: The number of likes for this post.
                  i_like:
                    type: boolean
                    description: Does the current user like this post?
                  is_reblogged:
                    type: boolean
                    description: Did the current user reblog this post?
                  is_following:
                    type: boolean
                    description: Is the current user following this blog?
                  global_ID:
                    type: string
                    description: A unique WordPress.com-wide representation of a post.
                  featured_image:
                    type: string
                    format: uri
                    description: The URL to the featured image for this post if it has one.
                  post_thumbnail:
                    type: object
                    description: The attachment object for the featured image if it has one.
                  format:
                    type: string
                    description: 'standard: Standard; aside: Aside; chat: Chat; gallery: Gallery; link: Link; image:
                      Image; quote: Quote; status: Status; video: Video; audio: Audio'
                    enum:
                    - standard
                    - aside
                    - chat
                    - gallery
                    - link
                    - image
                    - quote
                    - status
                    - video
                    - audio
                  geo:
                    type: string
                  menu_order:
                    type: integer
                    description: (Pages Only) The order pages should appear in.
                  page_template:
                    type: string
                    description: (Pages Only) The page template this page is using.
                  publicize_URLs:
                    type: array
                    items: {}
                    description: Array of Facebook URLs published by this post.
                  terms:
                    type: object
                    description: Hash of taxonomy names mapping to a hash of terms keyed by term name.
                  tags:
                    type: object
                    description: Hash of tags (keyed by tag name) applied to the post.
                  categories:
                    type: object
                    description: Hash of categories (keyed by category name) applied to the post.
                  attachments:
                    type: object
                    description: Hash of post attachments (keyed by attachment ID). Returns the most recent 20 attachments.
                      Use the `/sites/$site/media` endpoint to query the attachments beyond the default of 20 that
                      are returned here.
                  attachment_count:
                    type: integer
                    description: The total number of attachments for this post. Use the `/sites/$site/media` endpoint
                      to query the attachments beyond the default of 20 that are returned here.
                  metadata:
                    type: array
                    items: {}
                    description: Array of post metadata keys and values. All unprotected meta keys are available
                      by default for read requests. Both unprotected and protected meta keys are available for authenticated
                      requests with access. Protected meta keys can be made available with the rest_api_allowed_public_metadata
                      filter.
                  meta:
                    type: object
                    description: API result meta data
                  capabilities:
                    type: object
                    description: List of post-specific permissions for the user; publish_post, edit_post, delete_post
                  revisions:
                    type: array
                    items: {}
                    description: List of post revision IDs. Only available for posts retrieved with context=edit.
                  other_URLs:
                    type: object
                    description: List of URLs for this post. Permalink and slug suggestions.
                  subscriptions:
                    type: array
                    items: {}
                    description: An array of the feeds the user subscribes to.
                  page:
                    type: integer

# --- truncated at 32 KB (312 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/automattic/refs/heads/main/openapi/automattic-wordpress-com-rest-v1-2-openapi.yml
Where this information came from

This is an independent, third-party profile of WordPress.com REST API v1.2, published by API Evangelist. We do not operate, host, resell, or support these APIs, and we are not affiliated with or endorsed by the company unless stated above. Everything here is built from publicly available information — the company's own site, developer portal, documentation, public repositories, and the specifications it publishes for public use. Nothing is obtained by breaching a system, defeating an access control, or using credentials.

The Kin Score and Agent Readiness rating are independently calculated assessments of a company's public API artifacts, scored against a published rubric. They are not certifications, endorsements, security assessments, or audits.

Corrections, re-scores, and removal are free — no partnership or purchase required, and you do not need to justify the request. A removed company is recorded as unrated, never scored zero for having asked. Acknowledgement within one business day; removal within two.

info@apievangelist.com · Read the full data-sourcing policy →
On a security or compliance team? Put security in the subject line and you will get a person, not a form — we will tell you exactly which public URLs this profile was built from.