Creates or replaces the periodic sync policy for one integration config.
There is at most one policy per `(provider, integrationConfigId)` — the config a sync sweeps is the policy's identity — so saving twice for the same config replaces the policy rather than adding a rival one. The whole policy is sent each time: the enrollment half has to be stateable as "off", and re-confirming it on every save is the right amount of friction for the field that decides whether a timer grants people access to an application. The cadence is an interval measured from the last enqueue, bounded to between 15 minutes and 90 days. A freshly saved policy waits one full interval before its first run, so saving is never a way to start a sweep — use `POST directory/import` for that. Re-saving keeps the existing clock, so widening a cadence neither double-fires nor skips a cycle. Omitting `targetNetworkId` — the default — makes the periodic run Directory-only: contacts are created and refreshed, and nobody is granted access. Enrollment on a timer is deliberately an explicit choice, because the compensating control for a bulk sweep skipping the per-contact approve gate is an operator reading the dry-run report, and an unattended run has no one reading it. With a target set, `agentMode=OFF_HUMAN_ONLY` stages new contacts (grant created, agent silent) instead of putting the agent live for everyone the sweep finds.
Authorization
Bearer JWT Authorization header using the Bearer scheme. Enter 'Bearer' [space] and then your token.
In: header
Path Parameters
The tenant identifier
The policy in full: config, cadence, and the enrollment decision.
The provider/integration key whose contacts are swept (e.g. texterchat).
The tenant integration config to enumerate. Together with the provider, the policy's key.
uuidWhether the scheduler acts on the policy. Saving with false is the pause button: the cadence
and the enrollment decision stay written down, no runs are enqueued.
How many intervalUnits between sweeps.
int32The unit intervalValue is measured in (MINUTES, HOURS, DAYS).
"UNSPECIFIED" | "MINUTES" | "HOURS" | "DAYS"Optional: the application every swept participant is granted Served access in. Omit — the default — for a Directory-only sync that creates and refreshes contacts and grants nobody access.
uuidRequired with targetNetworkId: ON (the agent answers every newly swept contact) or
OFF_HUMAN_ONLY (the grant is created, the agent stays silent until someone enables it).
"UNSPECIFIED" | "ON" | "OFF_HUMAN_ONLY"Whether enrollment covers every swept contact (ALL_CONTACTS) or only environmentIds.
"UNSPECIFIED" | "ALL_CONTACTS" | "SELECTED_ACCOUNTS"With enrollmentScope=SELECTED_ACCOUNTS, the accounts whose contacts each run enrolls.
Response Body
curl -X PUT "https://api.fruxon.com/v1/tenants/string/directory/syncSchedules" \ -H "Content-Type: application/json" \ -d '{}'{
"id": "00000000-0000-0000-0000-000000000000",
"enabled": false,
"provider": "string",
"integrationConfigId": "00000000-0000-0000-0000-000000000000",
"intervalValue": 0,
"intervalUnit": "MINUTES",
"targetNetworkId": "00000000-0000-0000-0000-000000000000",
"targetAgentMode": "ON",
"enrollmentScope": "ALL_CONTACTS",
"enrollmentEnvironmentIds": [
"00000000-0000-0000-0000-000000000000"
],
"requestedBy": "string",
"lastEnqueuedAt": 0,
"lastRunId": "00000000-0000-0000-0000-000000000000",
"nextDueAt": 0,
"lastError": "string",
"createdAt": 0,
"modifiedAt": 0
}{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string",
"property1": null,
"property2": null
}{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string",
"property1": null,
"property2": null
}{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string",
"property1": null,
"property2": null
}Deletes a periodic sync policy — the sync stops, its past runs stay in the history.
To pause instead, save the policy with `enabled=false`: that keeps the cadence and the enrollment decision written down, where deleting throws both away. Deleting never touches the contacts a past run imported or the access it granted; those are reversed per run via `POST directory/importRuns/{importRun}:undoEnrollment`.
Gets one periodic sync policy by id.
Returns the stated policy — config, cadence, and whether the sweep also enrolls — together with the bookkeeping that says whether it is running: last enqueue, the run it produced, the next due time, and the reason the last tick failed if it did. Pair it with `GET directory/importRuns?scheduleId={id}` for the full history of what this schedule has done.