---
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

---

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