Global Styles

These routes let you retrieve and update a block theme's global styles and settings, and retrieve their revisions.

Available routes (endpoints are described below):

/wp/v2/global-styles/themes/{stylesheet}
/wp/v2/global-styles/{id}
/wp/v2/global-styles/{parent}/revisions

Controller classes:

Resource schema

The schema lists fields returned by the resource. Fields depend on the context and user capabilities.

Field Context Description
id view, edit Resource field.
styles view, edit Resource field.
settings view, edit Resource field.
stylesheet view, edit Resource field.
theme view, edit Resource field.
version view, edit Resource field.

/wp/v2/global-styles/themes/{stylesheet}

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/global-styles/themes/{stylesheet}

Get data

Request type

GET /wp/v2/global-styles/themes/{stylesheet}

Request parameters

$context(string)
Response context: view, embed, or edit.
$page(integer)
Collection page number.
$per_page(integer)
Number of items per page.

Request example

$ curl https://example.com/wp-json/wp/v2/global-styles/themes/twentytwentyfive

Create, update, and delete

Request type

POST /wp/v2/global-styles/themes/{stylesheet}
POST /wp/v2/global-styles/{id}
DELETE /wp/v2/global-styles/{id}

Request parameters

$id(string)
Resource field value.
$styles(string)
Resource field value.
$settings(string)
Resource field value.
$stylesheet(string)
Resource field value.

Request example

$ curl -X POST https://example.com/wp-json/wp/v2/global-styles/themes/{stylesheet} -d status=publish