Create an API key
Creates an API key of the given type:
user-key— Owned by you. Not allowed if your team admin disabled API key creation.scim-key— Owned by you, for SCIM provisioning in your team. Requires the permission to manage SCIM keys, the SCIM feature on your team’s plan, SCIM enabled for the team, and at least one configured SSO authentication method. Use thelifetimeproperty to set how many days the key is valid.service-account-key— Owned by the service account in theserviceAccountIdproperty. Requires the permission to manage service accounts and the service accounts feature. The service account must belong to your team. If the service account is a Super Admin, you must be a Super Admin too.service-account-scim-key— A SCIM key owned by the service account in theserviceAccountIdproperty. Requires everything theservice-account-keytype requires, plus the permission to manage SCIM keys. The service account must also hold that permission, and the SCIM requirements forscim-keyapply. The key is valid for 180 days.
Keys are created with the default API key scopes. On success, this returns an HTTP 201 Created response that includes the key’s full value. This is the only time the API returns the full value, so store it securely. An owner can have at most 30 API keys.
Authentication
Request
Response
The API key’s version. Both SCIM key types use scim.
A user. By default, only the id property is returned. If you set populateUsers to true, the name, username, email, and profilePic properties are also returned. These properties are null if the user cannot be found.
The user who created the key. For user-key and scim-key keys, this is the same as owner. For the service account key types, this is the admin who created the key. This value is null if the system did not record who created it.
Why the key was revoked. This value is null unless revoked is true.
The date and time at which the key was last used. This value is null if the key has never been used.
The date and time after which the key expires. This value is null if the key does not expire.