Skip to content

Queue an integration sync

Settings module

POST/integrations/{id}/syncsintegrations.sync

Queues a sync run on a Connected connection; the run is attempted by the platform job queue with retries. Requires `Idempotency-Key`; a replay returns the original response. A rule that refuses the request returns 422 with `refusal` and `reason`.

  • Requires the capability org.integrations.manage.
  • OAuth scopes: org.
  • Send an Idempotency-Key header. A replay with the same key returns the original response.
  • Error statuses: 400, 401, 404, 409, 422, 429. Errors are RFC 9457 problem details.

Path and query parameters

integrations.sync: Path and query parameters
FieldTypeRequiredDescription
idstring (uuid)YesIdentifier of the integration.

Request body: IntegrationSyncRequest

integrations.sync: IntegrationSyncRequest
FieldTypeRequiredDescription
scope"Ledger Export" | "Payment Sync" | "Calendar Sync" | "File Import" | "Notification Delivery" | "Payroll Export" | "Tracking Refresh" | "Attendance Import"YesWhat to sync; must belong to the connection's category.
direction"Inbound" | "Outbound" | "Two Way"YesDirection of the sync.
project_idstring (uuid) | nullNoIdentifier of the project.
{
  "scope": "Ledger Export",
  "direction": "Outbound",
  "project_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f"
}

Response 202: IntegrationSyncQueued

integrations.sync: IntegrationSyncQueued
FieldTypeRequiredDescription
sync_run_idstring (uuid)YesIdentifier of the sync run.
{
  "sync_run_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f"
}

Code samples

curl -X POST "$XOS_BASE_URL/integrations/0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f/syncs" \
  -H "Authorization: Bearer $XOS_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"scope":"Ledger Export","direction":"Outbound","project_id":"0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f"}'
const { data } = await xos.integrations.sync("0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f", {
    "scope": "Ledger Export",
    "direction": "Outbound",
    "project_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f"
  });
response = xos.integrations.sync("0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f", {"scope": "Ledger Export", "direction": "Outbound", "project_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f"})
xos integrations sync 0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f --data '{"scope":"Ledger Export","direction":"Outbound","project_id":"0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f"}'