Block Types Edit

Schema 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

string or null
Editor script handle.

Read only

Context: embed, view, edit

script

string or null
Public facing script handle.

Read only

Context: embed, view, edit

editor_style

string or null
Editor style handle.

Read only

Context: embed, view, edit

style

string or null
Public facing style handle.

Read only

Context: embed, view, edit

styles

array
Block style 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

keywords

array
Block keywords.

Read only

Context: embed, view, edit

example

object or null
Block example.

Read only

Context: embed, view, edit

Top ↑

Retrieve a Block Type Retrieve a Block Type

Definition & Example Request 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 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 Retrieve a Block Type

Top ↑

Definition & Example Request 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 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 Retrieve a Block Type

Top ↑

Definition & Example Request 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 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