Types – REST API Handbook | Developer.WordPress.org

Types

Schema

The schema defines all the fields that exist within a type record. Any response from these endpoints can be expected to contain the fields below unless the `_filter` query parameter is used or the schema field only appears in a specific context.

Retrieve a Type

Definition & Example Request

GET /wp/v2/types

Query this endpoint to retrieve a specific type record.

$ curl https://example.com/wp-json/wp/v2/types

Arguments

context Scope under which the request is made; determines fields present in response.

Default: view

One of: view, embed, edit

Retrieve a Type

Definition & Example Request

GET /wp/v2/types/<type>

Query this endpoint to retrieve a specific type record.

$ curl https://example.com/wp-json/wp/v2/types/<type>

Arguments