ReferenceREST API

Prompts

Overview

Prompts are reusable Tenant templates with inferred variables. Use them to centralize instructions that Generation, Sessions, or other callers render repeatedly.

Endpoints

POST /v1/prompts

Creates a reusable Prompt. Distinct {{variable}} tokens are inferred and returned as the read-only variables array. Names are unique; a tenant can have at most 100 Prompts.

Request

Requires bearer authentication and JSON. There are no path or query parameters. The credential selects the Tenant ownership boundary; reads and mutations are restricted to resources owned by that Tenant.

LocationFieldRequiredDescription
HeaderAuthorizationyesTenant API key or dashboard Supabase JWT.
Body fieldTypeRequiredDescription
namestringyes1–80 characters
templatestringyesNon-empty template, up to 10,240 characters and 10 variables
userIdstringnoDefaults to ""
metadataobjectnoDefaults to {}

Variable names match [A-Za-z_][A-Za-z0-9_]*.

Response

Returns 201 Created with a Prompt object.

Response schema: promptResponseSchema.

{
  "id": "prompt_1234567890ABCDEF",
  "tenantId": "ten_1234567890ABCDEF",
  "name": "Welcome",
  "template": "Welcome, {{name}}!",
  "variables": ["name"],
  "userId": "",
  "metadata": {},
  "createdAt": "2026-07-10T10:00:00Z",
  "updatedAt": "2026-07-10T10:00:00Z"
}

Errors

400 invalid_request for invalid input/variables, duplicate names, or the Prompt cap. See REST errors.

cURL

curl --request POST "$BLAZING_AGENTS_BASE_URL/v1/prompts" \
  --header "Authorization: Bearer $BLAZING_AGENTS_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{"name":"Welcome","template":"Welcome, {{name}}!"}'

SDK: create. See Prompts and Generate structured output.

GET /v1/prompts

Returns Prompts ordered by most recently updated. The bounded list is not paginated; variables is derived on every read.

Request

Requires bearer authentication. The credential selects the Tenant ownership boundary; reads and mutations are restricted to resources owned by that Tenant.

LocationFieldRequiredDescription
HeaderAuthorizationyesTenant API key or dashboard Supabase JWT.
Query parameterTypeRequiredDescription
userIdstringnoAttribution filter; "" selects tenant-level Prompts

There is no request body.

Response

Returns 200 OK with a prompts array. Each item is a complete Prompt object.

Response schema: promptsResponseSchema.

Errors

400 invalid_request for unknown query fields. See REST errors.

cURL

curl --get "$BLAZING_AGENTS_BASE_URL/v1/prompts" \
  --header "Authorization: Bearer $BLAZING_AGENTS_API_KEY" \
  --data-urlencode "userId="

SDK: list. See Prompts and Generate structured output.

GET /v1/prompts/:promptId

Returns one Prompt definition with its current template and variables. Reading a Prompt does not change its lifecycle or usage state.

Request

Requires bearer authentication and a prompt_… promptId path parameter. There are no query or body parameters. The credential selects the Tenant ownership boundary; reads and mutations are restricted to resources owned by that Tenant.

LocationFieldRequiredDescription
HeaderAuthorizationyesTenant API key or dashboard Supabase JWT.
PathpromptIdyesPrompt ID (prompt_…).

Response

Returns 200 OK with a complete Prompt object.

Response schema: promptResponseSchema.

{
  "id": "prompt_1234567890ABCDEF",
  "tenantId": "ten_1234567890ABCDEF",
  "name": "Welcome",
  "template": "Welcome, {{name}}!",
  "variables": ["name"],
  "userId": "",
  "metadata": {},
  "createdAt": "2026-07-10T10:00:00Z",
  "updatedAt": "2026-07-10T10:00:00Z"
}

Errors

400 invalid_request for a malformed ID. 404 not_found when missing or foreign. See REST errors.

cURL

curl "$BLAZING_AGENTS_BASE_URL/v1/prompts/prompt_1234567890ABCDEF" \
  --header "Authorization: Bearer $BLAZING_AGENTS_API_KEY"

SDK: get. See Prompts and Generate structured output.

PATCH /v1/prompts/:promptId

Updates the latest Prompt in place. Changing template re-derives variables; Prompts are not versioned. userId is immutable.

Request

Requires bearer authentication, JSON, and a prompt_… promptId. The credential selects the Tenant ownership boundary; reads and mutations are restricted to resources owned by that Tenant.

LocationFieldRequiredDescription
HeaderAuthorizationyesTenant API key or dashboard Supabase JWT.
PathpromptIdyesPrompt ID (prompt_…).
Body fieldTypeRequiredDescription
namestringnoNew name
templatestringnoNew template, up to 10,240 characters
metadataobjectnoReplacement metadata

At least one body field is required. There are no query parameters.

Response

Returns 200 OK with the complete updated Prompt object.

Response schema: promptResponseSchema.

Errors

400 invalid_request for invalid/empty input, invalid variables, or duplicate names. 404 not_found when missing or foreign. See REST errors.

cURL

curl --request PATCH \
  "$BLAZING_AGENTS_BASE_URL/v1/prompts/prompt_1234567890ABCDEF" \
  --header "Authorization: Bearer $BLAZING_AGENTS_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{"template":"Hello, {{name}}!"}'

SDK: update. See Prompts and Generate structured output.

DELETE /v1/prompts/:promptId

Hard-deletes the Prompt. Past transcripts contain only rendered text, so deletion is never blocked by references.

Request

Requires bearer authentication and a prompt_… promptId. There are no query or body parameters. The credential selects the Tenant ownership boundary; reads and mutations are restricted to resources owned by that Tenant.

LocationFieldRequiredDescription
HeaderAuthorizationyesTenant API key or dashboard Supabase JWT.
PathpromptIdyesPrompt ID (prompt_…).

Response

Returns 204 No Content with an empty body.

Errors

400 invalid_request for a malformed ID. 404 not_found when missing or foreign. See REST errors.

cURL

curl --request DELETE \
  "$BLAZING_AGENTS_BASE_URL/v1/prompts/prompt_1234567890ABCDEF" \
  --header "Authorization: Bearer $BLAZING_AGENTS_API_KEY"

SDK: delete. See Prompts and Generate structured output.

On this page