Block Types
These routes provide information about blocks registered in WordPress and their settings.
Available routes (endpoints are described below):
/wp/v2/block-types
/wp/v2/block-types/{namespace}
/wp/v2/block-types/{namespace}/{name}
Controller classes:
Contents:
Resource schema
The schema lists fields returned by the resource. Fields depend on the context and user capabilities.
| Field | Context | Description |
|---|---|---|
| api_version | view, edit |
Resource field. |
| title | view, edit |
Resource field. |
| name | view, edit |
Resource field. |
| icon | view, edit |
Resource field. |
| description | view, edit |
Resource field. |
| category | view, edit |
Resource field. |
| supports | view, edit |
Resource field. |
| styles | view, edit |
Resource field. |
/wp/v2/block-types
An OPTIONS request returns methods, parameters, and the complete schema for the selected route.
$ curl -X OPTIONS -i https://example.com/wp-json/wp/v2/block-types
Get data
Request type
GET /wp/v2/block-types
Request parameters
- $context(string)
- Response context:
view,embed, oredit. - $page(integer)
- Collection page number.
- $per_page(integer)
- Number of items per page.
Request example
$ curl https://example.com/wp-json/wp/v2/block-types