> ## Documentation Index
> Fetch the complete documentation index at: https://sequin.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Objects

> Common objects used in the Sequin Management API.

## Sync providers

A sync provider is a third-party service that Sequin can sync data with. Sequin currently supports the following sync providers:

* `airtable`
* `auth0`
* `hubspot`
* `github`
* `linear`
* `marketo`
* `netsuite`
* `quickbooks`
* `salesforce`
* `sendgrid`
* `servicenow`
* `shopify`
* `stripe`
* `workday`

We're adding new providers all the time. If you don't see the provider you're looking for, please [send us a note](mailto:support@sequin.io).

## Credential properties

A credential is how Sequin authenticates with a sync provider. Each provider uses a different type of credential kind. For example, Sequin can authenticate with Stripe using either an API key or an OAuth token. To account for these differences, the `properties` field of the credential object is polymorphic and can take on different shapes depending on the provider. Here are the different kinds of credential objects:

### Airtable credential properties

```typescript OAuth2 theme={null}
{
  // ...rest of the credential object
  properties: {
    kind: "airtable_oauth2";
    airtable_uid: string;
    refresh_token: string;
    scope: string;
  }
}
```

<ParamField path="kind" type="string" required>
  The credential kind. Always set to `airtable_oauth2`.
</ParamField>

<ParamField path="refresh_token" type="string" required>
  The refresh token used to authenticate with the Airtable API.
</ParamField>

<ParamField path="scope" type="string" required>
  A string of the scopes the credential has access to.
</ParamField>

#### Example

```json theme={null}
{
  // ...rest of the credential object
  "properties": {
    "airtable_uid": "usrziLeD23j9AJ1",
    "kind": "airtable_oauth2",
    "refresh_token": "***********",
    "scope": "data.records:read data.records:write data.recordComments:read data.recordComments:write schema.bases:read schema.bases:write webhook:manage"
  }
}
```

### CheckoutChamp credential properties

```typescript theme={null}
{
  // ...rest of the credential object
  properties: {
    login_id: string;
    kind: "checkout_champ_password";
    password: string;
  }
}
```

<ParamField path="login_id" type="string" required>
  The unique login ID used to authenticate with the CheckoutChamp API.
</ParamField>

<ParamField path="kind" type="string" required>
  The credential kind. Always set to `checkout_champ_password`.
</ParamField>

<ParamField path="password" type="string" required>
  The password associated with the login ID for authentication.
</ParamField>

#### Example

```
{
  // ...rest of the credential object
  "properties": {
    "login_id": "user123",
    "kind": "checkout_champ_password",
    "password": "password123"
  }
}
```

### GitHub credential properties

```typescript App theme={null}
{
  // ...rest of the credential object
  properties: {
    kind: "github_app";
    account_type: string; // "User" or "Organization"
    account_login: string;
    installation_id: integer;
  }
}
```

<ParamField path="kind" type="string" required>
  The credential kind. Always set to `github_app`.
</ParamField>

<ParamField path="account_login" type="string" required>
  The name of the account the credential is associated with.
</ParamField>

<ParamField path="account_type" type="string" required>
  The acount type. Can be either `User` or `Organization`.
</ParamField>

<ParamField path="installation_id" type="int" required>
  The installation ID of the GitHub app.
</ParamField>

#### Example

```json theme={null}
{
  // ... rest of the credential object
  "properties": {
    "kind": "github_app",
    "account_type": "User",
    "account_login": "paul-atreides",
    "installation_id": "47232440"
  }
}
```

### HubSpot credential properties

```typescript OAuth2 theme={null}
{
  // ...rest of the credential object
  properties: {
    kind: "hubspot_oauth2";
    hub_domain: string;
    hub_id: integer;
    refresh_token: string;
    scopes: string[];
  }
}
```

<ParamField path="kind" type="string" required>
  The credential kind. Always set to `hubspot_oauth2`.
</ParamField>

<ParamField path="hub_domain" type="string" required>
  The domain associated to the HubSpot account.
</ParamField>

<ParamField path="hub_id" type="int" required>
  The `id` of the HubSpot account.
</ParamField>

<ParamField path="refresh_token" type="array" required>
  The refresh token used to authenticate with the HubSpot API.
</ParamField>

<ParamField path="scopes" type="array" required>
  An array of strings representing the scopes the credential has access to.
</ParamField>

```json theme={null}
{
  // ... rest of the credential object
  "properties": {
    "hub_domain": "arrakis.io",
    "hub_id": 21902692,
    "kind": "hubspot_oauth2",
    "refresh_token": "***********",
    "scopes": [
      "oauth",
      "tickets",
      "e-commerce",
      "sales-email-read",
      "crm.lists.read",
      "crm.objects.contacts.read"
      // ... rest of the scopes
    ]
  }
}
```

### Linear credential properties

```typescript OAuth2 theme={null}
{
  // ...rest of the credential object
  properties: {
    kind: "linear_oauth2";
    access_token: string;
    scope: string;
    expires_in_s: integer;
    linear_org_id: string;
    linear_org_name: string;
  }
}
```

