credentials.update
Update an existing credential. The API re-verifies the credential (full verification for the connector) before saving changes. If verification fails, the credential row is left unchanged.
Facts
POST https://yourinstance.getdx.net/api/connections/:connection_id/credentials.update
Arguments
Required arguments
| Name | Type | Description |
|---|---|---|
token |
Token |
Auth token passed as an HTTP header. |
connection_id |
Integer |
The connection ID. Substitute this value for :connection_id in the URL path.Example: 123 |
JSON body (top-level keys)
| Name | Type | Description |
|---|---|---|
id |
Integer |
Required. ID of the credential to update. Example: 456 |
label |
Text |
Optional. New display name. |
settings |
JSON |
Optional. Non-secret fields to store. Shape depends on connector type. If you omit settings, existing settings are kept. |
secrets |
JSON |
Optional. New secret values. Keys depend on connector type. If you omit secrets or send an empty object, existing secrets are typically retained (merge behavior is connector-aware on the server). |
expiration_date |
Date |
Optional. Updated expiration, if used. |
Usage info
For connector-specific settings / secrets keys and a full worked example (Jira Cloud with fake data), see credentials.create and contact DX support for other connectors.
Example request
This request only changes the label; omit JSON keys you do not want to update.
curl -X POST "https://yourinstance.getdx.net/api/connections/123/credentials.update" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer xxxx-xxxxxxxxx-xxxx" \
--data '{
"id": 456,
"label": "Automation user — myfakecompany (updated)"
}'
Success response
On success the API returns:
{
"ok": true,
"credential": {
"id": 456,
"type": "jira_cloud",
"label": "Automation user — myfakecompany (updated)",
"created_at": "2026-01-01T00:00:00.000Z"
}
}
Errors
This table lists common errors for this method. Other errors can be returned if the service is unavailable or an unexpected failure occurs. Callers should always check the ok field in the response.
| Error | Description |
|---|---|
not_authed |
The request did not include a valid API key. |
connection_not_found |
No connection exists for the given connection_id. |
credential_not_found |
No credential exists for the given id on that connection. |
invalid_json |
The JSON body could not be parsed. |
Verification failures
If verification fails, the credential is left unchanged. The HTTP status code and error label reflect the specific connector error. The response always includes display_message; raw_message is only present when the connector surfaces one.
{
"ok": false,
"error": "Invalid credentials",
"display_message": "The API token provided is invalid.",
"raw_message": "401 Unauthorized"
}
Common error values:
| Error | Description |
|---|---|
Invalid credentials |
The token or password was rejected by the connector. |
Invalid permissions |
The token lacks required scopes or permissions. |
Duplicate secrets |
The updated secrets would duplicate an existing credential. |
Duplicate settings |
The updated settings would duplicate an existing credential. |
Connector credential fields
settings and secrets keys vary by connector type. See the connector reference page for the fields accepted by each connector.
- Azure DevOps
- Bitbucket Cloud
- Bitbucket Cloud (Commits Trunk)
- Bitbucket Data Center
- Bitbucket Data Center (Commits Trunk)
- Bitbucket Pipelines
- Cursor
- GitHub
- GitHub Actions
- GitHub Commits
- GitHub Commits (Trunk)
- GitHub Deployments
- GitHub Projects
- GitHub Pull Request Files
- GitHub Repository Files
- GitHub Security
- GitLab
- GitLab Commits
- GitLab Commits (Trunk)
- GitLab Pipelines
- Jira Cloud
- Jira Data Center
- Jira Service Management Cloud
- Linear
- SonarCloud
- SonarQube