---
title: "Update an API client"
method: PUT
path: "/apiops/projects/{projectName}/api-clients/{apiClientKey}"
tags: ["ApiClient"]
---

# Update an API client

`PUT /apiops/projects/{projectName}/api-clients/{apiClientKey}`

## Request

- Base URL: `http://167.86.118.166:32080`
- URL: `http://167.86.118.166:32080/apiops/projects/{projectName}/api-clients/{apiClientKey}`
- Auth: none declared
- TypeScript: <https://skmtc.dev/apinizer/apis/apinizer-management-apis/docs/apiops/projects/:projectName/api-clients/:apiClientKey/put.ts> (a function with typed inputs; its response is checked against the schema)

Replaces the editable half of a client; the api client key and the client id are immutable. The body's version must match the stored one. A revoked client is read-only (409 lifecycleConflict, reason apiClientRevokedReadOnly).

## Path parameters

- `projectName` string, required
- `apiClientKey` string, required

## Request body

- ApiOpsApiClientCreateDTO
  - `owner` ApiOpsApiClientOwnerDTO
    - `type` 'CONSUMER' | 'APPLICATION'
    - `key` string
  - `organizationCode` string
  - `description` string
  - `clientId` string
  - `validFrom` string, date-time
  - `expiresAt` string, date-time
  - `allowedGrantTypes` string[]
  - `tokenEndpointAuthMethod` string
  - `redirectUris` string[]
  - `tokenIssuanceProfile` string
  - `tokenNeverExpires` boolean
  - `tokenExpiresInAmount` integer
  - `tokenExpiresInUnit` 'MILLI_SECONDS' | 'SECONDS' | 'MINUTES' | 'HOURS' | 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'
  - `refreshTokenAllowed` boolean
  - `refreshTokenCount` integer
  - `refreshTokenExpiresInAmount` integer
  - `refreshTokenExpiresInUnit` 'MILLI_SECONDS' | 'SECONDS' | 'MINUTES' | 'HOURS' | 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'
  - `jwtSignatureAlgorithm` string
  - `secret` SecretVersionRequest
    - `materialType` 'LOCAL_SECRET' | 'SECRET_REFERENCE'
    - `generate` boolean
    - `value` string
    - `reference` string
    - `label` string
    - `validFrom` string, date-time
    - `expiresAt` string, date-time
    - `graceWindowSeconds` integer
    - `storageMode` 'ENCRYPTED' | 'HASHED'
  - `version` integer

## Response `200`

OK

- ApiOpsResponseApiClientMutation
  - `apiClient` ApiOpsResponseApiClient
    - `apiClientKey` string
    - `clientId` string
    - `description` string
    - `owner` ApiOpsApiClientOwnerDTO
      - `type` 'CONSUMER' | 'APPLICATION'
      - `key` string
    - `organizationCode` string
    - `operationalState` 'DRAFT' | 'ACTIVE' | 'SUSPENDED' | 'REVOKED'
    - `readiness` 'READY' | 'PENDING_SECRET' | 'UNRESOLVED_DEPENDENCY'
    - `validFrom` string, date-time
    - `expiresAt` string, date-time
    - `allowedGrantTypes` string[]
    - `tokenEndpointAuthMethod` string
    - `redirectUris` string[]
    - `tokenIssuanceProfile` string
    - `tokenNeverExpires` boolean
    - `tokenExpiresInAmount` integer
    - `tokenExpiresInUnit` 'MILLI_SECONDS' | 'SECONDS' | 'MINUTES' | 'HOURS' | 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'
    - `refreshTokenAllowed` boolean
    - `refreshTokenCount` integer
    - `refreshTokenExpiresInAmount` integer
    - `refreshTokenExpiresInUnit` 'MILLI_SECONDS' | 'SECONDS' | 'MINUTES' | 'HOURS' | 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'
    - `jwtSignatureAlgorithm` string
    - `revokedAt` string, date-time
    - `revokedBy` string
    - `revokedReason` string
    - `lifecycleRevision` integer
    - `version` integer
    - `secretVersions` ApiOpsResponseApiClientSecretVersion[]
      - `versionId` string
      - `label` string
      - `status` 'PENDING_ACTIVATION' | 'ACTIVE' | 'GRACE' | 'REVOKED'
      - `materialType` string
      - `storageMode` 'ENCRYPTED' | 'HASHED'
      - `recoveryState` 'AVAILABLE' | 'UNAVAILABLE' | 'SHREDDED'
      - `validFrom` string, date-time
      - `expiresAt` string, date-time
      - `graceUntil` string, date-time
      - `createdAt` string, date-time
      - `revokedAt` string, date-time
      - `revokedReason` string
      - `version` integer
  - `runtimeDeployment` ApiOpsRuntimeDeploymentDTO
    - `state` 'IN_SYNC' | 'DEGRADED'
    - `environments` Environment[]
      - `name` string
      - `acknowledged` boolean
      - `detail` string

---

[API](https://skmtc.dev/apinizer/apis/apinizer-management-apis.md) - [All operations](https://skmtc.dev/apinizer/apis/apinizer-management-apis/llms.txt) - [OpenAPI document](https://skmtc.dev/apinizer/apis/apinizer-management-apis/revisions/e083046b24cd?raw)
