# Editor Blocks

<div class="section route">

<div class="primary">

## Schema

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

<table class="attributes">
<colgroup>
<col style="width: 50%" />
<col style="width: 50%" />
</colgroup>
<tbody>
<tr id="schema-date">
<td><code>date</code></td>
<td>The date the post was published, in the site’s timezone.
<p>JSON data type: string or null, Format: datetime (<a href="https://core.trac.wordpress.org/ticket/41032">details</a>)</p>
<p>Context: <code>view</code>, <code>edit</code>, <code>embed</code></p></td>
</tr>
<tr id="schema-date_gmt">
<td><code>date_gmt</code></td>
<td>The date the post was published, as GMT.
<p>JSON data type: string or null, Format: datetime (<a href="https://core.trac.wordpress.org/ticket/41032">details</a>)</p>
<p>Context: <code>view</code>, <code>edit</code></p></td>
</tr>
<tr id="schema-guid">
<td><code>guid</code></td>
<td>The globally unique identifier for the post.
<p>JSON data type: object</p>
<p>Read only</p>
<p>Context: <code>view</code>, <code>edit</code></p></td>
</tr>
<tr id="schema-id">
<td><code>id</code></td>
<td>Unique identifier for the post.
<p>JSON data type: integer</p>
<p>Read only</p>
<p>Context: <code>view</code>, <code>edit</code>, <code>embed</code></p></td>
</tr>
<tr id="schema-link">
<td><code>link</code></td>
<td>URL to the post.
<p>JSON data type: string, Format: uri</p>
<p>Read only</p>
<p>Context: <code>view</code>, <code>edit</code>, <code>embed</code></p></td>
</tr>
<tr id="schema-modified">
<td><code>modified</code></td>
<td>The date the post was last modified, in the site’s timezone.
<p>JSON data type: string, Format: datetime (<a href="https://core.trac.wordpress.org/ticket/41032">details</a>)</p>
<p>Read only</p>
<p>Context: <code>view</code>, <code>edit</code></p></td>
</tr>
<tr id="schema-modified_gmt">
<td><code>modified_gmt</code></td>
<td>The date the post was last modified, as GMT.
<p>JSON data type: string, Format: datetime (<a href="https://core.trac.wordpress.org/ticket/41032">details</a>)</p>
<p>Read only</p>
<p>Context: <code>view</code>, <code>edit</code></p></td>
</tr>
<tr id="schema-slug">
<td><code>slug</code></td>
<td>An alphanumeric identifier for the post unique to its type.
<p>JSON data type: string</p>
<p>Context: <code>view</code>, <code>edit</code>, <code>embed</code></p></td>
</tr>
<tr id="schema-status">
<td><code>status</code></td>
<td>A named status for the post.
<p>JSON data type: string</p>
<p>Context: <code>view</code>, <code>edit</code></p>
One of: <code>publish</code>, <code>future</code>, <code>draft</code>, <code>pending</code>, <code>private</code></td>
</tr>
<tr id="schema-type">
<td><code>type</code></td>
<td>Type of post.
<p>JSON data type: string</p>
<p>Read only</p>
<p>Context: <code>view</code>, <code>edit</code>, <code>embed</code></p></td>
</tr>
<tr id="schema-password">
<td><code>password</code></td>
<td>A password to protect access to the content and excerpt.
<p>JSON data type: string</p>
<p>Context: <code>edit</code></p></td>
</tr>
<tr id="schema-title">
<td><code>title</code></td>
<td>The title for the post.
<p>JSON data type: object</p>
<p>Context: <code>view</code>, <code>edit</code>, <code>embed</code></p></td>
</tr>
<tr id="schema-content">
<td><code>content</code></td>
<td>The content for the post.
<p>JSON data type: object</p>
<p>Context: <code>view</code>, <code>edit</code></p></td>
</tr>
<tr id="schema-meta">
<td><code>meta</code></td>
<td>Meta fields.
<p>JSON data type: object</p>
<p>Context: <code>view</code>, <code>edit</code></p></td>
</tr>
<tr id="schema-template">
<td><code>template</code></td>
<td>The theme file to use to display the post.
<p>JSON data type: string</p>
<p>Context: <code>view</code>, <code>edit</code></p></td>
</tr>
</tbody>
</table>

