API Keys
Use these operations to interact with API keys in Cortex.
Required permissions
Your API token must have the Edit API keys permission.
Operations
List API keys
The API key used to make the request must have the Edit API keys permission
All requests to the Cortex API need to provide an Authorization: Bearer <token> header, where <token> is an API key created in the Settings page of your workspace.
Number of results to return per page, between 1 and 1000. Default 250.
250Page number to return, 0-indexed. Default 0.
0Successfully found API keys
Bad request
The client has exceeded the rate limit by performing too many requests in a short period. Retry the request after a delay.
GET /api/v1/auth/key?pageSize=250&page=0 HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"apiKeys": [
{
"cid": "ak1234567890abcdef",
"createdDate": "2025-01-15T22:47:30Z",
"description": "API Key used for entities scanner script",
"expirationDate": "2025-11-14T22:45:52.932Z",
"last4": "0kAg",
"name": "Entities scanner",
"roles": [
{
"0": "[",
"1": "C",
"2": "i",
"3": "r",
"4": "c",
"5": "u",
"6": "l",
"7": "a",
"8": "r",
"9": " ",
"10": "R",
"11": "e",
"12": "f",
"13": "e",
"14": "r",
"15": "e",
"16": "n",
"17": "c",
"18": "e",
"19": "]",
"type": "text",
"role": "READ_ONLY"
}
]
}
],
"page": 1,
"total": 1,
"totalPages": 1
}Get API key
All requests to the Cortex API need to provide an Authorization: Bearer <token> header, where <token> is an API key created in the Settings page of your workspace.
The unique, auto-generated identifier for the API key
ak1234567890abcdefSuccessfully found API key
Bad request
API key not found
The client has exceeded the rate limit by performing too many requests in a short period. Retry the request after a delay.
GET /api/v1/auth/key/{cid} HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"cid": "ak1234567890abcdef",
"createdDate": "2025-01-15T22:47:30Z",
"description": "API Key used for entities scanner script",
"expirationDate": "2025-11-14T22:45:52.932Z",
"last4": "0kAg",
"name": "Entities scanner",
"roles": [
{
"0": "[",
"1": "C",
"2": "i",
"3": "r",
"4": "c",
"5": "u",
"6": "l",
"7": "a",
"8": "r",
"9": " ",
"10": "R",
"11": "e",
"12": "f",
"13": "e",
"14": "r",
"15": "e",
"16": "n",
"17": "c",
"18": "e",
"19": "]",
"type": "text",
"role": "READ_ONLY"
}
]
}Create new API key.
The API key used to make the request must have the Edit API keys permission
All requests to the Cortex API need to provide an Authorization: Bearer <token> header, where <token> is an API key created in the Settings page of your workspace.
Description of the API key
API Key used for entities scanner scriptExpiration date of the API key. Format: ISO8601 with timezone offset
Name of the API key
Entities scannerSuccessfully created API key
Bad request
Access denied
The client has exceeded the rate limit by performing too many requests in a short period. Retry the request after a delay.
POST /api/v1/auth/key HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 343
{
"description": "API Key used for entities scanner script",
"expirationDate": "2025-11-14T22:45:52.932Z",
"name": "Entities scanner",
"roles": [
{
"0": "[",
"1": "C",
"2": "i",
"3": "r",
"4": "c",
"5": "u",
"6": "l",
"7": "a",
"8": "r",
"9": " ",
"10": "R",
"11": "e",
"12": "f",
"13": "e",
"14": "r",
"15": "e",
"16": "n",
"17": "c",
"18": "e",
"19": "]",
"type": "text",
"role": "READ_ONLY"
}
]
}{
"apiKey": "3WpQ3WpQ3WpQ3WpQ",
"description": "API Key used for entities scanner script",
"expirationDate": "2025-11-14T22:45:52.932Z",
"name": "Entities scanner",
"roles": [
{
"0": "[",
"1": "C",
"2": "i",
"3": "r",
"4": "c",
"5": "u",
"6": "l",
"7": "a",
"8": "r",
"9": " ",
"10": "R",
"11": "e",
"12": "f",
"13": "e",
"14": "r",
"15": "e",
"16": "n",
"17": "c",
"18": "e",
"19": "]",
"type": "text",
"role": "READ_ONLY"
}
]
}Update API key
The API key used to make the request must have the Edit API keys permission
All requests to the Cortex API need to provide an Authorization: Bearer <token> header, where <token> is an API key created in the Settings page of your workspace.
The unique, auto-generated identifier for the API key
ak1234567890abcdefDescription of the API key
API Key used for entities scanner scriptName of the API key
Entities scannerSuccessfully updated API key
Bad request
Access denied
API key not found
The client has exceeded the rate limit by performing too many requests in a short period. Retry the request after a delay.
PUT /api/v1/auth/key/{cid} HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 84
{
"description": "API Key used for entities scanner script",
"name": "Entities scanner"
}{
"cid": "ak1234567890abcdef",
"createdDate": "2025-01-15T22:47:30Z",
"description": "API Key used for entities scanner script",
"expirationDate": "2025-11-14T22:45:52.932Z",
"last4": "0kAg",
"name": "Entities scanner",
"roles": [
{
"0": "[",
"1": "C",
"2": "i",
"3": "r",
"4": "c",
"5": "u",
"6": "l",
"7": "a",
"8": "r",
"9": " ",
"10": "R",
"11": "e",
"12": "f",
"13": "e",
"14": "r",
"15": "e",
"16": "n",
"17": "c",
"18": "e",
"19": "]",
"type": "text",
"role": "READ_ONLY"
}
]
}Delete API key
The API key used to make the request must have the Edit API keys permission
All requests to the Cortex API need to provide an Authorization: Bearer <token> header, where <token> is an API key created in the Settings page of your workspace.
The unique, auto-generated identifier for the API key
ak1234567890abcdefSuccessfully deleted API key
No content
Bad request
Access denied
API key not found
The client has exceeded the rate limit by performing too many requests in a short period. Retry the request after a delay.
DELETE /api/v1/auth/key/{cid} HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
No content
Last updated
Was this helpful?