userId.
Request
Body
The LLM API key is not part of this body and must not be sent here.
It’s envelope-encrypted at rest via a separate endpoint and never rides in a
chat body. See BYO-key flow.
Behaviour
The route runs in a single Drizzle transaction:- Update the user’s
llm_providerandllm_modelcolumns. - Look up an existing bot for the user.
- If present,
UPDATEit; return200 OK. - Otherwise
INSERT; return201 Created.
Responses
201 Created (first save)
YYYY-MM-DDThh:mm:ss.sssZ.
200 OK (subsequent saves)
Same shape,updatedAt advances.
400 Bad Request - invalid JSON
400 Bad Request - validation failure
401 Unauthorized
cURL
Notes
loadingMessagesis set server-side atINSERTtime from a default JSON literal. It is not part of the request body.isActivedefaults totrue; bot enable/disable is managed from the dashboard.- Multi-bot support is planned (see the Roadmap).