</div>

</div>

<div>

<div class="section route">

<div class="primary">

## List Editor Blocks

Query this endpoint to retrieve a collection of Editor Blocks. The response you receive can be controlled and filtered using the URL query parameters below.

### Definition

`GET /wp/v2/blocks`

### Example Request

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

</div>

<div class="secondary">

### Arguments

<table class="arguments">
<colgroup>
<col style="width: 50%" />
<col style="width: 50%" />
</colgroup>
<tbody>
<tr>
<td><code>context</code><br />
</td>
<td>Scope under which the request is made; determines fields present in response.
<p>Default: <code>view</code></p>
One of: <code>view</code>, <code>embed</code>, <code>edit</code></td>
</tr>
<tr>
<td><code>page</code><br />
</td>
<td>Current page of the collection.
<p>Default: <code>1</code></p></td>
</tr>
<tr>
<td><code>per_page</code><br />
</td>
<td>Maximum number of items to be returned in result set.
<p>Default: <code>10</code></p></td>
</tr>
<tr>
<td><code>search</code><br />
</td>
<td>Limit results to those matching a string.</td>
</tr>
<tr>
<td><code>after</code><br />
</td>
<td>Limit response to posts published after a given ISO8601 compliant date.</td>
</tr>
<tr>
<td><code>modified_after</code><br />
</td>
<td>Limit response to posts modified after a given ISO8601 compliant date.</td>
</tr>
<tr>
<td><code>before</code><br />
</td>
<td>Limit response to posts published before a given ISO8601 compliant date.</td>
</tr>
<tr>
<td><code>modified_before</code><br />
</td>
<td>Limit response to posts modified before a given ISO8601 compliant date.</td>
</tr>
<tr>
<td><code>exclude</code><br />
</td>
<td>Ensure result set excludes specific IDs.</td>
</tr>
<tr>
<td><code>include</code><br />
</td>
<td>Limit result set to specific IDs.</td>
</tr>
<tr>
<td><code>offset</code><br />
</td>
<td>Offset the result set by a specific number of items.</td>
</tr>
<tr>
<td><code>order</code><br />
</td>
<td>Order sort attribute ascending or descending.
<p>Default: <code>desc</code></p>
One of: <code>asc</code>, <code>desc</code></td>
</tr>
<tr>
<td><code>orderby</code><br />
</td>
<td>Sort collection by post attribute.
<p>Default: <code>date</code></p>
One of: <code>author</code>, <code>date</code>, <code>id</code>, <code>include</code>, <code>modified</code>, <code>parent</code>, <code>relevance</code>, <code>slug</code>, <code>include_slugs</code>, <code>title</code></td>
</tr>
<tr>
<td><code>search_columns</code><br />
</td>
<td>Array of column names to be searched.</td>
</tr>
<tr>
<td><code>slug</code><br />
</td>
<td>Limit result set to posts with one or more specific slugs.</td>
</tr>
<tr>
<td><code>status</code><br />
</td>
<td>Limit result set to posts assigned one or more statuses.
<p>Default: <code>publish</code></p></td>
</tr>
</tbody>
</table>

</div>

</div>

<div class="section route">

<div class="primary">

## Create a Editor Block

### Arguments

<table class="arguments">
<colgroup>
<col style="width: 50%" />
<col style="width: 50%" />
</colgroup>
<tbody>
<tr>
<td><a href="#schema-date"><code>date</code></a><br />
</td>
<td>The date the post was published, in the site’s timezone.</td>
</tr>
<tr>
<td><a href="#schema-date_gmt"><code>date_gmt</code></a><br />
</td>
<td>The date the post was published, as GMT.</td>
</tr>
<tr>
<td><a href="#schema-slug"><code>slug</code></a><br />
</td>
<td>An alphanumeric identifier for the post unique to its type.</td>
</tr>
<tr>
<td><a href="#schema-status"><code>status</code></a><br />
</td>
<td>A named status for the post. One of: <code>publish</code>, <code>future</code>, <code>draft</code>, <code>pending</code>, <code>private</code></td>
</tr>
<tr>
<td><a href="#schema-password"><code>password</code></a><br />
</td>
<td>A password to protect access to the content and excerpt.</td>
</tr>
<tr>
<td><a href="#schema-title"><code>title</code></a><br />
</td>
<td>The title for the post.</td>
</tr>
<tr>
<td><a href="#schema-content"><code>content</code></a><br />
</td>
<td>The content for the post.</td>
</tr>
<tr>
<td><a href="#schema-meta"><code>meta</code></a><br />
</td>
<td>Meta fields.</td>
</tr>
<tr>
<td><a href="#schema-template"><code>template</code></a><br />
</td>
<td>The theme file to use to display the post.</td>
</tr>
</tbody>
</table>

