Skip to main content
POST
Create Block Document

Headers

x-prefect-api-version
string

Body

application/json

Data used by the Prefect REST API to create a block document.

block_schema_id
string<uuid>
required

A block schema ID

block_type_id
string<uuid>
required

A block type ID

name
string | null

The block document's name. Not required for anonymous block documents.

Pattern: ^[^/%&><]+$
data
Data · object

The block document's data

is_anonymous
boolean
default:false

Whether the block is anonymous (anonymous blocks are usually created by Prefect automatically)

Response

Successful Response

An ORM representation of a block document.

id
string<uuid>
required
created
string<date-time> | null
required
updated
string<date-time> | null
required
block_schema_id
string<uuid>
required

A block schema ID

block_type_id
string<uuid>
required

A block type ID

name
string | null

The block document's name. Not required for anonymous block documents.

Pattern: ^[^/%&><]+$
data
Data · object

The block document's data

block_schema
BlockSchema · object | null

The associated block schema

block_type_name
string | null

The associated block type's name

block_type
BlockType · object | null

The associated block type

block_document_references
Block Document References · object

Record of the block document's references

is_anonymous
boolean
default:false

Whether the block is anonymous (anonymous blocks are usually created by Prefect automatically)