Pause or schedule a file
Choose when an agent uses a file. Send state to pause or activate it now, and schedule to schedule activation or pausing. The change applies without publishing and does not create a version. Only this agent’s connection changes; pausing keeps the file connected.
Example
curl -X PATCH https://api.platic.ai/v1/agents/$AGENT_ID/files/$FILE_ID \
-H "Authorization: Bearer $PLATIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "state": "paused" }' await platic.agents.files.setState("agent_123", "file_123", "paused"); Path parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
agentId | string | Agent id | ✓ |
fileId | string | File id | ✓ |
Request body
Send state, schedule or both.
| Field | Type | Description | Required |
|---|---|---|---|
state | string | active or paused. | - |
schedule | object | null | Scheduled activation and pause dates. null removes both. | - |
schedule.activateAt | string | null | When to activate it, in UTC with milliseconds (2026-12-01T15:00:00.000Z). null removes it; if you don't send it, it is kept. | - |
schedule.pauseAt | string | null | When to pause it. Same as activateAt. | - |
The dates have to be in the future and at most 366 days away.
Pause or resume
{ "state": "paused" } Schedule
It will activate on December 1 at 9:00 (Mexico City time) and pause on December 31:
{
"schedule": {
"activateAt": "2026-12-01T15:00:00.000Z",
"pauseAt": "2026-12-31T15:00:00.000Z"
}
} To remove just one date, send it as null; the one you don't send stays as it is. To remove both:
{ "schedule": null } Response
200 OK with the connection:
{
"status": "success",
"data": {
"agentId": "Xq8mTe2LwP4kZ1aB9cDf",
"fileId": "fH3kL9mQ2xR7",
"state": "paused",
"attachedAt": "2026-10-30T16:02:11.000Z",
"activateOnReady": false,
"schedule": {
"activateAt": "2026-12-01T15:00:00.000Z",
"pauseAt": "2026-12-31T15:00:00.000Z",
"last": null
}
}
} data is the connection, with the fields from List agent files.
How what is scheduled is applied
- Platica checks the schedule every few minutes. The change takes effect shortly after the scheduled time, rather than at the exact second.
- Pausing is always applied.
- Activating is applied only if the file has content ready and whoever scheduled it can still edit the agent. If not, nothing changes and
schedule.lastends up withoutcome: "failed"and the reason inmessage. - Each completed scheduled date is cleared from
scheduleand recorded inschedule.last. - Pausing or resuming manually does not clear the schedule.
Errors
| Status | details.code | When |
|---|---|---|
400 | INVALID_INPUT | The body is empty or a value isn't valid. |
403 | RESOURCE_NOT_ACCESSIBLE | You can't edit the agent. |
404 | RESOURCE_NOT_ACCESSIBLE | The file isn't connected to this agent. |
409 | FILE_NOT_READY | Resuming a file that doesn't have content ready yet. |
422 | INVALID_INPUT | A date has already passed or is more than 366 days away (details.fields, for example ["schedule.activateAt"]). |
The ones that apply to all operations are in common errors.
Notes
- Being able to edit the agent is enough; Integrations isn't needed.
- In the SDK, to pause or activate use
platic.agents.files.setState(agentId, fileId, "paused")and to schedule useplatic.agents.files.schedule(agentId, fileId, { activateAt, pauseAt })(it acceptsDateobjects or UTC date strings; passnullinstead of the object to clear both dates). - To remove the connection, use Disconnect a file.
- From an AI agent, the tools are
set_agent_file_stateandschedule_agent_file.
For a file to stop being on all agents, use Delete a file. For a page to be read again on its own every so often (on all agents), keep it up to date.