PATCH
/
v1
/
syncs
/
{id}
curl --request PATCH \
  --url https://api.sequin.io/v1/syncs/c906b4a4-0cda-4f46-bd80-255f570c195d \
  --header 'Authorization: Bearer YOUR_API_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
    "name": "Choam Corp - Stripe Production",
    "collection_ids": ["stripe:customer", "stripe:invoice"],
    "status": "active",
    "rate_limit": {
      "allowed_requests": 100,
      "interval": 60,
      "max_concurrent_requests": 0
    },
    "metadata": { "custom_property": 42 }
  }'
{
  "id": "c906b4a4-0cda-4f46-bd80-255f570c195d",
  "provider": "stripe",
  "name": "Choam Corp - HubSpot Production",
  "status": "active",
  "org_id": "75958cea-c981-4116-9a0d-c1e99e826688",
  // The health field is coming soon
  "health": {
    "status": "warn",
    "credential": {
      "status": "ok",
      "notes": [],
      "time": "2023-12-15 01:29:29"
    },
    "provider": {
      "status": "warn",
      "notes": [
        "We've been receiving elevated error rates from HubSpot for the past 20 minutes across accounts. Syncs are continuing to complete successfully, but at a slightly slower rate. We expect the issue to resolve soon."
      ]
    }
  },
  "collection_ids": ["hubspot:contact", "hubspot:company"],
  "rate_limit": {
    "allowed_requests": 1000,
    "interval": 60,
    "max_concurrent_requests": 0
  },
  "credential_id": "27879937-bd5d-490b-a943-edf486b04300",
  "credential": {
    "id": "27879937-bd5d-490b-a943-edf486b04300",
    "provider": "stripe",
    "properties": {
      "kind": "stripe_key",
      "name": "TEST ACCOUNT",
      "secret": "***********",
      "test": true
    },
    "oauth_app_id": null,
    "oauth_app": {
      "kind": "sequin"
    },
    "metadata": { "custom_credential_property": 42 },
    "created_at": "2023-12-15 01:29:29",
    "updated_at": "2023-12-15 01:29:29"
  },
  "metadata": { "custom_property": 42 },
  "created_at": "2023-12-15 01:29:29",
  "updated_at": "2023-12-15 01:29:29"
}

Request parameters

You cannot update the credential or provider of an existing sync.
name
string
required

Name of the sync.

collection_ids
array
required

IDs of the collections to sync.

rate_limit
object

Rate limit of the sync. Learn more about the rate limit object. The rate limit object is not required if you’re using Sequin OAuth for certain providers. If you don’t specify a rate limit, Sequin will use a reasonable default according to your provider.

status
string
required

Status of the sync. Possible values are active and disabled.

metadata
object

Metadata for the sync. This is a JSON object that you can use to store any additional information you want to associate with the sync.

Response fields

id
string

ID of the sync.

provider
string

Provider of the sync (e.g. github, stripe, etc). See the list of possible values.

name
string

Name of the sync, which you provide on create or update.

status
string

Whether the sync is active or disabled.

health
object

Health of the sync. Learn more about the health object.

collection_ids
array

IDs of the collections that are synced by this sync.

rate_limit
object

Rate limit of the sync. Learn more about the rate limit object.

credential
object

Credential for the sync. This will usually consist of an access token and a refresh token Sequin uses to make requests. This object is polymorphic, see the list of possible shapes.

metadata
object

Metadata for the sync. This is a JSON object that you can use to store any additional information you want to associate with the sync.

created_at
string

Timestamp of when the sync was created, in ISO 8601 format.

updated_at
string

Timestamp of when the sync was last updated, in ISO 8601 format.