> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://help.sigmacomputing.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://help.sigmacomputing.com/_mcp/server.

# Update an API connector

PATCH https://api.sigmacomputing.com/v2/api-connectors/{apiConnectorId}
Content-Type: application/json

This endpoint updates one or more fields on an existing API connector. For more information on API connectors, see [Configure API credentials and connectors in Sigma](https://help.sigmacomputing.com/docs/configure-api-credentials-and-connectors-in-sigma).

### Usage notes
- Retrieve the **apiConnectorId** by calling the [/v2/api-connectors](https://help.sigmacomputing.com/reference/list-api-connectors) endpoint.
- The user making this request must be assigned an account type with the **Manage API connectors** permission enabled and must have **Can edit** access to the connector.
- Omitted fields are left unchanged. Pass `null` for `authId` to remove the credential association.

### Usage scenarios
- **Endpoint migration:** Update the connector URL or parameters when an external API changes its interface.
- **Credential rotation:** Rebind the connector to a new credential after rotating secrets.

Reference: https://help.sigmacomputing.com/reference/update-api-connector

## Authentication

- OAuth2 — send the obtained token as `Authorization: Bearer <token>`

## Servers

- `https://api.sigmacomputing.com` (Server for GCP (US) hosted organizations, default)
- `https://api.sa.gcp.sigmacomputing.com` (Server for GCP (KSA) hosted organizations)
- `https://aws-api.sigmacomputing.com` (Server for AWS US (West) hosted organizations)
- `https://api.us-a.aws.sigmacomputing.com` (Server for AWS US (East) hosted organizations)
- `https://api.ca.aws.sigmacomputing.com` (Server for AWS Canada hosted organizations)
- `https://api.eu.aws.sigmacomputing.com` (Server for AWS Europe hosted organizations)
- `https://api.au.aws.sigmacomputing.com` (Server for AWS Australia and APAC hosted organizations)
- `https://api.uk.aws.sigmacomputing.com` (Server for AWS UK hosted organizations)
- `https://api.us.azure.sigmacomputing.com` (Server for Azure US hosted organizations)
- `https://api.eu.azure.sigmacomputing.com` (Server for Azure Europe hosted organizations)
- `https://api.ca.azure.sigmacomputing.com` (Server for Azure Canada hosted organizations)
- `https://api.uk.azure.sigmacomputing.com` (Server for Azure United Kingdom hosted organizations)
- `https://api.au.azure.sigmacomputing.com` (Server for Azure Australia hosted organizations)

## Request

### Path parameters

- `apiConnectorId` (string, required)

### Body (application/json)

- `name` (string, optional) — New display name.
- `description` (string, optional, nullable) — New description. Pass `null` to clear.
- `params` (object, optional)
  - `method` (enum, required) — HTTP method to invoke.
    - Allowed values: `GET`, `POST`, `DELETE`, `PATCH`, `PUT`, `OPTIONS`, `HEAD`
  - `url` (string, required) — Request URL. Must resolve to a hostname matching the associated credential's allowlist.
  - `headers` (list of object, required) — Static or dynamic request headers.
    - `key` (string, required)
    - `mode` (enum, required)
      - Allowed values: `static`, `dynamic`
    - `value` (string, optional, nullable)
    - `type` (enum, optional)
      - Allowed values: `array`, `boolean`, `number`, `object`, `raw`, `string`
    - `shape` (object or object or object or object or object or map from string to any, optional, nullable)
      - object
        - `type` (list of enum, required)
          - Allowed values: `string`
      - object
        - `type` (list of enum, required)
          - Allowed values: `number`
      - object
        - `type` (list of enum, required)
          - Allowed values: `boolean`
      - object
        - `type` (list of enum, required)
          - Allowed values: `object`
        - `properties` (map from string to object or object or object or object or object or map from string to any, required)
      - object
        - `type` (list of enum, required)
          - Allowed values: `array`
        - `items` (object or object or object or object or object or map from string to any, required)
  - `pathParams` (list of object, required) — Path parameter placeholders resolved into the URL.
    - `key` (string, required)
    - `mode` (enum, required)
      - Allowed values: `static`, `dynamic`
    - `value` (string, optional, nullable)
    - `type` (enum, optional)
      - Allowed values: `array`, `boolean`, `number`, `object`, `raw`, `string`
    - `shape` (object or object or object or object or object or map from string to any, optional, nullable)
      - object
        - `type` (list of enum, required)
          - Allowed values: `string`
      - object
        - `type` (list of enum, required)
          - Allowed values: `number`
      - object
        - `type` (list of enum, required)
          - Allowed values: `boolean`
      - object
        - `type` (list of enum, required)
          - Allowed values: `object`
        - `properties` (map from string to object or object or object or object or object or map from string to any, required)
      - object
        - `type` (list of enum, required)
          - Allowed values: `array`
        - `items` (object or object or object or object or object or map from string to any, required)
  - `queryParams` (list of object, required) — Query string parameters.
    - `key` (string, required)
    - `mode` (enum, required)
      - Allowed values: `static`, `dynamic`
    - `value` (string, optional, nullable)
    - `type` (enum, optional)
      - Allowed values: `array`, `boolean`, `number`, `object`, `raw`, `string`
    - `shape` (object or object or object or object or object or map from string to any, optional, nullable)
      - object
        - `type` (list of enum, required)
          - Allowed values: `string`
      - object
        - `type` (list of enum, required)
          - Allowed values: `number`
      - object
        - `type` (list of enum, required)
          - Allowed values: `boolean`
      - object
        - `type` (list of enum, required)
          - Allowed values: `object`
        - `properties` (map from string to object or object or object or object or object or map from string to any, required)
      - object
        - `type` (list of enum, required)
          - Allowed values: `array`
        - `items` (object or object or object or object or object or map from string to any, required)
  - `body` (string, required) — Raw request body template.
- `config` (object, optional)
  - `timeout` (object, optional) — Per-request timeout configuration.
    - `requestSec` (double, required)
  - `retry` (object, optional) — Retry policy. `retryableStatusCodes` are HTTP codes that should trigger a retry.
    - `maxRetries` (double, required)
    - `retryableStatusCodes` (list of double, required)
  - `redirects` (object, optional) — HTTP redirect handling.
    - `maxRedirects` (double, required)
  - `rateLimit` (object, optional) — Rate limit applied to outbound requests from this connector.
    - `maxRequestsPerWindow` (double, required)
- `authId` (string, optional, nullable) — New credential binding. Pass `null` to remove the credential.

## Response

### 200

The response body.

- `apiConnectorId` (string, required) — Unique identifier of the API connector.
- `name` (string, required) — Display name of the connector.
- `params` (object, required)
  - `method` (enum, required) — HTTP method to invoke.
    - Allowed values: `GET`, `POST`, `DELETE`, `PATCH`, `PUT`, `OPTIONS`, `HEAD`
  - `url` (string, required) — Request URL. Must resolve to a hostname matching the associated credential's allowlist.
  - `headers` (list of object, required) — Static or dynamic request headers.
    - `key` (string, required)
    - `mode` (enum, required)
      - Allowed values: `static`, `dynamic`
    - `value` (string, optional, nullable)
    - `type` (enum, optional)
      - Allowed values: `array`, `boolean`, `number`, `object`, `raw`, `string`
    - `shape` (object or object or object or object or object or map from string to any, optional, nullable)
      - object
        - `type` (list of enum, required)
          - Allowed values: `string`
      - object
        - `type` (list of enum, required)
          - Allowed values: `number`
      - object
        - `type` (list of enum, required)
          - Allowed values: `boolean`
      - object
        - `type` (list of enum, required)
          - Allowed values: `object`
        - `properties` (map from string to object or object or object or object or object or map from string to any, required)
      - object
        - `type` (list of enum, required)
          - Allowed values: `array`
        - `items` (object or object or object or object or object or map from string to any, required)
  - `pathParams` (list of object, required) — Path parameter placeholders resolved into the URL.
    - `key` (string, required)
    - `mode` (enum, required)
      - Allowed values: `static`, `dynamic`
    - `value` (string, optional, nullable)
    - `type` (enum, optional)
      - Allowed values: `array`, `boolean`, `number`, `object`, `raw`, `string`
    - `shape` (object or object or object or object or object or map from string to any, optional, nullable)
      - object
        - `type` (list of enum, required)
          - Allowed values: `string`
      - object
        - `type` (list of enum, required)
          - Allowed values: `number`
      - object
        - `type` (list of enum, required)
          - Allowed values: `boolean`
      - object
        - `type` (list of enum, required)
          - Allowed values: `object`
        - `properties` (map from string to object or object or object or object or object or map from string to any, required)
      - object
        - `type` (list of enum, required)
          - Allowed values: `array`
        - `items` (object or object or object or object or object or map from string to any, required)
  - `queryParams` (list of object, required) — Query string parameters.
    - `key` (string, required)
    - `mode` (enum, required)
      - Allowed values: `static`, `dynamic`
    - `value` (string, optional, nullable)
    - `type` (enum, optional)
      - Allowed values: `array`, `boolean`, `number`, `object`, `raw`, `string`
    - `shape` (object or object or object or object or object or map from string to any, optional, nullable)
      - object
        - `type` (list of enum, required)
          - Allowed values: `string`
      - object
        - `type` (list of enum, required)
          - Allowed values: `number`
      - object
        - `type` (list of enum, required)
          - Allowed values: `boolean`
      - object
        - `type` (list of enum, required)
          - Allowed values: `object`
        - `properties` (map from string to object or object or object or object or object or map from string to any, required)
      - object
        - `type` (list of enum, required)
          - Allowed values: `array`
        - `items` (object or object or object or object or object or map from string to any, required)
  - `body` (string, required) — Raw request body template.
  - `bodyParams` (list of object, required) — Dynamic parameters extracted from `body`.
    - `key` (string, required)
    - `mode` (enum, required)
      - Allowed values: `static`, `dynamic`
    - `value` (string, optional, nullable)
    - `type` (enum, optional)
      - Allowed values: `array`, `boolean`, `number`, `object`, `raw`, `string`
    - `shape` (object or object or object or object or object or map from string to any, optional, nullable)
      - object
        - `type` (list of enum, required)
          - Allowed values: `string`
      - object
        - `type` (list of enum, required)
          - Allowed values: `number`
      - object
        - `type` (list of enum, required)
          - Allowed values: `boolean`
      - object
        - `type` (list of enum, required)
          - Allowed values: `object`
        - `properties` (map from string to object or object or object or object or object or map from string to any, required)
      - object
        - `type` (list of enum, required)
          - Allowed values: `array`
        - `items` (object or object or object or object or object or map from string to any, required)
- `config` (object, required)
  - `timeout` (object, required) — Per-request timeout configuration.
    - `requestSec` (double, required)
  - `retry` (object, required) — Retry policy. `retryableStatusCodes` are HTTP codes that should trigger a retry.
    - `maxRetries` (double, required)
    - `retryableStatusCodes` (list of double, required)
  - `redirects` (object, required) — HTTP redirect handling.
    - `maxRedirects` (double, required)
  - `rateLimit` (object, required) — Rate limit applied to outbound requests from this connector.
    - `maxRequestsPerWindow` (double, required)
- `createdBy` (string, required) — The identifier of the user who created this object.
- `updatedBy` (string, required) — The identifier of the user or process that last updated this object.
- `createdAt` (datetime, required) — When the object was created.
- `updatedAt` (datetime, required) — When the object was last updated.
- `description` (string, optional) — Human-readable description.
- `authId` (string, optional, nullable) — Identifier of the API credential (`apiCredentialId`) used to authenticate requests. `null` if unauthenticated.

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "apiConnectorId": "string",
  "name": "string",
  "params": {
    "method": "GET",
    "url": "string",
    "headers": [
      {
        "key": "string",
        "mode": "static",
        "value": "string",
        "type": "array",
        "shape": {}
      }
    ],
    "pathParams": [
      {
        "key": "string",
        "mode": "static",
        "value": "string",
        "type": "array",
        "shape": {}
      }
    ],
    "queryParams": [
      {
        "key": "string",
        "mode": "static",
        "value": "string",
        "type": "array",
        "shape": {}
      }
    ],
    "body": "string",
    "bodyParams": [
      {
        "key": "string",
        "mode": "static",
        "value": "string",
        "type": "array",
        "shape": {}
      }
    ]
  },
  "config": {
    "timeout": {
      "requestSec": 1.1
    },
    "retry": {
      "maxRetries": 1.1,
      "retryableStatusCodes": [
        1.1
      ]
    },
    "redirects": {
      "maxRedirects": 1.1
    },
    "rateLimit": {
      "maxRequestsPerWindow": 1.1
    }
  },
  "createdBy": "string",
  "updatedBy": "string",
  "createdAt": "2024-01-15T09:30:00Z",
  "updatedAt": "2024-01-15T09:30:00Z",
  "description": "string",
  "authId": "string"
}
```

**SDK Code**

```python
import requests

url = "https://api.sigmacomputing.com/v2/api-connectors/apiConnectorId"

payload = {}
headers = {
    "Authorization": "<token>.",
    "Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.sigmacomputing.com/v2/api-connectors/apiConnectorId';
const options = {
  method: 'PATCH',
  headers: {Authorization: '<token>.', 'Content-Type': 'application/json'},
  body: '{}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.sigmacomputing.com/v2/api-connectors/apiConnectorId"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("PATCH", url, payload)

	req.Header.Add("Authorization", "<token>.")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.sigmacomputing.com/v2/api-connectors/apiConnectorId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<token>.'
request["Content-Type"] = 'application/json'
request.body = "{}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://api.sigmacomputing.com/v2/api-connectors/apiConnectorId")
  .header("Authorization", "<token>.")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://api.sigmacomputing.com/v2/api-connectors/apiConnectorId', [
  'body' => '{}',
  'headers' => [
    'Authorization' => '<token>.',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.sigmacomputing.com/v2/api-connectors/apiConnectorId");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Authorization", "<token>.");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "<token>.",
  "Content-Type": "application/json"
]
let parameters = [] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.sigmacomputing.com/v2/api-connectors/apiConnectorId")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```