---
title: "Update an upstream API credential — rotate a secret or fix its API binding"
method: PATCH
path: "/credentials/{cid}"
tags: ["credentials"]
---

# Update an upstream API credential — rotate a secret or fix its API binding

`PATCH /credentials/{cid}`

Update a credential's label, secret value, identity field, API binding, or auth_type.

Common use cases:
- Rotate an expired token or password (update `value`)
- Fix incorrect API binding (update `api_id`)
- Add username to existing credential (update `identity`)
- Relabel for clarity (update `label`)

Only changed fields need to be included in the request body. Omitted fields are left unchanged.

**Auth:** Requires human session OR agent key with explicit `PATCH /credentials` allow rule on jentic-mini credential.

## Path parameters

- `cid` string, required — Credential ID to update

## Request body

- CredentialPatch
  - `label` string, nullable
  - `value` string, nullable
  - `identity` string, nullable
  - `api_id` string, nullable
  - `auth_type` 'bearer' | 'basic' | 'apiKey' | 'none', nullable — Update the auth type for this credential. See `POST /credentials` for valid values and semantics.
  - `server_variables` object, nullable
  - `scheme` object, nullable — Update the self-describing injection rule. See POST /credentials for format.
  - `routes` string[], nullable — Update the host+path routing patterns for this credential.

## Response `200`

Successful Response

- CredentialOut — Upstream API credential metadata. Secret values are never returned after creation.
  - `id` string, required
  - `label` string, required
  - `identity` string, nullable
  - `api_id` string, nullable
  - `auth_type` string, nullable
  - `server_variables` object, nullable
  - `scheme` object, nullable
  - `routes` string[], nullable
  - `created_at` number, nullable
  - `updated_at` number, nullable
  - `account_id` string, nullable
  - `app_slug` string, nullable
  - `synced_at` number, nullable

## Other responses

- `422` — Validation Error

## Changes

- **2026-04-14** `bd463fcefb14` — 7 info
  - added the new optional request property `routes`
  - added the new optional request property `scheme`
  - added the new optional request property `server_variables`
  - added the new `none` enum value to the request property `auth_type/anyOf[subschema #1]/`
  - …3 more

[Change history](https://skmtc.dev/jentic/apis/jentic-control-plane-api/changes/credentials/:cid/patch.md)

---

[API](https://skmtc.dev/jentic/apis/jentic-control-plane-api.md) · [All operations](https://skmtc.dev/jentic/apis/jentic-control-plane-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/jentic/jentic-control-plane-api/revisions/bd463fcefb14/schema)
