Skip to navigation

Save draft (upsert)

View as Markdown
Creates or updates a prompt draft and uploads the body to storage. Requires org admin.

Authentication

X-API-Keystring

API key supplied via the X-API-Key header. Takes precedence over bearerApiKey when both are present. Listed only on operations that actually accept a key.

OR
AuthorizationBearer

Same organization API key supplied as a Bearer token in the Authorization header (Authorization: Bearer <key>). Compatible with OpenAI-SDK-standard clients. Accepted wherever this scheme is listed on the operation — not every endpoint; if both X-API-Key and Authorization: Bearer are present, X-API-Key wins.

OR
AuthorizationBearer

Supabase session JWT from a signed-in browser session, supplied as Authorization: Bearer <jwt>. This is what the web app sends. It shares the Authorization header with bearerApiKey; the server distinguishes them by the ela_ prefix on API keys.

Request

This endpoint expects an object.
registryRefstringRequired
promptNamestringRequiredformat: "^[a-zA-Z0-9._-]+$">=1 character
artifactTypeenumRequired
Allowed values:
draftVersionstringRequiredformat: "^\d+\.\d+\.\d+$">=1 character
bodystringRequired
frontmattermap from strings to anyOptional
previousPromptNamestringOptional

Response

OK
any
OR
any