Skip to content

Tag prompts

Update the AI prompt behind one tag.

Update tag prompt

PUT/v1/config/prompts/tags/{tag_id}/
config:writeIdempotency-Key required

Parameters

NameInTypeNotes
tag_idrequiredpathinteger—
Idempotency-Keyrequiredheaderstring (uuid)UUID4 identifying one intended write. Reuse it only when retrying that same write.

Request body

FieldTypeNotes
promptrequiredstringmax length 10000
Response fields (200)
FieldTypeNotes
kindstringread-only
promptstringread-only
prompt_hashstringread-only

Responses

  • 200Success
  • 400The request is invalid.
  • 401Authentication is missing, invalid, or revoked.
  • 403The authenticated identity lacks the required scope or capability.
  • 404The resource is unavailable or not visible to this organization.
  • 409The write conflicts with current state or an identical request is still running.
  • 422The write contains fields outside its closed input schema.
  • 429The request-rate budget is exhausted.

Example request

curl
curl -X PUT "https://api.themochi.app/v1/config/prompts/tags/<tag_id>/" \
  -H "Authorization: Bearer $MOCHI_API_KEY" \
  -H "Idempotency-Key: $(uuidgen | tr A-Z a-z)" \
  -H "Content-Type: application/json" \
  -d '{"prompt":"string"}'