Skip to main content
Replace a credential’s body, change its description, or set its writable flag.

PATCH /credentials/:id

Path Parameters

Request Body

Send at least one of the fields below, and nothing else. A field not listed here is refused. The credential’s type, alias and target never change.

Who may send what

The identity whose runs read a credential is the target of the key that starts them: a service account’s own key for the account’s credentials, an organization key for the organization’s, and a blob key for the blob’s. The body-only, writable-only limit holds for a service account’s own key at any role, and for any key minted at write. An organization or blob key minted at admin passes as the person who minted it, so it also takes the first row. Mint a key for a refresher at write. A service account’s own key never takes the first row, even where it administers the target with admin; use an acting token when automation has to do that on a human’s behalf.

Response

The credential object holds id, created_at, target, target_id, type, alias, description, writable, updated_at and updated_by. When the update was made with an API key it also holds updated_by_key, the ID of that key. The body is never returned.

Errors

A run reads the new body from its next node. A node that starts within about a second of the update may still read the previous body, so replace a token well before it expires.

Example