</div>

<div class="secondary">

### Definition

`POST /wp/v2/blocks`

</div>

</div>

<div class="section route">

<div class="primary">

## Retrieve a Editor Block

### Definition & Example Request

`GET /wp/v2/blocks/<id>` Query this endpoint to retrieve a specific Editor Block record. `$ curl https://example.com/wp-json/wp/v2/blocks/<id>`

</div>

<div class="secondary">

### Arguments

<table class="arguments">
<colgroup>
<col style="width: 50%" />
<col style="width: 50%" />
</colgroup>
<tbody>
<tr>
<td><code>id</code><br />
</td>
<td>Unique identifier for the post.</td>
</tr>
<tr>
<td><code>context</code><br />
</td>
<td>Scope under which the request is made; determines fields present in response.
<p>Default: <code>view</code></p>
One of: <code>view</code>, <code>embed</code>, <code>edit</code></td>
</tr>
<tr>
<td><code>password</code><br />
</td>
<td>The password for the post if it is password protected.</td>
</tr>
</tbody>
</table>

</div>

</div>

<div class="section route">

<div class="primary">

## Update a Editor Block

### Arguments

<table class="arguments">
<colgroup>
<col style="width: 50%" />
<col style="width: 50%" />
</colgroup>
<tbody>
<tr>
<td><a href="#schema-id"><code>id</code></a><br />
</td>
<td>Unique identifier for the post.</td>
</tr>
<tr>
<td><a href="#schema-date"><code>date</code></a><br />
</td>
<td>The date the post was published, in the site’s timezone.</td>
</tr>
<tr>
<td><a href="#schema-date_gmt"><code>date_gmt</code></a><br />
</td>
<td>The date the post was published, as GMT.</td>
</tr>
<tr>
<td><a href="#schema-slug"><code>slug</code></a><br />
</td>
<td>An alphanumeric identifier for the post unique to its type.</td>
</tr>
<tr>
<td><a href="#schema-status"><code>status</code></a><br />
</td>
<td>A named status for the post. One of: <code>publish</code>, <code>future</code>, <code>draft</code>, <code>pending</code>, <code>private</code></td>
</tr>
<tr>
<td><a href="#schema-password"><code>password</code></a><br />
</td>
<td>A password to protect access to the content and excerpt.</td>
</tr>
<tr>
<td><a href="#schema-title"><code>title</code></a><br />
</td>
<td>The title for the post.</td>
</tr>
<tr>
<td><a href="#schema-content"><code>content</code></a><br />
</td>
<td>The content for the post.</td>
</tr>
<tr>
<td><a href="#schema-meta"><code>meta</code></a><br />
</td>
<td>Meta fields.</td>
</tr>
<tr>
<td><a href="#schema-template"><code>template</code></a><br />
</td>
<td>The theme file to use to display the post.</td>
</tr>
</tbody>
</table>

</div>

<div class="secondary">

### Definition

`POST /wp/v2/blocks/<id>`

### Example Request

</div>

</div>

<div class="section route">

<div class="primary">

## Delete a Editor Block

### Arguments

<table class="arguments">
<colgroup>
<col style="width: 50%" />
<col style="width: 50%" />
</colgroup>
<tbody>
<tr>
<td><code>id</code><br />
</td>
<td>Unique identifier for the post.</td>
</tr>
<tr>
<td><code>force</code><br />
</td>
<td>Whether to bypass Trash and force deletion.</td>
</tr>
</tbody>
</table>

</div>

<div class="secondary">

### Definition

`DELETE /wp/v2/blocks/<id>`

### Example Request

`$ curl -X DELETE https://example.com/wp-json/wp/v2/blocks/<id>`

</div>

</div>

</div>