Skip to content
Skip to main content
PATCH
https://api.us.nylas.com/v3/iam/principals/{principal_id}/credentials/{credential_id}

Update IAM credential

Updates an API key's name or status.

Fields you leave out stay the same. You can't change a key's expiration, type, principal, or secret. You can't reactivate a key while its principal is disabled. Nylas rejects empty bodies, null values, and unknown fields.

Requires an IAM API key with the iam.credentials.update permission. Application API keys and access tokens don't work.

Parameters

Path parameters

principal_id*string

The principal's ID.

credential_id*string

The API key's ID.

Request body

namestring

A name for the API key, such as the service that uses it. Nylas trims leading and trailing spaces.

Example: "Support worker key"
minLength: 1maxLength: 128
statusstring

Whether the API key can authenticate.

activedisabled

Responses

request_idstring

The ID of the request.

dataobject
Example: {"id":"8Lp2QwVm4rT6sYxN0cDzB","principal_id":"9Xf3LmQa2rP7sTuV0wYzB","type":"api_key","name":"Support worker key","status":"active","expires_at":1799193600,"created_at":1791417600,"updated_at":1791417600}
PATCHhttps://api.us.nylas.com/v3/iam/principals/{principal_id}/credentials/{credential_id}

Paste the authorization token required for this endpoint.

principal_idrequiredstring

The principal's ID.

credential_idrequiredstring

The API key's ID.

Loading editor...

Autocomplete and validation come from this endpoint's request schema.