> ## Documentation Index
> Fetch the complete documentation index at: https://nango-architecture-docs.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>

# 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>
  Every time 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 you always fetch the token just before you use it to make sure it is 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.

# 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="delta" type="string">
        Timestamp, e.g. 2023-05-31T11:46:13.390Z. If passed only records added or updated after this timestamp are returned, otherwise all records are returned.

        In particular, when receiving a webhook from Nango notifying you that new data is available, pass the timestamp you get from the webhook in this `delta` parameter. You will only returned the data that was edited since the previous notification.
      </ResponseField>

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

      <ResponseField name="cursor" type="string">
        Base-64-encoded value that can be used to fetch the next page of results. The cursor will be included until there are no more results to paginate through.
      </ResponseField>

      <ResponseField name="filter" type="string">
        Filter to only show results that have been added or updated or deleted. Helpful when used in conjuction with the delta parameter to retrieve a subset or records that were added, updated, or deleted with the latest sync.

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

**Example Response**

<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'
                  }
              },
              ...
          ],
      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>
