---
title: "Update an agent credential"
method: PATCH
path: "/agents/{agent_id}/inbound-credentials/{client_id}"
tags: ["Agents"]
---

# Update an agent credential

`PATCH /agents/{agent_id}/inbound-credentials/{client_id}`

## Request

- Base URL: `https://console.jumpcloud.com/api/v2`
- URL: `https://console.jumpcloud.com/api/v2/agents/{agent_id}/inbound-credentials/{client_id}`
- Auth: API key in header `x-api-key`
- TypeScript: <https://skmtc.dev/jumpcloud/apis/jumpcloud-api-2/docs/agents/:agent_id/inbound-credentials/:client_id/patch.ts> (a function with typed inputs; its response is checked against the schema)

Update the OAuth 2.0 credential for an agent in your organization.

## Path parameters

- `agent_id` string, required
- `client_id` string, required

## Headers

- `x-org-id` string

## Request body

- AgentInboundCredentialPatchRequest: Mutable fields for an inbound OAuth credential update. Only the token endpoint authentication method can be changed through this operation.
  - `tokenEndpointAuthMethod` 'client_secret_basic' | 'client_secret_post', required: OAuth token endpoint client authentication method.

## Response `200`

Credential updated successfully

- AgentInboundCredential: An inbound OAuth credential record. Never includes the credential secret.
  - `clientId` string, required: OAuth client ID for this credential.
  - `authType` 'client_credentials' | 'client_jwt_assertion', required: Client authentication method.
  - `tokenEndpointAuthMethod` 'client_secret_basic' | 'client_secret_post', required: OAuth token endpoint client authentication method for this credential. Legacy rows with a NULL stored value are returned as `client_secret_basic`.
  - `status` 'active' | 'retiring' | 'expired', required: Credential lifecycle status.
  - `createdAt` string, date-time, required
  - `updatedAt` string, date-time, required
  - `expiresAt` string, date-time, nullable, required: ISO 8601 date-time (UTC) or JSON null.

## Other responses

- `400`: Bad request — validation failure. Common codes include `invalidTokenEndpointAuthMethod` and `invalid json`.
- `401`: Unauthenticated
- `404`: Not Found
- `default`: Unexpected error

---

[API](https://skmtc.dev/jumpcloud/apis/jumpcloud-api-2.md) - [All operations](https://skmtc.dev/jumpcloud/apis/jumpcloud-api-2/llms.txt) - [OpenAPI document](https://skmtc.dev/jumpcloud/apis/jumpcloud-api-2/revisions/3f09fe63caaa?raw)
