> For the complete documentation index, see [llms.txt](https://docs.themochi.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.themochi.app/api-reference/prompt.md).

# Prompt

## PUT /v1/config/prompts/{prompt\_kind}/

>

```json
{"openapi":"3.0.3","info":{"title":"Mochi Public API","version":"1.0.0"},"servers":[{"description":"Production","url":"https://api.themochi.app"}],"security":[{"BearerAuth":[]},{"PublicApiOAuth":["config:write"]}],"components":{"securitySchemes":{"BearerAuth":{"scheme":"bearer","type":"http"},"PublicApiOAuth":{"flows":{"authorizationCode":{"authorizationUrl":"https://api.themochi.app/api/zapier/oauth/authorize/","scopes":{"analytics:read":"Access analytics:read","automations:write":"Access automations:write","bookings:read":"Access bookings:read","config:read":"Access config:read","config:write":"Access config:write","content:write":"Access content:write","leads:read":"Access leads:read","leads:write":"Access leads:write","links:write":"Access links:write","messages:send":"Access messages:send","revenue:read":"Access revenue:read","signals:read":"Access signals:read","team:read":"Access team:read"},"tokenUrl":"https://api.themochi.app/api/zapier/oauth/token/"}},"type":"oauth2"}},"parameters":{"IdempotencyKey":{"description":"UUID4 identifying one intended write. Reuse it only when retrying that same write.","in":"header","name":"Idempotency-Key","required":true,"schema":{"format":"uuid","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$","type":"string"}}},"schemas":{"Input_prompt_update":{"additionalProperties":false,"properties":{"prompt":{"maxLength":10000,"type":"string"}},"required":["prompt"],"type":"object"},"Output_prompt_update":{"properties":{"kind":{"readOnly":true,"type":"string"},"prompt":{"readOnly":true,"type":"string"},"prompt_hash":{"readOnly":true,"type":"string"}},"type":"object"},"PublicApiErrorEnvelope":{"additionalProperties":false,"properties":{"error":{"additionalProperties":false,"properties":{"fields":{"additionalProperties":true,"type":"object"},"message":{"type":"string"},"request_id":{"type":"string"},"retry_after":{"minimum":0,"type":"integer"},"type":{"type":"string"}},"required":["type","message","request_id"],"type":"object"}},"required":["error"],"type":"object"}},"responses":{"BadRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorEnvelope"}}},"description":"The request is invalid."},"Unauthorized":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorEnvelope"}}},"description":"Authentication is missing, invalid, or revoked."},"Forbidden":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorEnvelope"}}},"description":"The authenticated identity lacks the required scope or capability."},"NotFound":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorEnvelope"}}},"description":"The resource is unavailable or not visible to this organization."},"Conflict":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorEnvelope"}}},"description":"The write conflicts with current state or an identical request is still running."},"UnprocessableEntity":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorEnvelope"}}},"description":"The write contains fields outside its closed input schema."},"TooManyRequests":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorEnvelope"}}},"description":"The request-rate budget is exhausted."}}},"paths":{"/v1/config/prompts/{prompt_kind}/":{"put":{"operationId":"put_public_prompt_update","parameters":[{"in":"path","name":"prompt_kind","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Input_prompt_update"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Output_prompt_update"}}},"description":"Success"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"tags":["prompt"]}}}}
```