<ParamField path="kind" type="string" required>
  The credential kind. Always set to `linear_oauth2`.
</ParamField>

<ParamField path="access_token" type="string" required>
  The access token used to authenticate with the Linear API.
</ParamField>

<ParamField path="scope" type="string" required>
  A string of the scopes the credential has access to.
</ParamField>

<ParamField path="linear_org_id" type="string" required>
  The ID of the Linear organization associated with the credential.
</ParamField>

<ParamField path="linear_org_name" type="string" required>
  The name of the Linear organization associated with the credential.
</ParamField>

#### Example

```json theme={null}
{
  // ...rest of the credential object
  "properties": {
    "kind": "linear_oauth2",
    "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
    "scope": "read write issues:create",
    "linear_org_id": "abc123",
    "linear_org_name": "Arrakis Inc."
  }
}
```

### Salesforce credential properties

```typescript OAuth2 theme={null}
{
  // ...rest of the credential object
  properties: {
    kind: "salesforce_oauth2";
    instance_url: string;
    refresh_token: string;
    scope: string;
    sfid: string;
  }
}
```

<ParamField path="kind" type="string" required>
  The credential kind. Always set to `salesforce_oauth2`.
</ParamField>

<ParamField path="instance_url" type="string" required>
  The domain associated to the Salesforce account.
</ParamField>

<ParamField path="refresh_token" type="array" required>
  The refresh token used to authenticate with the Salesforce API.
</ParamField>

<ParamField path="scope" type="string" required>
  A string of the scopes the credential has access to.
</ParamField>

<ParamField path="sfid" type="array" required>
  The Salesforce ID of the account.
</ParamField>

#### Example

```json theme={null}
{
  // rest of the credential object
  "properties": {
    "instance_url": "https://arrakis.my.salesforce.com",
    "kind": "salesforce_oauth2",
    "refresh_token": "***********",
    "scope": "api refresh_token",
    "sfid": "arrakis"
  }
}
```

### Shopify credential properties

```typescript theme={null}
{
  // ...rest of the credential object
  properties: {
    kind: "shopify_oauth2";
    access_token: string;
    shop: string;
  }
}
```

<ParamField path="kind" type="string" required>
  The credential kind. Always set to `shopify_oauth2`.
</ParamField>

<ParamField path="access_token" type="string" required>
  The access token used to authenticate with the Shopify API.

  Must be an [offline access token](https://shopify.dev/docs/apps/auth/access-token-types/offline).
</ParamField>

<ParamField path="shop" type="string" required>
  The shop URL that the credential is associated with.
</ParamField>

#### Example

```
{
  // ...rest of the credential object
  "properties": {
    "kind": "shopify_oauth2",
    "access_token": "shpca_ef73c3...",
    "shop": "shop-001.myshopify.com"
  }
}
```

### Stripe credential properties

Stripe provices two different kinds of credentials: **API keys** and **OAuth tokens**.

```typescript theme={null}
{
  // ...rest of the credential object
  properties: {
    kind: string; // "stripe_oauth2" or "stripe_key"
    account_id: string; // either the primary account_id or the account_id of a connected account
    name: string;
    secret: string; // the OAuth2 refresh token or the Stripe secret API key
    test: boolean;
  }
}
```

<ParamField path="kind" type="string" required>
  The credential kind. Always set to one of `stripe_oauth2` or `stripe_key`.
</ParamField>

<ParamField path="name" type="string" required>
  The domain associated to the Salesforce account.
</ParamField>

<ParamField path="secret" type="array" required>
  Either the `refresh_token ` or the `secret_key` used to authenticate with the
  Salesforce API.
</ParamField>

<ParamField path="test" type="boolean" required>
  Whether the credential is for a test account or not.
</ParamField>

#### Example

```json theme={null}
{
  // ...rest of the credential object
  "properties": {
    "kind": "stripe_oauth2",
    "name": "Arrakis [TEST]",
    "secret": "*********",
    "test": true
  }
}
```

## Rate limits

The rate limit object configures how many requests Sequin can make to a sync provider with a given credential in a given time period. It contains the following fields:

```typescript RateLimit theme={null}
{
  allowed_requests: number;
  interval: number;
  max_concurrent_requests: number;
}
```

<ResponseField name="allowed_requests" type="int">
  The number of requests Sequin can make to the provider in the given time
  period.
</ResponseField>

<ResponseField name="interval" type="int">
  The time period in miliseconds.
</ResponseField>

<ResponseField name="max_concurrent_requests" type="int">
  The maximum number of requests Sequin can make to the provider at the same
  time.
</ResponseField>

## Health

The health object contains information about the current status of a component part of your Sequin sync. For instance, a sync will have an overall health, but you'll also be able to check the health of related objects including the credential, OAuth app, consumer, and target. The health object contains the following fields:

```typescript Health theme={null}
{
  status: string;
}
```

<ResponseField name="status" type="string">
  The status of the component. Can be one of `healthy`, `customer_intervention`,
  or `sequin_intervention`.
</ResponseField>
