---
title: "Create Block Type"
method: POST
path: "/api/block_types/"
tags: ["Block types"]
---

# Create Block Type

`POST /api/block_types/`

Create a new block type

## Headers

- `x-prefect-api-version` string

## Request body

- BlockTypeCreate — Data used by the Prefect REST API to create a block type.
  - `name` string, required — A block type's name
  - `slug` string, required — A block type's slug
  - `logo_url` string, uri — Web URL for the block type's logo
  - `documentation_url` string, uri — Web URL for the block type's documentation
  - `description` string — A short blurb about the corresponding block's intended use
  - `code_example` string — A code snippet demonstrating use of the corresponding block

## Response `201`

Successful Response

- BlockType — An ORM representation of a block type
  - `id` string, uuid
  - `created` string, date-time
  - `updated` string, date-time
  - `name` string, required — A block type's name
  - `slug` string, required — A block type's slug
  - `logo_url` string, uri — Web URL for the block type's logo
  - `documentation_url` string, uri — Web URL for the block type's documentation
  - `description` string — A short blurb about the corresponding block's intended use
  - `code_example` string — A code snippet demonstrating use of the corresponding block
  - `is_protected` boolean — Protected block types cannot be modified via API.

## Other responses

- `422` — Validation Error

## Changes

- **2024-04-03** `93ae2b3f2efd` — 2 breaking
  - the request property `name` became required
  - the request property `slug` became required

[Change history](https://skmtc.dev/prefecthq/apis/untitled-api-2/changes/api/block_types/post.md)

---

[API](https://skmtc.dev/prefecthq/apis/untitled-api-2.md) · [All operations](https://skmtc.dev/prefecthq/apis/untitled-api-2/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/prefecthq/untitled-api-2/revisions/29ba6c4f8837/schema)
