Block Types Edit

Schema

The schema defines all the fields that exist within a block 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.

api_version

integer
Version of block API.

Read only

Context: embed, view, edit

title

string
Title of block type.

Read only

Context: embed, view, edit

name

string
Unique name identifying the block type.

Read only

Context: embed, view, edit

description

string
Description of block type.

Read only

Context: embed, view, edit

icon

string or null
Icon of block type.

Read only

Context: embed, view, edit

attributes

object or null
Block attributes.

Read only

Context: embed, view, edit

provides_context

object
Context provided by blocks of this type.

Read only

Context: embed, view, edit

uses_context

array
Context values inherited by blocks of this type.

Read only

Context: embed, view, edit

supports

object
Block supports.

Read only

Context: embed, view, edit

category

string or null
Block category.

Read only

Context: embed, view, edit

is_dynamic

boolean
Is the block dynamically rendered.

Read only

Context: embed, view, edit

editor_script_handles

array
Editor script handles.

Read only

Context: embed, view, edit

script_handles

array
Public facing and editor script handles.

Read only

Context: embed, view, edit

view_script_handles

array
Public facing script handles.

Read only

Context: embed, view, edit

editor_style_handles

array
Editor style handles.

Read only

Context: embed, view, edit

style_handles

array
Public facing and editor style handles.

Read only

Context: embed, view, edit

styles

array
Block style variations.

Read only

Context: embed, view, edit

variations

array
Block variations.

Read only

Context: embed, view, edit

textdomain

string or null
Public text domain.

Read only

Context: embed, view, edit

parent

array or null
Parent blocks.

Read only

Context: embed, view, edit

ancestor

array or null
Ancestor blocks.

Read only

Context: embed, view, edit

keywords

array
Block keywords.

Read only

Context: embed, view, edit

example

object or null
Block example.

Read only

Context: embed, view, edit

editor_script

string or null
Editor script handle. DEPRECATED: Use `editor_script_handles` instead.

Read only

Context: embed, view, edit

script

string or null
Public facing and editor script handle. DEPRECATED: Use `script_handles` instead.

Read only

Context: embed, view, edit

view_script

string or null
Public facing script handle. DEPRECATED: Use `view_script_handles` instead.

Read only

Context: embed, view, edit

editor_style

string or null
Editor style handle. DEPRECATED: Use `editor_style_handles` instead.

Read only

Context: embed, view, edit

style

string or null
Public facing and editor style handle. DEPRECATED: Use `style_handles` instead.

Read only

Context: embed, view, edit

Top ↑

Retrieve a Block Type

Top ↑

Definition & Example Request

GET /wp/v2/block-types

Query this endpoint to retrieve a specific block type record.

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

Top ↑

Arguments

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

Default: view

One of: view, embed, edit

namespace Block namespace.

Top ↑

Retrieve a Block Type

Top ↑

Definition & Example Request

GET /wp/v2/block-types/<namespace>

Query this endpoint to retrieve a specific block type record.

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

Top ↑

Arguments

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

Default: view

One of: view, embed, edit

namespace Block namespace.

Top ↑

Retrieve a Block Type

Top ↑

Definition & Example Request

GET /wp/v2/block-types/<namespace>/<name>

Query this endpoint to retrieve a specific block type record.

$ curl https://example.com/wp-json/wp/v2/block-types/<namespace>/<name>

Top ↑

Arguments

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

Default: view

One of: view, embed, edit