# Update Client

`PATCH /oauth2/register/:client_id`

Update client configuration

## URL Parameters

```typescript
interface URLParameters {
  /** Client identifier */
  client_id: string; // Example: "123-api-buddy-client"
}
```

## Body Parameters

```typescript
interface BodyParameters {
  valid?: boolean;
  primary_redirect_uri?: string;
  client_name?: string;
  redirect_uris?: string[];
  grant_types?: string[];
  response_types?: string[];
  token_endpoint_auth_method?: string;
  client_uri?: string;
  logo_uri?: string;
  scope?: string;
  contacts?: string[];
  tos_uri?: string;
  policy_uri?: string;
  jwks_uri?: string;
  software_id?: string;
  software_version?: string;
  application_type?: string;
  sector_identifier_uri?: string;
  subject_type?: string;
  id_token_signed_response_alg?: string;
  userinfo_signed_response_alg?: string;
  request_object_signing_alg?: string;
  description?: string;
}
```

## Response Body

```typescript
interface ResponseBody {
  /** API endpoint to GET this object */
  url?: string;
  /** Web URL to view this object in Buddy.works */
  html_url?: string;
  client_id?: string;
  client_secret?: string;
  registration_access_token?: string;
  registration_client_uri?: string;
  client_id_issued_at?: number;
  client_secret_expires_at?: number;
  client_name?: string;
  redirect_uris?: string[];
  grant_types?: string[];
  response_types?: string[];
  token_endpoint_auth_method?: string;
  client_uri?: string;
  logo_uri?: string;
  scope?: string;
  contacts?: string[];
  tos_uri?: string;
  policy_uri?: string;
  jwks_uri?: string;
  software_id?: string;
  software_version?: string;
  application_type?: string;
  sector_identifier_uri?: string;
  subject_type?: string;
  id_token_signed_response_alg?: string;
  userinfo_signed_response_alg?: string;
  request_object_signing_alg?: string;
  description?: string;
  token_expires_in?: number;
}
```

## Request Example

```bash
curl -X PATCH "https://api.buddy.works/oauth2/register/:client_id" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
  "client_name": "Updated Application Name",
  "redirect_uris": [
    "https://client.example.org/callback",
    "https://client.example.org/callback2"
  ],
  "grant_types": [
    "authorization_code",
    "refresh_token"
  ],
  "response_types": [
    "code"
  ],
  "token_endpoint_auth_method": "client_secret_basic",
  "client_uri": "https://client.example.org",
  "description": "Updated OAuth 2.0 application description",
  "token_expires_in": 7200
}'
```

## Response Example

**Status:** `200 OK`

```json
{
  "client_id": "123-api-buddy-client",
  "registration_client_uri": "https://api.buddy.works/oauth2/register/123-api-buddy-client",
  "client_id_issued_at": 1675123456,
  "client_secret_expires_at": 0,
  "client_name": "Updated Application Name",
  "redirect_uris": [
    "https://client.example.org/callback",
    "https://client.example.org/callback2"
  ],
  "grant_types": [
    "authorization_code",
    "refresh_token"
  ],
  "response_types": [
    "code"
  ],
  "token_endpoint_auth_method": "client_secret_basic",
  "client_uri": "https://client.example.org",
  "description": "Updated OAuth 2.0 application description",
  "token_expires_in": 7200
}
```

---
Original source: https://buddy.works/docs/api/oauth/update