POST
/
api
/
syncs
Enable a Sync
curl --request POST \
  --url https://sync.useparagon.com/api/syncs \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "integration": "googledrive",
  "pipeline": "files",
  "configuration": {},
  "configurationName": "<string>"
}'
{
  "id": "a11347bd-d510-5489-9068-e5fded55a28c",
  "userId": "your-user-id",
  "integration": "googledrive",
  "pipeline": "files",
  "projectId": "1ea8024c-23a7-4885-b925-c50d0faf9318",
  "status": "INITIALIZING"
}
Upon sending this request, the sync will immediately start with the account that the user has connected. After the initial sync has completed, you will receive a sync_completed webhook event and records created / updated after the initial sync will send record_created or record_updated webhook events. Learn more about the Sync Lifecycle.

Authorizations

Authorization
string
header
required

Paragon User Token. Add to the Authorization header of your requests.

Body

application/json
integration
string
required

The integration to use for the sync

Example:

"googledrive"

pipeline
string
required

The type of Synced Object to sync from the integration. You can find the list of supported values in Synced Objects.

Example:

"files"

configuration
object

The configuration for this sync. For example, the folder ID to sync from Google Drive. Learn more about the configuration options supported for each integration in the Integrations Reference.

configurationName
string

A unique name for this sync configuration. Set this field to a unique value when creating multiple syncs for the same integration and pipeline.

Response

Sync successfully enabled

id
string
required

Unique identifier for the sync

Example:

"a11347bd-d510-5489-9068-e5fded55a28c"

userId
string
required

ID of the Connected User who enabled the Sync

Example:

"your-user-id"

integration
string
required

The integration to use for the sync

Example:

"googledrive"

pipeline
string
required

The type of Synced Object being used in this Sync

Example:

"files"

projectId
string
required

ID of the Paragon Project that this Sync is associated with

Example:

"1ea8024c-23a7-4885-b925-c50d0faf9318"

status
enum<string>
required

Current state of Sync activity. Possible values:

  • INITIALIZING: The Sync has just been created and is pending its first run.
  • ACTIVE: The Sync is actively fetching new data.
  • IDLE: The Sync has completed and is watching for updates to synced data.
    • Check summary.lastSyncedAt to see if the sync has successfully completed.
  • DISABLED: The Sync has been paused temporarily by the Disable a Sync endpoint.
  • ERRORED: The Sync has been suspended due to an error. Check Webhook Events for additional error details.
Available options:
INITIALIZING,
ACTIVE,
IDLE,
DISABLED,
ERRORED