Using our API via a dedicated deployment? Just replace
api.langdock.com with your deployment’s base URL: <deployment-url>/api/publicUse Cases
- Temporarily disable an assistant that needs maintenance or updates
- Re-enable a previously disabled assistant
- Control assistant availability during rollouts or testing
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
assistantId | string | Yes | UUID of the assistant to enable/disable |
disabled | boolean | Yes | true to disable, false to enable |
Example
Response Format
Success Response (200 OK)
Error Handling
| Status Code | Description |
|---|---|
| 400 | Invalid parameters (missing assistantId or disabled) |
| 401 | Invalid or missing API key |
| 403 | Insufficient permissions to disable assistants |
| 404 | Assistant not found or API key does not have access |
| 429 | Rate limit exceeded |
Behavior
When an assistant is disabled:- Users cannot start new conversations with the assistant
- The assistant does not appear in the assistant library for regular users
- Existing conversations may still be viewable but the assistant cannot respond
- Admins can still view and manage the assistant
- The assistant can be re-enabled at any time
Langdock intentionally blocks browser-origin requests to protect your API key and ensure your applications remain secure. For more information, please see our guide on API Key Best Practices.