WordPress Comments API
Manage WordPress comments
WordPress Comments API is one of 17 APIs that WordPress publishes on the APIs.io network, described by a machine-readable OpenAPI specification.
This API exposes 14 JSON Schema definitions.
Tagged areas include Comments. The published artifact set on APIs.io includes an OpenAPI specification, API documentation, an API reference, authentication docs, a getting-started guide, and 14 JSON Schemas.
This API exposes 2 operations across 1 path, and defines 4 schemas. It is described by OpenAPI 3.0.3, at version v2.
Requests are made against a single base URL, https://{site}/wp-json.
Metadata
The identity and technical contract details declared by the specification.
Authentication & Security 3
WordPress Comments API declares
3 security schemes
for authenticating requests.
An API key is passed in the cookie as wordpress_logged_in (cookieAuth).
It accepts HTTP basic authentication (basicAuth).
It accepts HTTP basic authentication (applicationPassword).
By default, every request must be authenticated.
cookieAuth— WordPress cookie authentication with nonce (X-WP-Nonce header required)basicAuth— HTTP Basic Authentication using Application Passwords (WordPress 5.6+)applicationPassword— Application Passwords - generate per-application passwords from user profile in WordPress admin
Paths & Operations 2
Across 1 path, the API surfaces 2 operations — 1 GET, 1 POST. Each is listed below with its method, path, parameters, and response codes.
Manage WordPress comments
Schemas 4
The contract defines 4 schemas that model the data the API accepts and returns. The most detailed are Comment (10 properties), CommentInput (5 properties), ErrorResponse (3 properties), RenderedContent (2 properties). Each schema is shown below with its type and property counts.
Specification
The full machine-readable OpenAPI contract behind this narrative.
Source
More from WordPress 12
Other APIs WordPress publishes across the network.