Skip to main content
Edit this page

Keys

Get list of all keys

Returns a list of all keys in the organization.

MethodPath
GET/v1/organizations/{organizationId}/keys

Request

Path Params

NameTypeDescription
organizationIduuidID of the requested organization.

Response

Response Schema

NameTypeDescription
iduuidUnique API key ID.
namestringName of the key
statestringState of the key: 'enabled', 'disabled'.
rolesarrayList of roles assigned to the key. Contains at least 1 element.
keySuffixstringLast 4 letters of the key.
createdAtdate-timeTimestamp the key was created. ISO-8601.
expireAtdate-timeTimestamp the key expires. If not present or is empty the key never expires. ISO-8601.
usedAtdate-timeTimestamp the key was used last time. If not present the key was never used. ISO-8601.

Sample response

{
"id": "uuid",
"name": "string",
"state": "string",
"roles": "Array",
"keySuffix": "string",
"createdAt": "date-time",
"expireAt": "date-time",
"usedAt": "date-time"
}

Create key

Creates new API key.

MethodPath
POST/v1/organizations/{organizationId}/keys

Request

Path Params

NameTypeDescription
organizationIduuidID of the organization that will own the key.

Body Params

NameTypeDescription
namestringName of the key.
expireAtstringTimestamp the key expires. If not present or is empty the key never expires. ISO-8601.
statestringInitial state of the key: 'enabled', 'disabled'. If not provided the new key will be 'enabled'.
hashData
rolesarrayList of roles assigned to the key. Contains at least 1 element.

Response

Response Schema

NameTypeDescription
key
keyIdstringGenerated key ID. Provided only if there was no 'hashData' in the request.
keySecretstringGenerated key secret. Provided only if there was no 'hashData' in the request.

Sample response

{
"keyId": "string",
"keySecret": "string"
}

Get key details

Returns a single key details.

MethodPath
GET/v1/organizations/{organizationId}/keys/{keyId}

Request

Path Params

NameTypeDescription
organizationIduuidID of the requested organization.
keyIduuidID of the requested key.

Response

Response Schema

NameTypeDescription
iduuidUnique API key ID.
namestringName of the key
statestringState of the key: 'enabled', 'disabled'.
rolesarrayList of roles assigned to the key. Contains at least 1 element.
keySuffixstringLast 4 letters of the key.
createdAtdate-timeTimestamp the key was created. ISO-8601.
expireAtdate-timeTimestamp the key expires. If not present or is empty the key never expires. ISO-8601.
usedAtdate-timeTimestamp the key was used last time. If not present the key was never used. ISO-8601.

Sample response

{
"id": "uuid",
"name": "string",
"state": "string",
"roles": "Array",
"keySuffix": "string",
"createdAt": "date-time",
"expireAt": "date-time",
"usedAt": "date-time"
}

Update key

Updates API key properties.

MethodPath
PATCH/v1/organizations/{organizationId}/keys/{keyId}

Request

Path Params

NameTypeDescription
organizationIduuidID of the organization that owns the key.
keyIduuidID of the key to update.

Body Params

NameTypeDescription
namestringName of the key
rolesarrayList of roles assigned to the key. Contains at least 1 element.
expireAtstringTimestamp the key expires. If not present or is empty the key never expires. ISO-8601.
statestringState of the key: 'enabled', 'disabled'.

Response

Response Schema

NameTypeDescription
iduuidUnique API key ID.
namestringName of the key
statestringState of the key: 'enabled', 'disabled'.
rolesarrayList of roles assigned to the key. Contains at least 1 element.
keySuffixstringLast 4 letters of the key.
createdAtdate-timeTimestamp the key was created. ISO-8601.
expireAtdate-timeTimestamp the key expires. If not present or is empty the key never expires. ISO-8601.
usedAtdate-timeTimestamp the key was used last time. If not present the key was never used. ISO-8601.

Sample response

{
"id": "uuid",
"name": "string",
"state": "string",
"roles": "Array",
"keySuffix": "string",
"createdAt": "date-time",
"expireAt": "date-time",
"usedAt": "date-time"
}

Delete key

Deletes API key. Only a key not used to authenticate the active request can be deleted.

MethodPath
DELETE/v1/organizations/{organizationId}/keys/{keyId}

Request

Path Params

NameTypeDescription
organizationIduuidID of the organization that owns the key.
keyIduuidID of the key to delete.