> For the complete documentation index, see [llms.txt](https://docs.snyk.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.snyk.io/developer-tools/snyk-api/api-endpoints-index-and-tips/examples-for-the-update-existing-integration-endpoint.md).

# Examples for the Update existing integration endpoint

Examples follow for the [Update existing integration](/developer-tools/snyk-api/reference/integrations-v1.md#org-orgid-integrations-integrationid) endpoint in the [Integrations (v1)](/developer-tools/snyk-api/reference/integrations-v1.md) API.

## Set up Broker for an existing integration

### Command

```
curl --include \
     --request PUT \
     --header "Content-Type: application/json; charset=utf-8" \
     --header "Authorization: token API_KEY" \
     --data-binary "{
    \"type\": \"github\",
    \"broker\": { \"enabled\": true }
}" \
'https://api.snyk.io/v1/org/{orgId}/integrations/{integrationId}'
```

### Response

```
{
  "id": "9a3e5d90-b782-468a-a042-9a2073736f0b",
  "brokerToken": "4a18d42f-0706-4ad0-b127-24078731fbed"
}
```

### Possible values for Type (integration type, enum)

`acr`, `artifactory-cr`, `azure-repos`, `bitbucket-cloud`, `bitbucket-server`, `digitalocean-cr`, `docker-hub`, `ecr,` `gcr`, `github`, `github-cr`, `github-enterprise`, `gitlab`, `gitlab-cr`, `google-artifact-cr`, `harbor-cr`, `nexus-cr`, `quay-cr`

### Credentials needed for the integration you are updating

AcrCredentials: object\
username: required. string\
password: required, string\
registryBase: required, string, for example, name.azurecr.io

OR ArtifactoryCrCredentials: object\
username: required, string\
password: required, string\
registryBase: required, string, for example, name.jfrog.io

OR AzureReposCredentials: object\
username: required, string\
url: required, string

OR BitbucketCloudCredentials: object\
username: required, string\
password: required, string

OR BitbucketServerCredentials: object\
username: required, string\
password: required, string\
url: required, string

OR DigitalOceanCrCredentials: object\
token: required, string, Personal Access Token

OR DockerHubCredentials: object\
username: required, string\
password: required, string, Access Token

OR EcrCredentials: object\
region: required, string, for example, eu-west-3\
roleArn: required, string, for example, arn:aws:iam::\<account-id>:role/\<newRole>

OR GcrCredentials: object\
password: required, string, JSON key file\
registryBase: required, string, for example, gcr.io, us.gcr.io, eu.gcr.io, asia.gcr.io

OR GitHubCredentials: object\
token: required, string

OR GitHubCrCredentials: object\
username: required, string\
password: required, string\
egistryBase: required, string, for example ghcr.io

OR GitHubEnterpriseCredentials: object\
token: required, string\
url: required, string

OR GitLabCredentials: object\
token: required, string\
url: string. for self-hosted GitLab only

OR GitLabCrCredentials: object\
username: required, string\
password: required, string\
registryBase: required, string, for example, your.gitlab.host

OR GoogleArtifactCrCredentials: object\
password: required, string, JSON key\
file registryBase: required, string, for example, us-east1-docker.pkg.dev, europe-west1-docker.pkg.dev

OR HarborCrCredentials: object\
username: required, string\
password: required, string\
registryBase: required, string, for example, your.harbor.host

OR NexusCrCredentials: object\
username: required, string\
password: required, string\
registryBase: required, string, for example, your.nexus.host

OR QuayCrCredentials: object\
username: required, string\
password: required, string\
registryBase: required, string, for example, quay.io, your.quay.host

### Snyk permissions needed

View Organization\
View Integrations\
Edit Integrations

## Update credentials for an existing non-brokered integration

### Command

```
curl --include \
     --request PUT \
     --header "Content-Type: application/json; charset=utf-8" \
     --header "Authorization: token API_KEY" \
     --data-binary "{
    \"type\": \"gitlab\",
    \"credentials\": { \"token\": \"GITLAB_TOKEN\" }
}" \
'https://api.snyk.io/v1/org/{orgId}/integrations/{integrationId}'
```

### Response

```
{
  "id": "9a3e5d90-b782-468a-a042-9a2073736f0b"
}
```

### Possible values for Type (integration type, enum)

Same as [values for Set up Broker for an existing integration](#possible-values-for-type-integration-type-enum).

### Credentials needed for the integration you are updating

Same as [credentials for Set up Broker for an existing integration](#credentials-needed-for-the-integration-you-are-updating).

### Snyk permissions needed

View Organization\
View Integrations\
Edit Integrations

## Disable broker for an existing integration

### Command

```
curl --include \
     --request PUT \
     --header "Content-Type: application/json; charset=utf-8" \
     --header "Authorization: token API_KEY" \
     --data-binary "{
    \"type\": \"github\",
    \"broker\": { \"enabled\": false },
    \"credentials\": { \"token\": \"GITHUB_TOKEN\" }
}" \
'https://api.snyk.io/v1/org/{orgId}/integrations/{integrationId}'
```

### Response

```
{
  "id": "9a3e5d90-b782-468a-a042-9a2073736f0b"
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.snyk.io/developer-tools/snyk-api/api-endpoints-index-and-tips/examples-for-the-update-existing-integration-endpoint.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
