ASSISTANT_API scope and only reaches an agent that key can edit. This call does not require the agent to be shared with the key.
Base URL
Prerequisites
- API key with the
GOVERNANCE_APIscope - Enable Governance is on
agentIdis the agent UUID
Request body
Whitespace at the ends of
disabledReason is removed. An empty reason is stored as null. Everyone who can see the agent sees the reason on its Disabled badge. The owner and editors also see it in the agent editor.
Turning the agent back on clears disabledReason and disabledAt, including when the request still sends a reason. The API key’s user is stored as the person who disabled the agent. This response does not include that id.
Behavior
- Turned off:
disabledistrue,disabledReasonis the stored reason, anddisabledAtis set. - Turned back on:
disabledisfalse, anddisabledReasonanddisabledAtare null. - Agent not available? Returns
404with the messageAgent not found. - Missing
disabled, or a reason longer than 500 characters? Returns400.
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.