Skip to main content
Create a template

Authorizations

Authorization
string
header
required

LithoBlocks API key obtained from your organization dashboard. The LithoBlocks MCP server also presents a Supabase-issued user session token here on the user's behalf; such a token acts as that user with the scopes their organization role allows.

Headers

Idempotency-Key
string

Any unique string (a UUID is fine). Repeating a request with the same key and body within 24 hours replays the original response with Idempotency-Replayed: true instead of running again; the same key with a different body is a 409. Incomplete and 5xx outcomes are retained for reconciliation beyond 24 hours. Applies only on the documented endpoints. Never automatically change keys to bypass an uncertain outcome.

Required string length: 1 - 255
Example:

"3f7d2c1a-9b4e-4f0a-8c6d-2e1b5a7c9d10"

Body

application/json

Template and first version

name
string
required
Required string length: 1 - 255
blocks
object[]
required

The first version's blocks

Minimum array length: 1
type
string
Maximum string length: 100
icon_emoji
string
Maximum string length: 100
user_name
string
Maximum string length: 100
cc_users
string[]
tags
string[]
Maximum array length: 20
Required string length: 1 - 50
is_public
boolean
default:false
expiration
object

How messages sent from this version expire.

status
string
deprecated

Deprecated: a free-text label for the first version that nothing enforces; stored as sent, draft when omitted. Use activate to make it live. Sending it adds a Deprecation response header.

sample_data
object

Data the blocks are validated against; defaults to a null-filled skeleton of the request format

entity_id
string
request_format
object

Override; derived from the blocks when omitted

activate
boolean
default:false

Make the first version current immediately. Requires the templates:activate scope.

Response

The created template, with its first version under version and, when activated, as current_version

id
string
required
name
string
required
description
string
required
created_at
string
required
updated_at
string
required
is_public
boolean
required
current_version_id
string
required
author_id
string
required
request_format
object
required

{ template_id, data } where data holds null per placeholder and [{ field: null }] per array path; older templates may carry a flat map. For types, labels and nesting over the same paths, see GET /templates/{id}/input-schema

cc_users
string[]
required
icon_emoji
string
required
user_name
string
required
lifecycle
enum<string>
required

archived templates cannot be sent, compiled, versioned or activated until unarchived

Available options:
active,
archived
archived_at
string | null
required
version
object
required
author
object
current_version
object