Disconnect a file
SDK platic.agents.files.disconnect()
Remove a file from this agent by specifying its fileId in the URL. The change applies immediately, without publishing, and does not create a version. The file remains in the workspace and on other agents. To delete it from all agents, use Delete a file.
Example
curl -X DELETE https://api.platic.ai/v1/agents/$AGENT_ID/files/$FILE_ID \
-H "Authorization: Bearer $PLATIC_API_KEY" await platic.agents.files.disconnect("agent_123", "file_123"); Path parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
agentId | string | Agent id | ✓ |
fileId | string | File id | ✓ |
Request body
No body.
Response
204 No Content, with no body.
Errors
| Status | details.code | When |
|---|---|---|
403 | RESOURCE_NOT_ACCESSIBLE | You can't edit the agent. |
404 | RESOURCE_NOT_ACCESSIBLE | The file isn't connected to this agent. |
The ones that apply to all operations are in common errors.
Notes
- Being able to edit the agent is enough; Integrations isn't needed.
- A file that no agent uses stays in the workspace, with no agents. It can be connected again or deleted.
- What was scheduled on this connection is lost.
- For the agent to stop using it without losing the connection, use Pause or schedule a file.
- From an AI agent, the tool is
disconnect_agent_file.