We use cookies to enhance your experience and measure how the site performs. Choose "Essential Only" to disable analytics. Read our Privacy Policy.

    Odeus Docs

    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.ai with 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

    ParameterTypeRequiredDescription
    assistantIdstringYesUUID of the assistant to enable/disable
    disabledbooleanYestrue 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 CodeDescription
    400Invalid parameters (missing assistantId or disabled)
    401Invalid or missing API key
    403Insufficient permissions to disable assistants
    404Assistant not found or API key does not have access
    429Rate 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.