> ## Documentation Index
> Fetch the complete documentation index at: https://nango-scrips-ref.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Node

The backend SDK lets you interact with the Nango API. It is available on [NPM](https://www.npmjs.com/package/@nangohq/node) as `@nangohq/node`.

# Instantiate the backend SDK

Install it with your favorite package manager, e.g.:

```bash
npm i -S @nangohq/node
```

Instantiate the `Nango` class:

```js
import { Nango } from '@nangohq/node';

const nango = new Nango({ secretKey: '<SECRET-KEY>' });
```

**Parameters**

<Expandable>
  <ResponseField name="config" type="object" required>
    <Expandable title="config" defaultOpen>
      <ResponseField name="secretKey" type="string" required>
        Get your secret key in the environment settings of the Nango UI. THis key should never be shared.
      </ResponseField>

      <ResponseField name="host" type="string">
        Omitting the host points to Nango Cloud. For local development, use `http://localhost:3003`. Use your instance URL if self-hosting.
      </ResponseField>
    </Expandable>
  </ResponseField>
</Expandable>

# Rate limits

The Nango SDK is rate-limited to prevent abuse and ensure fair usage across all clients. The rate limit is enforced on a per-account basis, with a fixed window of time and a maximum number of requests allowed within that window.

If a client exceeds the rate limit, the API will respond with a 429 `Too Many Requests` status code. In this case, the `Retry-After` header is included, indicating the number of seconds the client should wait before making another request to avoid being rate-limited.

To handle rate limiting gracefully, clients should monitor for the 429 status code and honor the `Retry-After` header value provided in the response.

```js
// Example:
try {
    const res = await nango.listIntegrations();
    ...
} catch(err) {
    if (err.response.status === 429) {
        const retryAfter = err.response.headers['retry-after'];
        // wait and retry
        ...
    }
    ...
}
```

# Integrations

### List all integrations

Returns a list of integrations.

```js
await nango.listIntegrations()
```

**Example Response**

<Expandable>
  ```json
  {
      "configs": [
          {
              "unique_key": "slack-nango-community",
              "provider": "slack"
          },
          {
              "unique_key": "github-prod",
              "provider": "github"
          },
      ]
  }
  ```
</Expandable>

### Get an integration

Returns a specific integration.

```js
await nango.getIntegration(<INTEGRATION-ID>);
```

**Parameters**

<Expandable>
  <ResponseField name="providerConfigKey" type="string" required>
    The integration ID.
  </ResponseField>

  <ResponseField name="includeIntegrationCredentials" type="boolean">
    Defaults to `false`.
  </ResponseField>
</Expandable>

**Example Response**

<Expandable>
  ```json
  {
      "config": {
          "unique_key": "slack-nango-community",
          "provider": "slack",
          "syncs": [
              {
                  "name": "slack-messages",
                  "created_at": "2023-10-16T08:45:26.241Z",
                  "updated_at": "2023-10-16T08:45:26.241Z",
                  "description": "Continuously fetch the latest Slack messages. Details: full refresh. Required scopes(s): channels:read, groups:read, mpim:read, im:read"
              }
          ],
          "actions": [
              {
                  "name": "github-list-repos-action",
                  "created_at": "2023-10-17T17:28:03.839Z",
                  "updated_at": "2023-10-17T17:28:03.839Z"
              }
          ]
      }
  }
  ```
</Expandable>

### Create an integration

Create a new integration.

```js
await nango.createIntegration(<PROVIDER-ID>, <INTEGRATION-ID>);
```

**Parameters**

<Expandable>
  <ResponseField name="provider" type="string" required>
    The ID of the API provider in Nango (cf. [providers.yaml](https://nango.dev/providers.yaml) for a list of API provider IDs.)
  </ResponseField>

  <ResponseField name="providerConfigKey" type="string" required>
    The integration ID.
  </ResponseField>

  <ResponseField name="credentials" type="Record<string, string>">
    The credentials to include depend on the specific integration that you want to create.
  </ResponseField>

  <ResponseField name="credentials" type="Record<string, string>">
    <Expandable title="credentials" defaultOpen>
      <ResponseField name="oauth_client_id" type="string">
        The OAuth client ID.
      </ResponseField>

      <ResponseField name="oauth_client_secret" type="string">
        The OAuth client secret.
      </ResponseField>

      <ResponseField name="oauth_scopes" type="string">
        The list of OAuth scopes
      </ResponseField>
    </Expandable>
  </ResponseField>
</Expandable>

**Example Response**

<Expandable>
  ```json
  {
      "config": {
          "unique_key": "slack-nango-community",
          "provider": "slack"
      }
  }
  ```
</Expandable>

### Update an integration

Edits an integration (only for OAuth APIs).

```js
await nango.updateIntegration(<PROVIDER-ID>, <INTEGRATION-ID>);
```

**Parameters**

<Expandable>
  <ResponseField name="provider" type="string" required>
    The ID of the API provider in Nango (cf. [providers.yaml](https://nango.dev/providers.yaml) for a list of API provider IDs.)
  </ResponseField>

  <ResponseField name="providerConfigKey" type="string" required>
    The integration ID.
  </ResponseField>

  <ResponseField name="credentials" type="Record<string, string>">
    The credentials to include depend on the specific integration that you want to create.
  </ResponseField>

  <ResponseField name="credentials" type="Record<string, string>">
    <Expandable title="credentials" defaultOpen>
      <ResponseField name="oauth_client_id" type="string">
        The OAuth client ID.
      </ResponseField>

      <ResponseField name="oauth_client_secret" type="string">
        The OAuth client secret.
      </ResponseField>

      <ResponseField name="oauth_scopes" type="string">
        The list of OAuth scopes
      </ResponseField>
    </Expandable>
  </ResponseField>
</Expandable>

**Example Response**

<Expandable>
  ```json
  {
      "config": {
          "unique_key": "slack-nango-community",
          "provider": "slack"
      }
  }
  ```
</Expandable>

### Delete an integration

Deletes a specific integration.

```js
await nango.deleteIntegration(<INTEGRATION-ID>);
```

**Parameters**

<Expandable>
  <ResponseField name="providerConfigKey" type="string" required>
    The integration ID.
  </ResponseField>
</Expandable>

**Example Response**

<Expandable>
  ```json
  {
      "config": {
          "unique_key": "slack-nango-community",
          "provider": "slack"
      }
  }
  ```
</Expandable>

# Connections

### List connections

Returns a list of connections without credentials.

```js
await nango.listConnections();
```

**Parameters**

<Expandable>
  <ResponseField name="connectionId" type="string" required>
    Filter the list of connections based on this connection ID. If ommitted, returns all connections.
  </ResponseField>
</Expandable>

**Example Response**

<Expandable>
  ```json
  {
      "connections": [
          {
              "id": 1,
              "connection_id": "test-1",
              "provider": "slack",
              "provider_config_key": "slack-nango-community",
              "created": "2023-06-03T14:53:22.051Z",
              "metadata": null
          },
          {
              "id": 2,
              "connection_id": "test-2",
              "provider": "slack",
              "provider_config_key": "slack-nango-community",
              "created": "2023-06-03T15:00:14.945Z",
              "metadata": {
              "bot_id": "some-uuid"
              }
          }
      ]
  }
  ```
</Expandable>

### Get a connection (with credentials)

Returns a specific connection with credentials.

```js
await nango.getConnection();
```

<Info>
  The response content depends on the API authentication type (OAuth 2, OAuth 1, API key, Basic auth).

  If you do not want to deal with collecting & injecting credentials in requests for multiple authentication types, use the Proxy ([step-by-step guide](/integrate/guides/proxy-requests-to-an-api)).
</Info>

<Tip>
  When you fetch the connection with this API endpoint, Nango will check if the access token has expired. If it has, it will refresh it.

  We recommend not caching tokens for longer than 5 minutes to ensure they are fresh.
</Tip>

**Parameters**

<Expandable>
  <ResponseField name="providerConfigKey" type="string" required>
    The integration ID.
  </ResponseField>

  <ResponseField name="connectionId" type="string" required>
    The connection ID.
  </ResponseField>

  <ResponseField name="forceRefresh" type="string">
    Defaults to `false`. If `false`, the token will only be refreshed if it expires within 15 minutes. If `true`, a token refresh attempt will happen on each request. This is only useful for testing and should not be done at high traffic.
  </ResponseField>

  <ResponseField name="refreshToken" type="string">
    Defaults to `false`. If `false`, the refresh token is not included in the response, otherwise it is. In production, it is not advised to return the refresh token, for security reasons, since only the access token is needed to sign requests.
  </ResponseField>
</Expandable>

**Example Response**

<Expandable>
  ```json
  {
      "id": 18393,                                 
      "created_at": "2023-03-08T09:43:03.725Z",     
      "updated_at": "2023-03-08T09:43:03.725Z",     
      "provider_config_key": "github",              
      "connection_id": "1",                         
      "credentials": {
          "type": "OAUTH2",                         
          "access_token": "gho_tsXLG73f....",       
          "refresh_token": "gho_fjofu84u9....",     
          "expires_at": "2024-03-08T09:43:03.725Z", 
          "raw": { // Raw token response from the OAuth provider: Contents vary!
              "access_token": "gho_tsXLG73f....",
              "refresh_token": "gho_fjofu84u9....",
              "token_type": "bearer",
              "scope": "public_repo,user"
          }
      },
      "connection_config": {                       
          "subdomain": "myshop",
          "realmId": "XXXXX",
          "instance_id": "YYYYYYY"
      },                      
      "account_id": 0,                              
      "metadata": {                                 
          "myProperty": "yes",
          "filter": "closed=true"
      }
  }                              
  ```
</Expandable>

### Get connection metadata

Returns a connection's metadata.

```js
await nango.getMetadata('<INTEGRATION-ID>', 'CONNECTION-ID');
```

If you know the structure of the metadata, you can specify a type;

```ts
interface CustomMetadata {
    anyKey: Record<string, string>;
}
const myTypedMetadata = await nango.getMetadata<CustomMetadata>('<INTEGRATION-ID>', '<CONNECTION-ID>');
```

**Parameters**

<Expandable>
  <ResponseField name="providerConfigKey" type="string" required>
    The integration ID of the connection.
  </ResponseField>

  <ResponseField name="connectionId" type="string" required>
    The connection ID.
  </ResponseField>
</Expandable>

**Example Response**

<Expandable>
  ```json
  {
      "custom_key1": "custom_value1"
  }
  ```
</Expandable>

### Set connection metadata

Set custom metadata for the connection (overrides existing metadata).

```js
await nango.setMetadata('<INTEGRATION-ID>', 'CONNECTION-ID', { 'CUSTOM_KEY1': 'CUSTOM_VALUE1' });
```

**Parameters**

<Expandable>
  <ResponseField name="providerConfigKey" type="string" required>
    The integration ID of the connection.
  </ResponseField>

  <ResponseField name="connectionId" type="string" required>
    The connection ID.
  </ResponseField>

  <ResponseField name="metadata" type="Record<string, any>" required>
    The custom metadata to store in the connection.
  </ResponseField>
</Expandable>

**Response**

Empty response.

### Edit connection metadata

Edit custom metadata for the connection. Only overrides specified properties, not the entire metadata.

```js
await nango.updateMetadata('<INTEGRATION-ID>', 'CONNECTION-ID', { 'CUSTOM_KEY1': 'CUSTOM_VALUE1' });
```

**Parameters**

<Expandable>
  <ResponseField name="providerConfigKey" type="string" required>
    The integration ID of the connection.
  </ResponseField>

  <ResponseField name="connectionId" type="string" required>
    The connection ID.
  </ResponseField>

  <ResponseField name="metadata" type="Record<string, any>" required>
    The custom metadata to store in the connection.
  </ResponseField>
</Expandable>

**Response**

Empty response.

### Delete a connection

Deletes a specific connection.

```js
await nango.deleteConnection('<INTEGRATION-ID>', 'CONNECTION-ID');
```

**Parameters**

<Expandable>
  <ResponseField name="providerConfigKey" type="string" required>
    The integration ID of the connection.
  </ResponseField>

  <ResponseField name="connectionId" type="string" required>
    The connection ID.
  </ResponseField>
</Expandable>

**Response**

Empty response.

# Scripts

### Get scripts config

Return the configuration for all scripts

```ts
const scriptsConfig = await nango.getScriptsConfig();
```

**Example Response**

<Expandable>
  ```json
  [
      {
          "providerConfigKey": "demo-github-integration",
          "syncs": [
              {
                  "name": "github-issue-example",
                  "type": "sync",
                  "models": [
                      {
                          "name": "GithubIssue",
                          "fields": [
                              {
                                  "name": "id",
                                  "type": "integer"
                              },
                              {
                                  "name": "owner",
                                  "type": "string"
                              },
                              {
                                  "name": "repo",
                                  "type": "string"
                              },
                              {
                                  "name": "issue_number",
                                  "type": "number"
                              },
                              {
                                  "name": "title",
                                  "type": "string"
                              },
                              {
                                  "name": "author",
                                  "type": "string"
                              },
                              {
                                  "name": "author_id",
                                  "type": "string"
                              },
                              {
                                  "name": "state",
                                  "type": "string"
                              },
                              {
                                  "name": "date_created",
                                  "type": "date"
                              },
                              {
                                  "name": "date_last_modified",
                                  "type": "date"
                              },
                              {
                                  "name": "body",
                                  "type": "string"
                              }
                          ]
                      }
                  ],
                  "sync_type": "FULL",
                  "runs": "every half hour",
                  "track_deletes": false,
                  "auto_start": false,
                  "last_deployed": "2024-02-28T20:16:38.052Z",
                  "is_public": false,
                  "pre_built": false,
                  "version": "4",
                  "attributes": {},
                  "input": {},
                  "returns": [
                      "GithubIssue"
                  ],
                  "description": "Fetches the Github issues from all a user's repositories.\nDetails: full sync, doesn't track deletes, metadata is not required.\n",
                  "scopes": [
                      "public_repo"
                  ],
                  "endpoints": [
                      {
                          "GET": "/github/issue-example"
                      }
                  ],
                  "nango_yaml_version": "v2",
                  "webhookSubscriptions": []
              }
          ],
          "actions": [
              {
                  "name": "fetch-issues",
                  "type": "action",
                  "models": [
                      {
                          "name": "GithubIssue",
                          "fields": [
                              {
                                  "name": "id",
                                  "type": "integer"
                              },
                              {
                                  "name": "owner",
                                  "type": "string"
                              },
                              {
                                  "name": "repo",
                                  "type": "string"
                              },
                              {
                                  "name": "issue_number",
                                  "type": "number"
                              },
                              {
                                  "name": "title",
                                  "type": "string"
                              },
                              {
                                  "name": "author",
                                  "type": "string"
                              },
                              {
                                  "name": "author_id",
                                  "type": "string"
                              },
                              {
                                  "name": "state",
                                  "type": "string"
                              },
                              {
                                  "name": "date_created",
                                  "type": "date"
                              },
                              {
                                  "name": "date_last_modified",
                                  "type": "date"
                              },
                              {
                                  "name": "body",
                                  "type": "string"
                              }
                          ]
                      }
                  ],
                  "runs": "",
                  "is_public": false,
                  "pre_built": false,
                  "version": "4",
                  "last_deployed": "2024-02-28T20:16:38.052Z",
                  "attributes": {},
                  "returns": [
                      "GithubIssue"
                  ],
                  "description": "",
                  "scopes": [],
                  "input": {},
                  "endpoints": [
                      {
                          "GET": "/github/issues"
                      }
                  ],
                  "nango_yaml_version": "v2"
              }
          ],
          "postConnectionScripts": [],
          "provider": "github"
      }
  ]
  ```
</Expandable>

# Syncs

### Get records

Returns the synced data.

```ts
import type { ModelName } from '<path-to-nango-integrations>/models'

const records = await nango.listRecords<ModelName>({
    providerConfigKey: '<INTEGRATION-ID>',    
    connectionId: '<CONNECTION-ID>',                
    model: '<MODEL-NAME>'
});
```

<Warning>
  `nango.getRecords()` is deprecated and will be removed in future releases as it does not support efficient pagination. Please use `nango.listRecords()` detailed below.
</Warning>

**Parameters**

<Expandable>
  <ResponseField name="config" type="object" required>
    <Expandable title="config" defaultOpen>
      <ResponseField name="providerConfigKey" type="string" required>
        The integration ID.
      </ResponseField>

      <ResponseField name="connectionId" type="string" required>
        The connection ID.
      </ResponseField>

      <ResponseField name="model" type="string" required>
        The name of the model of the data you want to retrieve.
      </ResponseField>

      <ResponseField name="cursor" type="string">
        Each record from this endpoint comes with a synchronization cursor in `_nango_metadata.cursor`.

        Save the last fetched record's cursor to track how far you've synced.

        By providing the cursor to this method, you'll continue syncing from where you left off, receiving only post-cursor changes.

        This same cursor is used to paginate through the results of this endpoint.
      </ResponseField>

      <ResponseField name="limit" type="number">
        The maximum number of records to return. Defaults to 100.
      </ResponseField>

      <ResponseField name="filter" type="string">
        Filter to only show results that have been added or updated or deleted.

        Available options: added, updated, deleted
      </ResponseField>

      <ResponseField name="modifiedAfter" type="string">
        Timestamp, e.g. 2023-05-31T11:46:13.390Z. If passed, only records modified after this timestamp are returned, otherwise all records are returned.
      </ResponseField>

      <ResponseField name="delta" type="string">
        DEPRECATED (use modifiedAfter) Timestamp, e.g. 2023-05-31T11:46:13.390Z. If passed, only records modified after this timestamp are returned, otherwise all records are returned.
      </ResponseField>
    </Expandable>
  </ResponseField>
</Expandable>

**Example Response**

<Tip>
  This endpoint returns a list of records, ordered by modification date ascending. If some records are updated while you paginate through this endpoint, you might see these records multiple times.
</Tip>

<Expandable>
  ```json
  {
      records:
          [
              {
                  id: 123,
                  ..., // Fields as specified in the model you queried
                  _nango_metadata: {
                      deleted_at: null,
                      last_action: 'ADDED',
                      first_seen_at: '2023-09-18T15:20:35.941305+00:00',
                      last_modified_at: '2023-09-18T15:20:35.941305+00:00',
                      cursor: 'MjAyNC0wMi0yNlQwMzowMDozOS42MjMzODgtMDU6MDB8fGVlMDYwM2E1LTEwNDktNDA4Zi05YTEwLTJjNzVmNDkwODNjYQ=='
                  }
              },
              ...
          ],
      next_cursor: "Y3JlYXRlZF9hdF4yMDIzLTExLTE3VDExOjQ3OjE0LjQ0NyswMjowMHxpZF4xYTE2MTYwMS0yMzk5LTQ4MzYtYWFiMi1mNjk1ZWI2YTZhYzI"
  }
  ```
</Expandable>

### Trigger sync(s)

Triggers an additional, one-off execution of specified sync(s) for a given connection or all applicable connections if no connection is specified.

```ts
const records = await nango.triggerSync('<INTEGRATION-ID>', ['SYNC_NAME1', 'SYNC_NAME2'], '<CONNECTION_ID>');
```

**Parameters**

<Expandable>
  <ResponseField name="providerConfigKey" type="string" required>
    The integration ID.
  </ResponseField>

  <ResponseField name="syncs" type="string[]" required>
    The name of the syncs to trigger. If the array is empty, all syncs are triggered.
  </ResponseField>

  <ResponseField name="connectionId" type="string">
    The connection ID. If omitted, the sync will trigger for all relevant connections.
  </ResponseField>
</Expandable>

**Response**

Empty response.

### Start schedule for sync(s)

Starts the schedule of specified sync(s) for a given connection or all applicable connections if no connection is specified.

```js
await nango.startSync('<INTEGRATION-ID>', ['SYNC_NAME1', 'SYNC_NAME2'], '<CONNECTION_ID>')
```

**Parameters**

<Expandable>
  <ResponseField name="providerConfigKey" type="string" required>
    The integration ID.
  </ResponseField>

  <ResponseField name="syncs" type="string[]" required>
    The name of the syncs that should be triggered.
  </ResponseField>

  <ResponseField name="connectionId" type="string">
    The connection ID. If ommitted, the sync will trigger for all relevant connections.
  </ResponseField>
</Expandable>

**Response**

Empty response.

### Pause schedule for sync(s)

Pauses the schedule of specified sync(s) for a given connection or all applicable connections if no connection is specified.

```js
await nango.startSync('<INTEGRATION-ID>', ['SYNC_NAME1', 'SYNC_NAME2'], '<CONNECTION_ID>')
```

**Parameters**

<Expandable>
  <ResponseField name="providerConfigKey" type="string" required>
    The integration ID.
  </ResponseField>

  <ResponseField name="syncs" type="string[]" required>
    The name of the syncs that should be paused.
  </ResponseField>

  <ResponseField name="connectionId" type="string">
    The connection ID. If ommitted, the sync will pause for all relevant connections.
  </ResponseField>
</Expandable>

**Response**

Empty response.

### Sync status

Get the status of specified sync(s) for a given connection or all applicable connections if no connection is specified.

```js
await nango.syncStatus('<INTEGRATION-ID>', ['SYNC_NAME1', 'SYNC_NAME2'], '<CONNECTION_ID>')
```

**Parameters**

<Expandable>
  <ResponseField name="providerConfigKey" type="string" required>
    The integration ID.
  </ResponseField>

  <ResponseField name="syncs" type="string[]" required>
    The name of the syncs you want to fetch a status for. Pass in "\*" to return all syncs.
  </ResponseField>

  <ResponseField name="connectionId" type="string">
    The connection ID. If omitted, all connections will be surfaced.
  </ResponseField>
</Expandable>

**Response**

<Expandable>
  ```json
  {
      "syncs": [
          {
              "id": "<string>",
              "name": "<string>",
              "status": "RUNNING",
              "type": "INCREMENTAL",
              "finishedAt": "<string>",
              "nextScheduledSyncAt": "<string>",
              "frequency": "<string>",
              "latestResult": {}
          }
      ]
  }
  ```
</Expandable>

### Override sync connection frequency

Override a sync's default frequency for a specific connection, or revert to the default frequency.

```js
await nango.updateSyncConnectionFrequency('<INTEGRATION-ID>', 'SYNC_NAME', '<CONNECTION_ID>', '<FREQUENCY>')
```

**Parameters**

<Expandable>
  <ResponseField name="providerConfigKey" type="string" required>
    The integration ID.
  </ResponseField>

  <ResponseField name="sync" type="string" required>
    The name of the sync.
  </ResponseField>

  <ResponseField name="connectionId" type="string" required>
    The connection ID.
  </ResponseField>

  <ResponseField name="frequency" type="string" required>
    The frequency you want to set (ex: 'every hour'). Set to `null` to revert to the default frequency.
  </ResponseField>
</Expandable>

**Response**

<Expandable>
  ```json
  {
      "frequency": "<string>"
  }
  ```
</Expandable>

### Get environment variables

Retrieve the environment variables as added in the Nango dashboard.

```js
await nango.getEnvironmentVariables();
```

**Parameters**

No parameters.

**Response**

<Expandable>
  ```json
  [
      {
          "name": "MY_SECRET_KEY",
          "value": "SK_373892NSHFNCOWFO..."
      }
  ]
  ```
</Expandable>

# Actions

### Trigger an action

Triggers an action for a connection.

```js
await nango.triggerAction('<INTEGRATION-ID>', '<CONNECTION_ID>', '<ACTION-NAME>', { 'custom_key1': 'custom_value1' });
```

**Parameters**

<Expandable>
  <ResponseField name="providerConfigKey" type="string" required>
    The integration ID.
  </ResponseField>

  <ResponseField name="connectionId" type="string" required>
    The connection ID.
  </ResponseField>

  <ResponseField name="actionName" type="string" required>
    The name of the action to trigger.
  </ResponseField>

  <ResponseField name="input" type="unkown" required>
    The necessary input for your action's `runAction` function.
  </ResponseField>
</Expandable>

**Response**

<Expandable>
  ```json
  {
      "your-properties": "The data returned by the action"
  }
  ```
</Expandable>

# Proxy

### Proxy - GET requests

Triggers an action for a connection.

```js
const res = await nango.get({
    endpoint: '/endpoint',
    providerConfigKey: '<INTEGRATION-ID>',
    connectionId: '<CONNECTION-ID>',
    baseUrlOverride: 'https://base-url.com'
});
```

**Parameters**

<Expandable>
  <ResponseField name="config" type="object" required>
    <Expandable title="config" defaultOpen>
      <ResponseField name="endpoint" type="string" required>
        The endpoint of the request.
      </ResponseField>

      <ResponseField name="providerConfigKey" type="string" required>
        The integration ID (for credential injection).
      </ResponseField>

      <ResponseField name="connectionId" type="string" required>
        The connection ID (for credential injection).
      </ResponseField>

      <ResponseField name="headers" type="Record<string, string>">
        The headers of the request.
      </ResponseField>

      <ResponseField name="params" type="Record<string, string | number>">
        The query parameters of the request.
      </ResponseField>

      <ResponseField name="data" type="unknown">
        The body of the request.
      </ResponseField>

      <ResponseField name="retries" type="number">
        The number of retries in case of failure (with exponential back-off). Optional, default 0.
      </ResponseField>

      <ResponseField name="retryOn" type="number[]">
        Array of additional status codes to retry a request in addition to the 5xx, 429, ECONNRESET, ETIMEDOUT, and ECONNABORTED
      </ResponseField>

      <ResponseField name="baseUrlOverride" type="string">
        The API base URL. Can be ommitted if the base URL is configured for this API in the [providers.yaml](https://nango.dev/providers.yaml).
      </ResponseField>

      <ResponseField name="decompress" type="boolean">
        Override the decompress option when making requests. Optional, defaults to false
      </ResponseField>

      <ResponseField name="responseType" type="'arraybuffer' | 'blob' | 'document' | 'json' | 'text' | 'stream'">
        The type of the response.
      </ResponseField>
    </Expandable>
  </ResponseField>
</Expandable>

**Response**

<Expandable>
  The response from the external API is passed back to you exactly as Nango gets it:

  * response code
  * response headers
  * response body
</Expandable>

### Proxy - POST requests

Triggers an action for a connection.

```js
const res = await nango.post({
    endpoint: '/endpoint',
    providerConfigKey: '<INTEGRATION-ID>',
    connectionId: '<CONNECTION-ID>',
    baseUrlOverride: 'https://base-url.com'
});
```

**Parameters**

<Expandable>
  <ResponseField name="config" type="object" required>
    <Expandable title="config" defaultOpen>
      <ResponseField name="endpoint" type="string" required>
        The endpoint of the request.
      </ResponseField>

      <ResponseField name="providerConfigKey" type="string" required>
        The integration ID (for credential injection).
      </ResponseField>

      <ResponseField name="connectionId" type="string" required>
        The connection ID (for credential injection).
      </ResponseField>

      <ResponseField name="headers" type="Record<string, string>">
        The headers of the request.
      </ResponseField>

      <ResponseField name="params" type="Record<string, string | number>">
        The query parameters of the request.
      </ResponseField>

      <ResponseField name="data" type="unkown">
        The body of the request.
      </ResponseField>

      <ResponseField name="retries" type="number">
        The number of retries in case of failure (with exponential back-off). Optional, default 0.
      </ResponseField>

      <ResponseField name="retryOn" type="number[]">
        Array of additional status codes to retry a request in addition to the 5xx, 429, ECONNRESET, ETIMEDOUT, and ECONNABORTED
      </ResponseField>

      <ResponseField name="baseUrlOverride" type="string">
        The API base URL. Can be ommitted if the base URL is configured for this API in the [providers.yaml](https://nango.dev/providers.yaml).
      </ResponseField>

      <ResponseField name="decompress" type="boolean">
        Override the decompress option when making requests. Optional, defaults to false
      </ResponseField>

      <ResponseField name="responseType" type="'arraybuffer' | 'blob' | 'document' | 'json' | 'text' | 'stream'">
        The type of the response.
      </ResponseField>
    </Expandable>
  </ResponseField>
</Expandable>

**Response**

<Expandable>
  The response from the external API is passed back to you exactly as Nango gets it:

  * response code
  * response headers
  * response body
</Expandable>

### Proxy - PUT requests

Triggers an action for a connection.

```js
const res = await nango.put({
    endpoint: '/endpoint',
    providerConfigKey: '<INTEGRATION-ID>',
    connectionId: '<CONNECTION-ID>',
    baseUrlOverride: 'https://base-url.com'
});
```

**Parameters**

<Expandable>
  <ResponseField name="config" type="object" required>
    <Expandable title="config" defaultOpen>
      <ResponseField name="endpoint" type="string" required>
        The endpoint of the request.
      </ResponseField>

      <ResponseField name="providerConfigKey" type="string" required>
        The integration ID (for credential injection).
      </ResponseField>

      <ResponseField name="connectionId" type="string" required>
        The connection ID (for credential injection).
      </ResponseField>

      <ResponseField name="headers" type="Record<string, string>">
        The headers of the request.
      </ResponseField>

      <ResponseField name="params" type="Record<string, string | number>">
        The query parameters of the request.
      </ResponseField>

      <ResponseField name="data" type="unkown">
        The body of the request.
      </ResponseField>

      <ResponseField name="retries" type="number">
        The number of retries in case of failure (with exponential back-off). Optional, default 0.
      </ResponseField>

      <ResponseField name="retryOn" type="number[]">
        Array of additional status codes to retry a request in addition to the 5xx, 429, ECONNRESET, ETIMEDOUT, and ECONNABORTED
      </ResponseField>

      <ResponseField name="baseUrlOverride" type="string">
        The API base URL. Can be ommitted if the base URL is configured for this API in the [providers.yaml](https://nango.dev/providers.yaml).
      </ResponseField>

      <ResponseField name="decompress" type="boolean">
        Override the decompress option when making requests. Optional, defaults to false
      </ResponseField>

      <ResponseField name="responseType" type="'arraybuffer' | 'blob' | 'document' | 'json' | 'text' | 'stream'">
        The type of the response.
      </ResponseField>
    </Expandable>
  </ResponseField>
</Expandable>

**Response**

<Expandable>
  The response from the external API is passed back to you exactly as Nango gets it:

  * response code
  * response headers
  * response body
</Expandable>

### Proxy - PATCH requests

Triggers an action for a connection.

```js
const res = await nango.patch({
    endpoint: '/endpoint',
    providerConfigKey: '<INTEGRATION-ID>',
    connectionId: '<CONNECTION-ID>',
    baseUrlOverride: 'https://base-url.com'
});
```

**Parameters**

<Expandable>
  <ResponseField name="config" type="object" required>
    <Expandable title="config" defaultOpen>
      <ResponseField name="endpoint" type="string" required>
        The endpoint of the request.
      </ResponseField>

      <ResponseField name="providerConfigKey" type="string" required>
        The integration ID (for credential injection).
      </ResponseField>

      <ResponseField name="connectionId" type="string" required>
        The connection ID (for credential injection).
      </ResponseField>

      <ResponseField name="headers" type="Record<string, string>">
        The headers of the request.
      </ResponseField>

      <ResponseField name="params" type="Record<string, string | number>">
        The query parameters of the request.
      </ResponseField>

      <ResponseField name="data" type="unkown">
        The body of the request.
      </ResponseField>

      <ResponseField name="retries" type="number">
        The number of retries in case of failure (with exponential back-off). Optional, default 0.
      </ResponseField>

      <ResponseField name="retryOn" type="number[]">
        Array of additional status codes to retry a request in addition to the 5xx, 429, ECONNRESET, ETIMEDOUT, and ECONNABORTED
      </ResponseField>

      <ResponseField name="baseUrlOverride" type="string">
        The API base URL. Can be ommitted if the base URL is configured for this API in the [providers.yaml](https://nango.dev/providers.yaml).
      </ResponseField>

      <ResponseField name="decompress" type="boolean">
        Override the decompress option when making requests. Optional, defaults to false
      </ResponseField>

      <ResponseField name="responseType" type="'arraybuffer' | 'blob' | 'document' | 'json' | 'text' | 'stream'">
        The type of the response.
      </ResponseField>
    </Expandable>
  </ResponseField>
</Expandable>

**Response**

<Expandable>
  The response from the external API is passed back to you exactly as Nango gets it:

  * response code
  * response headers
  * response body
</Expandable>

### Proxy - DELETE requests

Triggers an action for a connection.

```js
const res = await nango.delete({
    endpoint: '/endpoint',
    providerConfigKey: '<INTEGRATION-ID>',
    connectionId: '<CONNECTION-ID>',
    baseUrlOverride: 'https://base-url.com'
});
```

**Parameters**

<Expandable>
  <ResponseField name="config" type="object" required>
    <Expandable title="config" defaultOpen>
      <ResponseField name="endpoint" type="string" required>
        The endpoint of the request.
      </ResponseField>

      <ResponseField name="providerConfigKey" type="string" required>
        The integration ID (for credential injection).
      </ResponseField>

      <ResponseField name="connectionId" type="string" required>
        The connection ID (for credential injection).
      </ResponseField>

      <ResponseField name="headers" type="Record<string, string>">
        The headers of the request.
      </ResponseField>

      <ResponseField name="params" type="Record<string, string | number>">
        The query parameters of the request.
      </ResponseField>

      <ResponseField name="data" type="unkown">
        The body of the request.
      </ResponseField>

      <ResponseField name="retries" type="number">
        The number of retries in case of failure (with exponential back-off). Optional, default 0.
      </ResponseField>

      <ResponseField name="retryOn" type="number[]">
        Array of additional status codes to retry a request in addition to the 5xx, 429, ECONNRESET, ETIMEDOUT, and ECONNABORTED
      </ResponseField>

      <ResponseField name="baseUrlOverride" type="string">
        The API base URL. Can be ommitted if the base URL is configured for this API in the [providers.yaml](https://nango.dev/providers.yaml).
      </ResponseField>

      <ResponseField name="decompress" type="boolean">
        Override the decompress option when making requests. Optional, defaults to false
      </ResponseField>

      <ResponseField name="responseType" type="'arraybuffer' | 'blob' | 'document' | 'json' | 'text' | 'stream'">
        The type of the response.
      </ResponseField>
    </Expandable>
  </ResponseField>
</Expandable>

**Response**

<Expandable>
  The response from the external API is passed back to you exactly as Nango gets it:

  * response code
  * response headers
  * response body
</Expandable>

<Tip>
  **Questions, problems, feedback?** Please reach out in the [Slack community](https://nango.dev/slack).
</Tip>
