Skip to main content
POST
/
templates
/
{id}
/
compile
Compile a template
curl --request POST \
  --url https://api.lithoblocks.com/templates/{id}/compile \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "template_id": "<string>",
  "data": {}
}
'
{
  "template": {
    "id": "<string>",
    "name": "<string>",
    "type": "<string>",
    "user_name": "<string>",
    "icon_emoji": "<string>"
  },
  "compiled_message": "<string>",
  "status": "success",
  "remaining_credits": 123
}

Authorizations

Authorization
string
header
required

LithoBlocks API key obtained from your organization dashboard

Path Parameters

id
string
required

Body

application/json

Compile template with credits

template_id
string
required
data
object
required

Response

Successfully compiled template with credits

template
object
required
compiled_message
string
required
status
enum<string>
required
Available options:
success
remaining_credits
number