Skip to main content
PATCH
/
projects
/
{projectId}
/
integrations
/
{integrationId}
Update an existing third-party integration
curl --request PATCH \
  --url {schemes}://api.upsun.com/projects/{projectId}/integrations/{integrationId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "type": "<string>",
  "repository": "<string>",
  "fetch_branches": true,
  "prune_branches": true,
  "environment_init_resources": "default",
  "app_credentials": {
    "key": "<string>",
    "secret": "<string>"
  },
  "addon_credentials": {
    "addon_key": "<string>",
    "client_key": "<string>",
    "shared_secret": "<string>"
  },
  "build_pull_requests": true,
  "pull_requests_clone_parent_data": true,
  "resync_pull_requests": true
}
'
{
  "status": "<string>",
  "code": 123
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

projectId
string
required
integrationId
string
required

Body

application/json
type
string
required

The type of the integration

repository
string
required

The Bitbucket repository (in the form user/repo)

fetch_branches
boolean

Whether or not to fetch branches

prune_branches
boolean

Whether or not to remove branches that disappeared remotely (requires fetch_branches)

environment_init_resources
enum<string>

The resources used when initializing a new service

Available options:
default,
manual,
minimum,
parent
app_credentials
OAuth2 consumer · object

The OAuth2 consumer information (optional)

addon_credentials
Addon credential · object

The addon credential information (optional)

build_pull_requests
boolean

Whether or not to build pull requests

pull_requests_clone_parent_data
boolean

Whether or not to clone parent data when building merge requests

resync_pull_requests
boolean

Whether or not pull request environment data should be re-synced on every build

Response

default - application/json
status
string
required

The status text of the response

code
integer
required

The status code of the response

Last modified on March 25, 2026