IAM credentials
Create and manage IAM API keys. Each API key belongs to one principal and has that principal's resource binding and permissions. Nylas returns a key's secret only once, when you create it.
To call these endpoints, use an IAM API key whose principal has an Organization binding and the iam.credentials.* permissions. If you don't have one yet, create your first key in the Dashboard. For rotation steps, see Manage IAM principals with the API.
GET /v3/iam/principals/{principal_id}/credentialsLists a principal's API keys. The response never includes a key's secret. To get the next page, pass next cursor as page token. When a response doesn't include next cursor, there are no more results.
POST /v3/iam/principals/{principal_id}/credentialsCreates an API key for an active principal. name and expires at are required. expires at must be in the future and no more than 10 years ahead. This response is the only time Nylas returns the key's s...
GET /v3/iam/principals/{principal_id}/credentials/{credential_id}Returns an API key's details. The response never includes the key's secret.
PATCH /v3/iam/principals/{principal_id}/credentials/{credential_id}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. Ny...
DELETE /v3/iam/principals/{principal_id}/credentials/{credential_id}Permanently deletes an API key. The key stops working immediately. The response contains only request id.