---
title: "Update API Client Credentials"
slug: "update-api-client-credential"
updated: 2025-01-13T09:02:07Z
published: 2025-06-23T14:52:52Z
stale: true
---

> ## Documentation Index
> Fetch the complete documentation index at: https://docs.plainid.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Update API Client Credentials

Put/env-mgmt/1.0/api-key/clients/{id}

This API enables users to update API Client Credentials associated with a specific Tenant or Environment.

### Notice

 Accessing the Policy Management APIs is through a dedicated domain/URL according to your PlainID Tenant Location:   

  `https://api.{REGION}.plainid.io`
    
   

**United States (US)** - `https://api.us1.plainid.io` **Canada (US)** - `https://api.ca1.plainid.io` **Europe (US)** - `https://api.eu1.plainid.io`

Replace`{REGION}` with your PlainID Tenant region (e.g. us1, eu1, ca1, etc.).

  

### Important note about headers

Refer to the headers below to modify your cURL sample. Check if the following headers are in the sample, if not, ensure you add it to your cURL sample before pasting into your API tool.   
 

#### Headers

 *Required 

| Header | Value | cURL Line |
| --- | --- | --- |
| Accept | `application/json` | `-H"Accept: application/json"` |
| Content-Type | `application/json` | `-H"Content-Type: application/json"` |

  

### cURL Sample Guidelines

In order for the relevant parameters to appear in the cURL sample, you can input the values in the interactive API console on the right. They will then appear in the cURL sample on the bottom of the page in the correct format.

   

### Using HTML Encoded Special Characters

 

Use HTML encoded patterns when working with values that contain special characters like spaces, dashes, etc. Refer to this [HTML URL Encoding Reference](https://www.w3schools.com/tags/ref_urlencode.ASP) for a full list.

   

SecurityHTTPType bearer

For more details about Administration API Authentication, check out the Authentication APIs documentation. Provide your bearer token in the Authorization header when making requests to protected resources. Example: `Authorization: Bearer 123`

Path parametersidstringRequired

Client ID to update.

Body parameters<select class='api-response-data' aria-label='Media type'><option value='1b0f9166-baca-454d-8837-2c984395c4c5'>application/json</option>
</select><select class='select-example' aria-label='Media type'><option value='fbace578-972a-40bd-b42a-e93682921e18'>Sample Update environment admin</option>
<option value='927e12a7-f997-4942-aeb0-b0ccc2e2bac6'>Sample Update environment viewer</option>
<option value='d234f62d-e258-4be6-8217-0fcb11254ab3'>Sample Update tenant admin</option>
</select>Sample Update environment admin

```json
{
  "ownerId": "b0e1f961-2061-4f83-8392-b5aa19fed0c1",
  "ownerType": "ENVIRONMENT",
  "name": "Name7",
  "description": "Name7 Description",
  "tokenDuration": "PT1440M",
  "permission": "ADMIN"
}
```

Sample Update environment viewer

```json
{
  "ownerId": "b0e1f961-2061-4f83-8392-b5aa19fed0c1",
  "ownerType": "ENVIRONMENT",
  "name": "Name8",
  "description": "Name8 Description",
  "tokenDuration": "PT1440M",
  "permission": "VIEWER"
}
```

Sample Update tenant admin

```json
{
  "ownerId": null,
  "ownerType": "TENANT",
  "name": "Name9",
  "description": "Name9 Description",
  "tokenDuration": "PT1440M",
  "permission": "ADMIN"
}
```

object  namestring    Required

Client Name

Max length100
descriptionstring    Required

Client Description

Max length200
tokenDurationstring  (ISO-8601 duration)    Required

Client Token Duration

ExamplePT60M

Responses200

Client updated

<select class='api-response-data' aria-label='Media type'><option value='d57b43c3-39e4-4514-af5f-8a5b739a7a3b'>application/json</option>
</select>object  idstring    
ownerIdstring  (UUID)    
ownerTypestring    
namestring    
descriptionstring    
secretstring    

Null value. Secret not included in the response for security reasons.

tokenDurationstring  (ISO-8601 duration)    
permissionstring    

400

Client already exists

<select class='api-response-data' aria-label='Media type'><option value='b9e1941f-ad24-44eb-9207-e064cc69ef33'>application/json</option>
</select><select class='select-example' aria-label='Media type'><option value='1bb2c5d6-e3d0-4c90-875d-154e01282da0'>client already exists</option>
</select>client already exists

```json
{
  "id": "EW59XA",
  "status": 400,
  "name": "clientAlreadyExists",
  "message": "client {name} already exists"
}
```

Expand Allobject  codestring    
idstring    
statusinteger    
namestring    
messagestring    
argsobject  pathstring    

403

Forbidden

<select class='api-response-data' aria-label='Media type'><option value='e5dc2c13-51e4-4e69-aa09-44c649fb9fb2'>application/json</option>
</select><select class='select-example' aria-label='Media type'><option value='ce1ebc1a-cfff-42eb-be77-e4f141e2d9ac'>forbidden environment</option>
<option value='681c8a34-ca7b-441c-98d2-570ecbfd225b'>forbidden tenant</option>
</select>forbidden environment

```json
{
  "id": "EW56XA",
  "status": 403,
  "name": "forbiddenEnvironment",
  "message": "operation get for resource Environment {ownerId} is not allowed because the current user does not have the appropriate permissions"
}
```

forbidden tenant

```json
{
  "id": "EW57XA",
  "status": 403,
  "name": "forbiddenTenant",
  "message": "operation get for resource Environment {ownerId} is not allowed because the current user does not have the appropriate permissions"
}
```

Expand Allobject  codestring    
idstring    
statusinteger    
namestring    
messagestring    
argsobject  pathstring    

404

Client not found

<select class='api-response-data' aria-label='Media type'><option value='d41169d7-f286-4591-9f87-225f15936480'>application/json</option>
</select><select class='select-example' aria-label='Media type'><option value='ec604d1f-ad3a-40e4-9482-ca99319174fd'>client not found</option>
</select>client not found

```json
{
  "id": "EW58XA",
  "status": 404,
  "name": "clientNotFoundError",
  "message": "Client {name} not found"
}
```

Expand Allobject  codestring    
idstring    
statusinteger    
namestring    
messagestring    
argsobject  pathstring
