openapi: 3.2.0 info: title: Automattic Posts 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 posts 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: - name: posts paths: /me/posts: get: operationId: getMePosts summary: Get a list of posts across all the user's sites. description: Get a list of posts across all the user's sites. tags: - posts 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: Meta information about the results. The next_page property, if present, contains a handle that will fetch the next page of results, assuming the next query uses the same criteria as the current query. 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. posts: type: array items: {} description: List of posts found: type: integer description: The total number of posts found. Decreases as you advance a list with a page_handle. '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: author in: query required: false schema: type: integer description: The ID of the author or empty for `all authors` - name: number in: query required: false schema: type: integer description: 'The number of posts to return. Limit: 20. Default: 20.' - name: offset in: query required: false schema: type: integer description: 'The index to start counting from. Limit: 199.' - name: page in: query required: false schema: type: integer description: 'Return the Nth 1-indexed page of posts. Takes precedence over the offset parameter. Limit: 10.' - name: page_handle in: query required: false schema: type: string description: A page handle, returned from a previous API call as a meta.next_page property. This is the most efficient way to fetch the next page of results. - name: order in: query required: false schema: type: string enum: - DESC - ASC description: 'DESC: (default) Return posts in descending order. For dates, that means newest to oldest.; ASC: Return posts in ascending order. For dates, that means oldest to newest.' - name: order_by in: query required: false schema: type: string enum: - date - modified description: 'date: (default) Order by the created time of each post (search queries will sort by relevance).; modified: Order by the modified time (gmt) of each post. (search queries will sort by relevance)' - name: after in: query required: false schema: type: string format: date-time description: Return posts dated after the specified datetime. - name: before in: query required: false schema: type: string format: date-time description: Return posts dated before the specified datetime. - name: modified_after in: query required: false schema: type: string format: date-time description: Return posts modified after the specified datetime. - name: modified_before in: query required: false schema: type: string format: date-time description: Return posts modified before the specified datetime. - name: type in: query required: false schema: type: string enum: - post - page description: 'post: (default) Return post objects; page: Return page objects' - name: status in: query required: false schema: type: string description: 'Comma-separated list of statuses for which to query, including any of: "publish", "private", "draft", "pending", "future", and "trash", or simply "any". Defaults to "publish"' - name: search in: query required: false schema: type: string description: 'Search query checked against `title`, `content`, `category.name`, `tag.name`, and `author`, and will return results sorted by relevance. Limit: 250 characters' - name: lang in: query required: false schema: type: string description: The search language, uses user interface language by default - name: sites in: query required: false schema: type: string description: Optional comma-separated list of specific site IDs to further limit results - name: site_visibility in: query required: false schema: type: string enum: - all - visible - hidden description: 'all: (default) Return posts from all sites user is a member of, both visible and hidden; visible: Only return posts from sites set to visible for the user; hidden: Only return posts from sites set to hidden for the user' servers: - url: https://public-api.wordpress.com/rest/v1.1 /sites/{site}/dropdown-pages/: get: operationId: getSitesBySiteDropdownPages summary: Get a list of pages to be displayed as options in a select-a-page-dropdown. description: Get a list of pages to be displayed as options in a select-a-page-dropdown. tags: - posts responses: '200': description: OK content: application/json: schema: type: object properties: found: type: integer description: The number of pages found. dropdown_pages: type: array items: {} description: An array of dropdown_page objects. '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: site in: path required: true schema: type: string description: Site ID or domain - 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. servers: - url: https://public-api.wordpress.com/rest/v1.1 /sites/{site}/posts/: get: operationId: getSitesBySitePosts summary: Get a list of matching posts. description: Get a list of matching posts. tags: - posts responses: '200': description: OK content: application/json: schema: type: object properties: found: type: integer description: The total number of posts found that match the request (ignoring limits, offsets, and pagination). posts: type: array items: {} description: An array of post objects. meta: type: object description: Meta data '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: site in: path required: true schema: type: string description: Site ID or domain - 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: number in: query required: false schema: type: integer description: 'The number of posts to return. Limit: 100. Default: 20.' - name: offset in: query required: false schema: type: integer description: 0-indexed offset. - name: page in: query required: false schema: type: integer description: Return the Nth 1-indexed page of posts. Takes precedence over the offset parameter. - name: page_handle in: query required: false schema: type: string description: A page handle, returned from a previous API call as a meta.next_page property. This is the most efficient way to fetch the next page of results. - name: order in: query required: false schema: type: string enum: - DESC - ASC description: 'DESC: (default) Return posts in descending order. For dates, that means newest to oldest.; ASC: Return posts in ascending order. For dates, that means oldest to newest.' - name: order_by in: query required: false schema: type: string enum: - date - modified - title - comment_count - ID description: 'date: (default) Order by the created time of each post.; modified: Order by the modified time of each post.; title: Order lexicographically by the posts'' titles.; comment_count: Order by the number of comments for each post.; ID: Order by post ID.' - name: after in: query required: false schema: type: string format: date-time description: Return posts dated after the specified datetime. - name: before in: query required: false schema: type: string format: date-time description: Return posts dated before the specified datetime. - name: modified_after in: query required: false schema: type: string format: date-time description: Return posts modified after the specified datetime. - name: modified_before in: query required: false schema: type: string format: date-time description: Return posts modified before the specified datetime. - name: tag in: query required: false schema: type: string description: Specify the tag name or slug. - name: category in: query required: false schema: type: string description: Specify the category name or slug. - name: term in: query required: false schema: type: object description: Specify comma-separated term slugs to search within, indexed by taxonomy slug. - name: type in: query required: false schema: type: string description: Specify the post type. Defaults to 'post', use 'any' to query for both posts and pages. Post types besides post and page need to be whitelisted using the rest_api_allowed_post_types filter. - name: parent_id in: query required: false schema: type: integer description: Returns only posts which are children of the specified post. Applies only to hierarchical post types. - name: include in: query required: false schema: type: string description: Includes the specified post ID(s) in the response - name: exclude in: query required: false schema: type: string description: Excludes the specified post ID(s) from the response - name: exclude_tree in: query required: false schema: type: integer description: Excludes the specified post and all of its descendants from the response. Applies only to hierarchical post types. - name: status in: query required: false schema: type: string description: 'Comma-separated list of statuses for which to query, including any of: "publish", "private", "draft", "pending", "future", and "trash", or simply "any". Defaults to "publish"' - name: sticky in: query required: false schema: type: string enum: - include - exclude - require description: 'include: (default) Sticky posts are not excluded from the list.; exclude: Sticky posts are excluded from the list.; require: Only include sticky posts' - name: author in: query required: false schema: type: integer description: Author's user ID - name: search in: query required: false schema: type: string description: Search query - name: meta_key in: query required: false schema: type: string description: Metadata key that the post should contain - name: meta_value in: query required: false schema: type: string description: Metadata value that the post should contain. Will only be applied if a `meta_key` is also given servers: - url: https://public-api.wordpress.com/rest/v1.1 /sites/{site}/posts/delete: post: operationId: postSitesBySitePostsDelete summary: 'Delete multiple posts. Note: If the trash is enabled, this request will send non-trashed posts to the trash. Trashed pos' description: '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.' tags: - posts 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.; deleted: The post has been deleted permanently.' enum: - publish - draft - pending - private - future - trash - auto-draft - deleted 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. results: type: object description: An object containing results, '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: site in: path required: true schema: type: string description: Site ID or domain - 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: post_ids: type: string description: An array, or comma-separated list, of Post IDs to delete or trash. servers: - url: https://public-api.wordpress.com/rest/v1.1 /sites/{site}/posts/new: post: operationId: postSitesBySitePostsNew summary: Create a post. description: Create a post. tags: - posts 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. '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: site in: path required: true schema: type: string description: Site ID or domain - 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: date: type: string format: date-time description: The post's creation time. title: type: string description: The post title. content: type: string description: The post content. excerpt: type: string description: An optional post excerpt. slug: type: string description: The name (slug) for the post, used in URLs. author: type: string description: The username or ID for the user to assign the post to. publicize: type: string description: True or false if the post be shared to external services. An array of services if we only want to share to a select few. Defaults to true. publicize_message: type: string description: Custom message to be shared to external services. status: type: string description: 'publish: (default) Publish the post.; private: Privately publish the post.; draft: Save the post as a draft.; pending: Mark the post as pending editorial approval.; future: Schedule the post (alias for publish; you must also set a future date).; auto-draft: Save a placeholder for a newly created post, with no content.' enum: - publish - private - draft - pending - future - auto-draft sticky: type: boolean description: 'false: (default) Post is not marked as sticky.; true: Stick the post to the front page.' password: type: string description: The plaintext password protecting the post, or, more likely, the empty string if the post is not password protected. parent: type: integer description: The post ID of the new post's parent. type: type: string description: The post type. Defaults to 'post'. Post types besides post and page need to be whitelisted using the rest_api_allowed_post_types filter. terms: type: object description: Mapping of taxonomy to comma-separated list or array of terms (name or id) categories: type: string description: Comma-separated list or array of categories (name or id) tags: type: string description: Comma-separated list or array of tags (name or id) format: type: string description: 'default: (default) Use default post format; standard: Standard; aside: Aside; chat: Chat; gallery: Gallery; link: Link; image: Image; quote: Quote; status: Status; video: Video; audio: Audio' enum: - default - standard - aside - chat - gallery - link - image - quote - status - video - audio featured_image: type: string description: The post ID of an existing attachment to set as the featured image. Pass an empty string to delete the existing image. media: type: string description: 'An array of files to attach to the post. To upload media, the entire request should be multipart/form-data encoded. Multiple media items will be displayed in a gallery. Accepts jpg, jpeg, png, gif, pdf, doc, ppt, odt, pptx, docx, pps, ppsx, xls, xlsx, key. Audio and Video may also be available. See allowed_file_types in the options response of the site endpoint. Errors produced by media uploads, if any, will be in `media_errors` in the response. Example:curl \--form ''title=Image Post'' \--form ''media[0]=@/path/to/file.jpg'' \--form ''media_attrs[0][caption]=My Great Photo'' \-H ''Authorization: BEARER your-token'' \''https://public-api.wordpress.com/rest/v1/sites/123/posts/new''' media_urls: type: array items: {} description: An array of URLs for images to attach to a post. Sideloads the media in for a post. Errors produced by media sideloading, if any, will be in `media_errors` in the response. media_attrs: type: array items: {} description: 'An array of attributes (`title`, `description` and `caption`) are supported to assign to the media uploaded via the `media` or `media_urls` properties. You must use a numeric index for the keys of `media_attrs` which follow the same sequence as `media` and `media_urls`. Example:curl \--form ''title=Gallery Post'' \--form ''media[]=@/path/to/file1.jpg'' \--form ''media_urls[]=http://exapmple.com/file2.jpg'' \ \--form ''media_attrs[0][caption]=This will be the caption for file1.jpg'' \--form ''media_attrs[1][title]=This will be the title for file2.jpg'' \-H ''Authorization: BEARER your-token'' \''https://public-api.wordpress.com/rest/v1/sites/123/posts/new''' metadata: type: array items: {} description: 'Array of metadata objects containing the following properties: `key` (metadata key), `id` (meta ID), `previous_value` (if set, the action will only occur for the provided previous value), `value` (the new value to set the meta to), `operation` (the operation to perform: `update` or `add`; defaults to `update`). All unprotected meta keys are available by default for read requests. Both unprotected and protected meta keys are avaiable for authenticated requests with proper capabilities. Protected meta keys can be made available with the rest_api_allowed_public_metadata filter.' discussion: type: object description: 'A hash containing one or more of the following boolean values, which default to the blog''s discussion preferences: `comments_open`, `pings_open`' likes_enabled: type: boolean description: Should the post be open to likes? Defaults to the blog's preference. sharing_enabled: type: boolean description: Should sharing buttons show on this post? Defaults to true. menu_order: type: integer description: (Pages Only) the order pages should appear in. Use 0 to maintain alphabetical order. page_template: type: string description: (Pages Only) The page template this page should use. servers: - url: https://public-api.wordpress.com/rest/v1.1 /sites/{site}/posts/restore: post: operationId: postSitesBySitePostsRestore summary: Restore multiple posts. description: Restore multiple posts. tags: - posts 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. results: type: object description: An object containing results, '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: site in: path required: true schema: type: string description: Site ID or domain - 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: post_ids: type: string description: An array, or comma-separated list, of Post IDs to restore. servers: - url: https://public-api.wordpress.com/rest/v1.1 /sites/{site}/posts/slug:{post_slug}: get: operationId: getSitesBySitePostsSlugPostSlug summary: Get a single post (by slug). description: Get a single post (by slug). tags: - posts 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. '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: site in: path required: true schema: type: string description: Site ID or domain - name: post_slug in: path required: true schema: type: string description: The post slug (a.k.a. sanitized name) - 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. servers: - url: https://public-api.wordpress.com/rest/v1.1 /sites/{site}/posts/{post_ID}: get: operationId: getSitesBySitePostsByPostId summary: Get a single post (by ID). description: Get a single post (by ID). tags: - posts 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. '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: site in: path required: true schema: type: string description: Site ID or domain - name: post_ID in: path required: true schema: type: integer description: The post 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. post: operationId: postSitesBySitePostsByPostId summary: Edit a post. description: Edit a post. tags: - posts 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. '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: site in: path required: true schema: type: string description: Site ID or domain - name: post_ID in: path required: true schema: type: integer description: The post 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. requestBody: required: false content: application/json: schema: type: object properties: date: type: string format: date-time description: The post's creation time. title: type: string description: The post title. content: type: string description: The post content. excerpt: type: string description: An optional post excerpt. slug: type: string description: The name (slug) for the post, used in URLs. author: type: string description: The username or ID for the user to assign the post to. publicize: type: string description: True or false if the post be shared to external services. An array of services if we only want to share to a select few. Defaults to true. publicize_message: type: string description: Custom message to be shared to external services. status: type: string description: 'publish: (default) Publish the post.; private: Privately publish the post.; draft: Save the post as a draft.; future: Schedule the post (alias for publish; you must also set a future date).; pending: Mark the post as pending editorial approval.; trash: Set the post as trashed.' enum: - publish - private - draft - future - pending - trash sticky: type: boolean description: 'false: (default) Post is not marked as sticky.; true: Stick the post to the front page.' password: type: string description: The plaintext password protecting the post, or, more likely, the empty string if the post is not password protected. parent: type: integer description: The post ID of the new post's parent. terms: type: object description: Mapping of taxonomy to comma-separated list or array of terms (name or id) categories: type: string description: Comma-separated list or array of categories (name or id) tags: type: string description: Comma-separated list or array of tags (name or id) format: type: string description: 'default: (default) Use default post format; standard: Standard; aside: Aside; chat: Chat; gallery: Gallery; link: Link; image: Image; quote: Quote; status: Status; video: Video; audio: Audio' enum: - default - standard - aside - chat - gallery - link - image - quote - status - video - audio discussion: type: object description: 'A hash containing one or more of the following boolean values, which default to the blog''s discussion preferences: `comments_open`, `pings_open`' likes_enabled: type: boolean description: Should the post be open to likes? menu_order: type: integer description: (Pages only) the order pages should appear in. Use 0 to maintain alphabetical order. page_template: type: string description: (Pages Only) The page template this page should use. sharing_enabled: type: boolean description: Should sharing buttons show on this post? featured_image: type: string description: The post ID of an existing attachment to set as the featured image. Pass an empty string to delete the existing image. media: type: string description: 'An array of files to attach to the post. To upload media, the entire request should be multipart/form-data encoded. Multiple media items will be displayed in a gallery. Accepts jpg, jpeg, png, gif, pdf, doc, ppt, odt, pptx, docx, pps, ppsx, xls, xlsx, key. Audio and Video may also be available. See allowed_file_types in the options resposne of the site endpoint. Example:curl \--form ''title=Image'' \--form ''media[]=@/path/to/file.jpg'' \-H ''Authorization: BEARER your-token'' \''https://public-api.wordpress.com/rest/v1/sites/123/posts/new''' media_urls: type: array items: {} description: An array of URLs for images to attach to a post. Sideloads the media in for a post. metadata: type: array items: {} description: 'Array of metadata objects containing the following properties: `key` (metadata key), `id` (meta ID), `previous_value` (if set, the action will only occur for the provided previous value), `value` (the new value to set the meta to), `operation` (the operation to perform: `update` or `add`; defaults to `update`). All unprotected meta keys are available by default for read requests. Both unprotected and protected meta keys are available for authenticated requests with proper capabilities. Protected meta keys can be made available with the rest_api_allowed_public_metadata filter.' servers: - url: https://public-api.wordpress.com/rest/v1.1 /sites/{site}/posts/{post_ID}/delete: post: operationId: postSitesBySitePostsByPostIdDelete summary: 'Delete a post. Note: If the trash is enabled, this request will send the post to the trash. A second request will perman' description: '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.' tags: - posts 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.; deleted: The post has been deleted permanently.' enum: - publish - draft - pending - private - future - trash - auto-draft - deleted 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. '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: site in: path required: true schema: type: string description: Site ID or domain - name: post_ID in: path required: true schema: type: integer description: The post 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. servers: - url: https://public-api.wordpress.com/rest/v1.1 /sites/{site}/posts/{post_ID}/likes/: get: operationId: getSitesBySitePostsByPostIdLikes summary: Get a list of the likes for a post. description: Get a list of the likes for a post. tags: - posts responses: '200': description: OK content: application/json: schema: type: object properties: found: type: integer description: The total number of likes for this post. i_like: type: boolean description: If authenticated, this returns the current like status for the user on this post. can_like: type: boolean description: True if this post can be liked site_ID: type: integer description: The site ID post_ID: type: integer description: The post ID likes: type: array items: {} description: An array of users who liked this post. '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: site in: path required: true schema: type: string description: Site ID or domain - name: post_ID in: path required: true schema: type: integer description: The post ID - 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: chronological in: query required: false schema: type: boolean description: get likers on chronological order servers: - url: https://public-api.wordpress.com/rest/v1.1 /sites/{site}/posts/{post_ID}/likes/mine/: get: operationId: getSitesBySitePostsByPostIdLikesMine summary: Get the current user's like status for a post. description: Get the current user's like status for a post. tags: - posts responses: '200': description: OK content: application/json: schema: type: object properties: i_like: type: boolean description: Does the user like this post? like_count: type: integer description: The number of likes for this post. site_ID: type: integer description: The site ID post_ID: type: integer description: The post ID meta: type: object description: Meta data liker: type: object description: The user involved '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: site in: path required: true schema: type: string description: Site ID or domain - name: post_ID in: path required: true schema: type: integer description: The post ID - 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. servers: - url: https://public-api.wordpress.com/rest/v1.1 /sites/{site}/posts/{post_ID}/likes/mine/delete: post: operationId: postSitesBySitePostsByPostIdLikesMineDelete summary: Unlike a post. description: Unlike a post. tags: - posts responses: '200': description: OK content: application/json: schema: type: object properties: success: type: boolean description: Was the operation successful? i_like: type: boolean description: Does the user like this post? like_count: type: integer description: The number of likes for this post. site_ID: type: integer description: The site ID post_ID: type: integer description: The post ID meta: type: object description: Meta data liker: type: object description: The user involved '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: site in: path required: true schema: type: string description: Site ID or domain - name: post_ID in: path required: true schema: type: integer description: The post ID - 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. servers: - url: https://public-api.wordpress.com/rest/v1.1 /sites/{site}/posts/{post_ID}/likes/new: post: operationId: postSitesBySitePostsByPostIdLikesNew summary: Like a post. description: Like a post. tags: - posts responses: '200': description: OK content: application/json: schema: type: object properties: success: type: boolean description: Was the operation successful? i_like: type: boolean description: Does the user like this post? like_count: type: integer description: The number of likes for this post. site_ID: type: integer description: The site ID post_ID: type: integer description: The post ID meta: type: object description: Meta data liker: type: object description: The user involved '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: site in: path required: true schema: type: string description: Site ID or domain - name: post_ID in: path required: true schema: type: integer description: The post ID - 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. servers: - url: https://public-api.wordpress.com/rest/v1.1 /sites/{site}/posts/{post_ID}/reblogs/mine: get: operationId: getSitesBySitePostsByPostIdReblogsMine summary: Get reblog status for a post. description: Get reblog status for a post. tags: - posts responses: '200': description: OK content: application/json: schema: type: object properties: is_reblogged: type: boolean description: Has the user reblogged this post? meta: type: object description: Meta data ID: type: integer description: ID of the new post '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: site in: path required: true schema: type: string description: Site ID or domain - name: post_ID in: path required: true schema: type: integer description: The post ID - 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. servers: - url: https://public-api.wordpress.com/rest/v1.1 /sites/{site}/posts/{post_ID}/reblogs/new: post: operationId: postSitesBySitePostsByPostIdReblogsNew summary: Reblog a post. description: Reblog a post. tags: - posts responses: '200': description: OK content: application/json: schema: type: object properties: success: type: boolean description: Was the operation successful? is_reblogged: type: boolean description: Has the user reblogged this post? meta: type: object description: Meta data ID: type: integer description: ID of the new post '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: site in: path required: true schema: type: string description: Site ID or domain - name: post_ID in: path required: true schema: type: integer description: The post ID - 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: destination_site_id: type: integer description: The site ID reblogging to note: type: string description: The reblog note servers: - url: https://public-api.wordpress.com/rest/v1.1 /sites/{site}/posts/{post_ID}/restore: post: operationId: postSitesBySitePostsByPostIdRestore summary: Restore a post or page from the trash to its previous status. description: Restore a post or page from the trash to its previous status. tags: - posts 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. '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: site in: path required: true schema: type: string description: Site ID or domain - name: post_ID in: path required: true schema: type: integer description: The post 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. servers: - url: https://public-api.wordpress.com/rest/v1.1 /sites/{site}/posts/{post}/related: post: operationId: postSitesBySitePostsByPostRelated summary: Search within a site for related posts. description: Search within a site for related posts. tags: - posts responses: '200': description: OK content: application/json: schema: type: object properties: results: type: array items: {} description: The top level "hits" object from the Elasticsearch query response with post_id and blog_id fields of the related items. '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: site in: path required: true schema: type: string description: Site ID or domain - name: post in: path required: true schema: type: integer description: The post ID - 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: fields in: query required: false schema: type: string description: 'Optional. Returns specified fields only. Comma-separated list. Example: total,max_score' - 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: size: type: integer description: Number of results to return filter: type: object description: Filter the search. See Elasticsearch filters algorithm: type: string description: Specify a specific algorithm to use servers: - url: https://public-api.wordpress.com/rest/v1.1 /sites/{site}/posts/{post}/subscribers/: get: operationId: getSitesBySitePostsByPostSubscribers summary: Get a list of the specified post's subscribers. description: Get a list of the specified post's subscribers. tags: - posts 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: site in: path required: true schema: type: string description: Site ID or domain - name: post in: path required: true schema: type: integer description: Post ID - 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. servers: - url: https://public-api.wordpress.com/rest/v1.1 /sites/{site}/posts/{post}/subscribers/mine: get: operationId: getSitesBySitePostsByPostSubscribersMine summary: Get subscription status of the specified post for the current user. description: Get subscription status of the specified post for the current user. tags: - posts 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: site in: path required: true schema: type: string description: Site ID or domain - name: post in: path required: true schema: type: integer description: Post ID - 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. servers: - url: https://public-api.wordpress.com/rest/v1.1 /sites/{site}/posts/{post}/subscribers/mine/delete: post: operationId: postSitesBySitePostsByPostSubscribersMineDelete summary: Unsubscribe the current user from the specified post. description: Unsubscribe the current user from the specified post. tags: - posts 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: site in: path required: true schema: type: string description: Site ID or domain - name: post in: path required: true schema: type: integer description: Post ID - 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. servers: - url: https://public-api.wordpress.com/rest/v1.1 /sites/{site}/posts/{post}/subscribers/mine/update: post: operationId: postSitesBySitePostsByPostSubscribersMineUpdate summary: Subscribe current user to be notified of the specified post's comments. description: Subscribe current user to be notified of the specified post's comments. tags: - posts 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: site in: path required: true schema: type: string description: Site ID or domain - name: post in: path required: true schema: type: integer description: Post 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. requestBody: required: false content: application/json: schema: type: object properties: receive_notifications: type: boolean description: True if notifications should be sent for new comments. False otherwise. servers: - url: https://public-api.wordpress.com/rest/v1.1 /sites/{site}/posts/{post}/subscribers/new: post: operationId: postSitesBySitePostsByPostSubscribersNew summary: Subscribe current user to be notified of the specified post's comments. description: Subscribe current user to be notified of the specified post's comments. tags: - posts 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: site in: path required: true schema: type: string description: Site ID or domain - name: post in: path required: true schema: type: integer description: Post ID - 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: receive_notifications: type: boolean description: Optional. If true notifications will be sent for new comments. To change the notification preference for an existing subscription call the /update endpoint. servers: - url: https://public-api.wordpress.com/rest/v1.1 /users/{user_id}/posts: get: operationId: getUsersByUserIdPosts summary: Get a list of published posts authored by a specified user across their public sites, ordered by date in descending orde description: Get a list of published posts authored by a specified user across their public sites, ordered by date in descending order. tags: - posts 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: "Meta information including:\n - wpcom: (bool) Always true\n - next_page: (string) Present if there are more posts to fetch" 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. found: type: integer description: Total number of posts found matching the query parameters. posts: type: array items: {} description: Array of post objects. '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: user_id in: path required: true schema: type: integer description: The ID of the user whose posts to return - 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: number in: query required: false schema: type: integer description: 'The number of posts to return. Must be between 1 and 20. Default: 20.' - name: page_handle in: query required: false schema: type: string description: A page handle containing value, blog, and post parameters, returned from a previous request's meta.next_page property. servers: - url: https://public-api.wordpress.com/rest/v1.1 /wp/v2/sites/{wpcom_site}/posts: get: operationId: getWpV2SitesbyWpcomSitePosts summary: GET /wp/v2/sites/{wpcom_site}/posts tags: - posts responses: '200': description: OK '401': description: Authentication required content: application/json: schema: $ref: '#/components/schemas/WPRestError' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/WPRestError' parameters: - name: wpcom_site in: path required: true schema: type: string - name: context in: query required: false schema: type: string enum: - view - embed - edit default: view description: Scope under which the request is made; determines fields present in response. - name: page in: query required: false schema: type: integer default: 1 description: Current page of the collection. - name: per_page in: query required: false schema: type: integer default: 10 description: Maximum number of items to be returned in result set. - name: search in: query required: false schema: type: string description: Limit results to those matching a string. - name: after in: query required: false schema: type: string format: date-time description: Limit response to posts published after a given ISO8601 compliant date. - name: modified_after in: query required: false schema: type: string format: date-time description: Limit response to posts modified after a given ISO8601 compliant date. - name: author in: query required: false schema: type: array default: [] items: type: integer description: Limit result set to posts assigned to specific authors. - name: author_exclude in: query required: false schema: type: array default: [] items: type: integer description: Ensure result set excludes posts assigned to specific authors. - name: before in: query required: false schema: type: string format: date-time description: Limit response to posts published before a given ISO8601 compliant date. - name: modified_before in: query required: false schema: type: string format: date-time description: Limit response to posts modified before a given ISO8601 compliant date. - name: exclude in: query required: false schema: type: array default: [] items: type: integer description: Ensure result set excludes specific IDs. - name: include in: query required: false schema: type: array default: [] items: type: integer description: Limit result set to specific IDs. - name: search_semantics in: query required: false schema: type: string enum: - exact description: How to interpret the search input. - name: offset in: query required: false schema: type: integer description: Offset the result set by a specific number of items. - name: order in: query required: false schema: type: string enum: - asc - desc default: desc description: Order sort attribute ascending or descending. - name: orderby in: query required: false schema: type: string enum: - author - date - id - include - modified - parent - relevance - slug - include_slugs - title default: date description: Sort collection by post attribute. - name: search_columns in: query required: false schema: type: array default: [] items: type: string description: Array of column names to be searched. - name: slug in: query required: false schema: type: array items: type: string description: Limit result set to posts with one or more specific slugs. - name: status in: query required: false schema: type: array default: publish items: type: string description: Limit result set to posts assigned one or more statuses. - name: tax_relation in: query required: false schema: type: string enum: - AND - OR description: Limit result set based on relationship between multiple taxonomies. - name: categories in: query required: false schema: type: string description: Limit result set to items with specific terms assigned in the categories taxonomy. - name: categories_exclude in: query required: false schema: type: string description: Limit result set to items except those with specific terms assigned in the categories taxonomy. - name: tags in: query required: false schema: type: string description: Limit result set to items with specific terms assigned in the tags taxonomy. - name: tags_exclude in: query required: false schema: type: string description: Limit result set to items except those with specific terms assigned in the tags taxonomy. - name: sticky in: query required: false schema: type: boolean description: Limit result set to items that are sticky. - name: ignore_sticky in: query required: false schema: type: boolean default: true description: Whether to ignore sticky posts or not. - name: format in: query required: false schema: type: array items: type: string description: Limit result set to items assigned one or more given formats. post: operationId: postWpV2SitesbyWpcomSitePosts summary: POST /wp/v2/sites/{wpcom_site}/posts tags: - posts responses: '200': description: OK '401': description: Authentication required content: application/json: schema: $ref: '#/components/schemas/WPRestError' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/WPRestError' parameters: - name: wpcom_site in: path required: true schema: type: string requestBody: content: application/json: schema: type: object properties: date: type: string format: date-time description: The date the post was published, in the site's timezone. date_gmt: type: string format: date-time description: The date the post was published, as GMT. slug: type: string description: An alphanumeric identifier for the post unique to its type. status: type: string enum: - publish - future - draft - pending - private - spam - auto-draft description: A named status for the post. password: type: string description: A password to protect access to the content and excerpt. title: type: object description: The title for the post. content: type: object description: The content for the post. author: type: integer description: The ID for the author of the post. excerpt: type: object description: The excerpt for the post. featured_media: type: integer description: The ID of the featured media for the post. comment_status: type: string enum: - open - closed description: Whether or not comments are open on the post. ping_status: type: string enum: - open - closed description: Whether or not the post can be pinged. format: type: string enum: - standard - aside - chat - gallery - link - image - quote - status - video - audio description: The format for the post. meta: type: object description: Meta fields. sticky: type: boolean description: Whether or not the post should be treated as sticky. template: type: string description: The theme file to use to display the post. categories: type: array items: type: integer description: The terms assigned to the post in the category taxonomy. tags: type: array items: type: integer description: The terms assigned to the post in the post_tag taxonomy. jetpack_sharing_enabled: type: boolean description: Are sharing buttons enabled? jetpack_likes_enabled: type: boolean description: Are Likes enabled? jetpack_publicize_connections: type: array default: [] items: type: object servers: - url: https://public-api.wordpress.com /wp/v2/sites/{wpcom_site}/posts/{id}: get: operationId: getWpV2SitesbyWpcomSitePostsbyId summary: GET /wp/v2/sites/{wpcom_site}/posts/{id} tags: - posts responses: '200': description: OK '401': description: Authentication required content: application/json: schema: $ref: '#/components/schemas/WPRestError' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/WPRestError' parameters: - name: wpcom_site in: path required: true schema: type: string - name: id in: path required: true schema: type: string - name: context in: query required: false schema: type: string enum: - view - embed - edit default: view description: Scope under which the request is made; determines fields present in response. - name: excerpt_length in: query required: false schema: type: integer description: Override the default excerpt length. - name: password in: query required: false schema: type: string description: The password for the post if it is password protected. post: operationId: postWpV2SitesbyWpcomSitePostsbyId summary: POST /wp/v2/sites/{wpcom_site}/posts/{id} tags: - posts responses: '200': description: OK '401': description: Authentication required content: application/json: schema: $ref: '#/components/schemas/WPRestError' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/WPRestError' parameters: - name: wpcom_site in: path required: true schema: type: string - name: id in: path required: true schema: type: string requestBody: content: application/json: schema: type: object properties: date: type: string format: date-time description: The date the post was published, in the site's timezone. date_gmt: type: string format: date-time description: The date the post was published, as GMT. slug: type: string description: An alphanumeric identifier for the post unique to its type. status: type: string enum: - publish - future - draft - pending - private - spam - auto-draft description: A named status for the post. password: type: string description: A password to protect access to the content and excerpt. title: type: object description: The title for the post. content: type: object description: The content for the post. author: type: integer description: The ID for the author of the post. excerpt: type: object description: The excerpt for the post. featured_media: type: integer description: The ID of the featured media for the post. comment_status: type: string enum: - open - closed description: Whether or not comments are open on the post. ping_status: type: string enum: - open - closed description: Whether or not the post can be pinged. format: type: string enum: - standard - aside - chat - gallery - link - image - quote - status - video - audio description: The format for the post. meta: type: object description: Meta fields. sticky: type: boolean description: Whether or not the post should be treated as sticky. template: type: string description: The theme file to use to display the post. categories: type: array items: type: integer description: The terms assigned to the post in the category taxonomy. tags: type: array items: type: integer description: The terms assigned to the post in the post_tag taxonomy. jetpack_sharing_enabled: type: boolean description: Are sharing buttons enabled? jetpack_likes_enabled: type: boolean description: Are Likes enabled? jetpack_publicize_connections: type: array items: type: object put: operationId: putWpV2SitesbyWpcomSitePostsbyId summary: PUT /wp/v2/sites/{wpcom_site}/posts/{id} tags: - posts responses: '200': description: OK '401': description: Authentication required content: application/json: schema: $ref: '#/components/schemas/WPRestError' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/WPRestError' parameters: - name: wpcom_site in: path required: true schema: type: string - name: id in: path required: true schema: type: string requestBody: content: application/json: schema: type: object properties: date: type: string format: date-time description: The date the post was published, in the site's timezone. date_gmt: type: string format: date-time description: The date the post was published, as GMT. slug: type: string description: An alphanumeric identifier for the post unique to its type. status: type: string enum: - publish - future - draft - pending - private - spam - auto-draft description: A named status for the post. password: type: string description: A password to protect access to the content and excerpt. title: type: object description: The title for the post. content: type: object description: The content for the post. author: type: integer description: The ID for the author of the post. excerpt: type: object description: The excerpt for the post. featured_media: type: integer description: The ID of the featured media for the post. comment_status: type: string enum: - open - closed description: Whether or not comments are open on the post. ping_status: type: string enum: - open - closed description: Whether or not the post can be pinged. format: type: string enum: - standard - aside - chat - gallery - link - image - quote - status - video - audio description: The format for the post. meta: type: object description: Meta fields. sticky: type: boolean description: Whether or not the post should be treated as sticky. template: type: string description: The theme file to use to display the post. categories: type: array items: type: integer description: The terms assigned to the post in the category taxonomy. tags: type: array items: type: integer description: The terms assigned to the post in the post_tag taxonomy. jetpack_sharing_enabled: type: boolean description: Are sharing buttons enabled? jetpack_likes_enabled: type: boolean description: Are Likes enabled? jetpack_publicize_connections: type: array items: type: object patch: operationId: patchWpV2SitesbyWpcomSitePostsbyId summary: PATCH /wp/v2/sites/{wpcom_site}/posts/{id} tags: - posts responses: '200': description: OK '401': description: Authentication required content: application/json: schema: $ref: '#/components/schemas/WPRestError' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/WPRestError' parameters: - name: wpcom_site in: path required: true schema: type: string - name: id in: path required: true schema: type: string requestBody: content: application/json: schema: type: object properties: date: type: string format: date-time description: The date the post was published, in the site's timezone. date_gmt: type: string format: date-time description: The date the post was published, as GMT. slug: type: string description: An alphanumeric identifier for the post unique to its type. status: type: string enum: - publish - future - draft - pending - private - spam - auto-draft description: A named status for the post. password: type: string description: A password to protect access to the content and excerpt. title: type: object description: The title for the post. content: type: object description: The content for the post. author: type: integer description: The ID for the author of the post. excerpt: type: object description: The excerpt for the post. featured_media: type: integer description: The ID of the featured media for the post. comment_status: type: string enum: - open - closed description: Whether or not comments are open on the post. ping_status: type: string enum: - open - closed description: Whether or not the post can be pinged. format: type: string enum: - standard - aside - chat - gallery - link - image - quote - status - video - audio description: The format for the post. meta: type: object description: Meta fields. sticky: type: boolean description: Whether or not the post should be treated as sticky. template: type: string description: The theme file to use to display the post. categories: type: array items: type: integer description: The terms assigned to the post in the category taxonomy. tags: type: array items: type: integer description: The terms assigned to the post in the post_tag taxonomy. jetpack_sharing_enabled: type: boolean description: Are sharing buttons enabled? jetpack_likes_enabled: type: boolean description: Are Likes enabled? jetpack_publicize_connections: type: array items: type: object delete: operationId: deleteWpV2SitesbyWpcomSitePostsbyId summary: DELETE /wp/v2/sites/{wpcom_site}/posts/{id} tags: - posts responses: '200': description: OK '401': description: Authentication required content: application/json: schema: $ref: '#/components/schemas/WPRestError' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/WPRestError' parameters: - name: wpcom_site in: path required: true schema: type: string - name: id in: path required: true schema: type: string - name: force in: query required: false schema: type: boolean default: false description: Whether to bypass Trash and force deletion. servers: - url: https://public-api.wordpress.com /wp/v2/sites/{wpcom_site}/posts/{id}/autosaves: get: operationId: getWpV2SitesbyWpcomSitePostsbyIdAutosaves summary: GET /wp/v2/sites/{wpcom_site}/posts/{id}/autosaves tags: - posts responses: '200': description: OK '401': description: Authentication required content: application/json: schema: $ref: '#/components/schemas/WPRestError' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/WPRestError' parameters: - name: wpcom_site in: path required: true schema: type: string - name: id in: path required: true schema: type: string - name: parent in: query required: false schema: type: integer description: The ID for the parent of the autosave. - name: context in: query required: false schema: type: string enum: - view - embed - edit default: view description: Scope under which the request is made; determines fields present in response. post: operationId: postWpV2SitesbyWpcomSitePostsbyIdAutosaves summary: POST /wp/v2/sites/{wpcom_site}/posts/{id}/autosaves tags: - posts responses: '200': description: OK '401': description: Authentication required content: application/json: schema: $ref: '#/components/schemas/WPRestError' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/WPRestError' parameters: - name: wpcom_site in: path required: true schema: type: string - name: id in: path required: true schema: type: string requestBody: content: application/json: schema: type: object properties: parent: type: integer description: The ID for the parent of the autosave. date: type: string format: date-time description: The date the post was published, in the site's timezone. date_gmt: type: string format: date-time description: The date the post was published, as GMT. slug: type: string description: An alphanumeric identifier for the post unique to its type. status: type: string enum: - publish - future - draft - pending - private - spam - auto-draft description: A named status for the post. password: type: string description: A password to protect access to the content and excerpt. title: type: object description: The title for the post. content: type: object description: The content for the post. author: type: integer description: The ID for the author of the post. excerpt: type: object description: The excerpt for the post. featured_media: type: integer description: The ID of the featured media for the post. comment_status: type: string enum: - open - closed description: Whether or not comments are open on the post. ping_status: type: string enum: - open - closed description: Whether or not the post can be pinged. format: type: string enum: - standard - aside - chat - gallery - link - image - quote - status - video - audio description: The format for the post. meta: type: object description: Meta fields. sticky: type: boolean description: Whether or not the post should be treated as sticky. template: type: string description: The theme file to use to display the post. categories: type: array items: type: integer description: The terms assigned to the post in the category taxonomy. tags: type: array items: type: integer description: The terms assigned to the post in the post_tag taxonomy. jetpack_sharing_enabled: type: boolean description: Are sharing buttons enabled? jetpack_likes_enabled: type: boolean description: Are Likes enabled? jetpack_publicize_connections: type: array items: type: object servers: - url: https://public-api.wordpress.com /wp/v2/sites/{wpcom_site}/posts/{parent}/autosaves/{id}: get: operationId: getWpV2SitesbyWpcomSitePostsbyParentAutosavesbyId summary: GET /wp/v2/sites/{wpcom_site}/posts/{parent}/autosaves/{id} tags: - posts responses: '200': description: OK '401': description: Authentication required content: application/json: schema: $ref: '#/components/schemas/WPRestError' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/WPRestError' parameters: - name: wpcom_site in: path required: true schema: type: string - name: parent in: path required: true schema: type: string - name: id in: path required: true schema: type: string - name: context in: query required: false schema: type: string enum: - view - embed - edit default: view description: Scope under which the request is made; determines fields present in response. servers: - url: https://public-api.wordpress.com /wp/v2/sites/{wpcom_site}/posts/{parent}/revisions: get: operationId: getWpV2SitesbyWpcomSitePostsbyParentRevisions summary: GET /wp/v2/sites/{wpcom_site}/posts/{parent}/revisions tags: - posts responses: '200': description: OK '401': description: Authentication required content: application/json: schema: $ref: '#/components/schemas/WPRestError' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/WPRestError' parameters: - name: wpcom_site in: path required: true schema: type: string - name: parent in: path required: true schema: type: string - name: context in: query required: false schema: type: string enum: - view - embed - edit default: view description: Scope under which the request is made; determines fields present in response. - name: page in: query required: false schema: type: integer default: 1 description: Current page of the collection. - name: per_page in: query required: false schema: type: integer description: Maximum number of items to be returned in result set. - name: search in: query required: false schema: type: string description: Limit results to those matching a string. - name: exclude in: query required: false schema: type: array default: [] items: type: integer description: Ensure result set excludes specific IDs. - name: include in: query required: false schema: type: array default: [] items: type: integer description: Limit result set to specific IDs. - name: offset in: query required: false schema: type: integer description: Offset the result set by a specific number of items. - name: order in: query required: false schema: type: string enum: - asc - desc default: desc description: Order sort attribute ascending or descending. - name: orderby in: query required: false schema: type: string enum: - date - id - include - relevance - slug - include_slugs - title default: date description: Sort collection by object attribute. servers: - url: https://public-api.wordpress.com /wp/v2/sites/{wpcom_site}/posts/{parent}/revisions/{id}: get: operationId: getWpV2SitesbyWpcomSitePostsbyParentRevisionsbyId summary: GET /wp/v2/sites/{wpcom_site}/posts/{parent}/revisions/{id} tags: - posts responses: '200': description: OK '401': description: Authentication required content: application/json: schema: $ref: '#/components/schemas/WPRestError' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/WPRestError' parameters: - name: wpcom_site in: path required: true schema: type: string - name: parent in: path required: true schema: type: string - name: id in: path required: true schema: type: string - name: context in: query required: false schema: type: string enum: - view - embed - edit default: view description: Scope under which the request is made; determines fields present in response. delete: operationId: deleteWpV2SitesbyWpcomSitePostsbyParentRevisionsbyId summary: DELETE /wp/v2/sites/{wpcom_site}/posts/{parent}/revisions/{id} tags: - posts responses: '200': description: OK '401': description: Authentication required content: application/json: schema: $ref: '#/components/schemas/WPRestError' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/WPRestError' parameters: - name: wpcom_site in: path required: true schema: type: string - name: parent in: path required: true schema: type: string - name: id in: path required: true schema: type: string - name: force in: query required: false schema: type: boolean default: false description: Required to be true, as revisions do not support trashing. servers: - url: https://public-api.wordpress.com /wpcom/v2/sites/{wpcom_site}/posts/auto-draft: post: operationId: postWpcomV2SitesbyWpcomSitePostsAutoDraft summary: POST /wpcom/v2/sites/{wpcom_site}/posts/auto-draft tags: - posts responses: '200': description: OK '401': description: Authentication required content: application/json: schema: $ref: '#/components/schemas/WPRestError' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/WPRestError' parameters: - name: wpcom_site in: path required: true schema: type: string servers: - url: https://public-api.wordpress.com /wpcom/v2/sites/{wpcom_site}/posts/map-url: get: operationId: getWpcomV2SitesbyWpcomSitePostsMapUrl summary: GET /wpcom/v2/sites/{wpcom_site}/posts/map-url tags: - posts responses: '200': description: OK '401': description: Authentication required content: application/json: schema: $ref: '#/components/schemas/WPRestError' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/WPRestError' parameters: - name: wpcom_site in: path required: true schema: type: string - name: latitude in: query required: true schema: type: string - name: longitude in: query required: true schema: type: string servers: - url: https://public-api.wordpress.com /wpcom/v2/sites/{wpcom_site}/posts/{postId}/map-url: get: operationId: getWpcomV2SitesbyWpcomSitePostsbyPostidMapUrl summary: GET /wpcom/v2/sites/{wpcom_site}/posts/{postId}/map-url tags: - posts responses: '200': description: OK '401': description: Authentication required content: application/json: schema: $ref: '#/components/schemas/WPRestError' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/WPRestError' parameters: - name: wpcom_site in: path required: true schema: type: string - name: postId in: path required: true schema: type: string - name: latitude in: query required: true schema: type: string - name: longitude in: query required: true schema: type: string servers: - url: https://public-api.wordpress.com /wpcom/v2/sites/{wpcom_site}/posts/{postId}/publicize: post: operationId: postWpcomV2SitesbyWpcomSitePostsbyPostidPublicize summary: POST /wpcom/v2/sites/{wpcom_site}/posts/{postId}/publicize tags: - posts responses: '200': description: OK '401': description: Authentication required content: application/json: schema: $ref: '#/components/schemas/WPRestError' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/WPRestError' parameters: - name: wpcom_site in: path required: true schema: type: string - name: postId in: path required: true schema: type: string requestBody: content: application/json: schema: type: object properties: message: type: string description: The message to share. skipped_connections: type: array items: {} description: Array of external connection IDs to skip sharing. async: type: boolean default: false description: Whether to share the post asynchronously. required: - message servers: - url: https://public-api.wordpress.com /wpcom/v2/sites/{wpcom_site}/posts/{postId}/publicize/published-actions: get: operationId: getWpcomV2SitesbyWpcomSitePostsbyPostidPublicizePublishedActions summary: GET /wpcom/v2/sites/{wpcom_site}/posts/{postId}/publicize/published-actions tags: - posts responses: '200': description: OK '401': description: Authentication required content: application/json: schema: $ref: '#/components/schemas/WPRestError' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/WPRestError' parameters: - name: wpcom_site in: path required: true schema: type: string - name: postId in: path required: true schema: type: string servers: - url: https://public-api.wordpress.com components: schemas: Error: type: object description: WordPress.com REST API error envelope (observed live). properties: error: type: string examples: - not_found message: type: string WPRestError: type: object description: WordPress REST API error envelope (observed on public-api.wordpress.com). properties: code: type: string example: rest_unauthorized message: type: string example: Authentication required. data: type: object properties: status: type: integer example: 401 securitySchemes: oauth2: type: oauth2 description: WordPress.com OAuth 2.1 (see /.well-known/openid-configuration). flows: authorizationCode: authorizationUrl: https://public-api.wordpress.com/oauth2-1/authorize tokenUrl: https://public-api.wordpress.com/oauth2-1/token refreshUrl: https://public-api.wordpress.com/oauth2-1/token scopes: global: '' auth: '' openid: '' profile: '' email: '' users: '' sites: '' posts: '' comments: '' taxonomy: '' follow: '' sharing: '' freshly-pressed: '' notifications: '' insights: '' read: '' stats: '' media: '' menus: '' batch: '' videos: '' bearerAuth: type: http scheme: bearer description: 'Authorization: Bearer ' x-refined-from: - 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