Assistant Disable API
Enable or disable an assistant programmatically
Assistant Disable API
Enable or disable an assistant programmatically
The Assistants API is being deprecated on 30 April. For new implementations, please use the Agents API instead. See our migration guide for details.
Using our API via a dedicated deployment? Just replace
api.odeus.aiwith your deployment's base URL:<deployment-url>/api/public
Enables or disables an assistant in your workspace. Disabled assistants cannot be used by workspace members until re-enabled.
This is an administrative action. Only workspace admins or users with appropriate permissions can disable/enable assistants.
Use 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
const axios = require("axios");
async function toggleAssistantStatus(assistantId, disabled) {
const response = await axios.patch(
"https://api.odeus.ai/assistant/v1/disable",
{
assistantId: assistantId,
disabled: disabled
},
{
headers: {
Authorization: "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
}
}
);
console.log(`Assistant ${disabled ? 'disabled' : 'enabled'}:`, response.data);
}
// Disable an assistant
toggleAssistantStatus("550e8400-e29b-41d4-a716-446655440000", true);
// Re-enable an assistant
toggleAssistantStatus("550e8400-e29b-41d4-a716-446655440000", false);
Response Format
Success Response (200 OK)
{
status: "success";
message: "Assistant disabled successfully" | "Assistant enabled successfully";
}
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
Odeus 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.