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
Number of results to return per page, between 1 and 1000. Default 250.
250
Page number to return, 0-indexed. Default 0.
0
GET /api/v1/auth/key HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer JWT
Accept: */*
{
"apiKeys": [
{
"cid": "ak1234567890abcdef",
"createdDate": "2025-01-15T22:47:30Z",
"description": "API Key used for entities scanner script",
"expirationDate": "2025-06-28T19:24:16.414Z",
"last4": "0kAg",
"name": "Entities scanner",
"roles": [
{
"role": "READ_ONLY",
"type": "text"
}
]
}
],
"page": 1,
"total": 1,
"totalPages": 1
}
Get API key
The unique, auto-generated identifier for the API key
ak1234567890abcdef
GET /api/v1/auth/key/{cid} HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer JWT
Accept: */*
{
"cid": "ak1234567890abcdef",
"createdDate": "2025-01-15T22:47:30Z",
"description": "API Key used for entities scanner script",
"expirationDate": "2025-06-28T19:24:16.414Z",
"last4": "0kAg",
"name": "Entities scanner",
"roles": [
{
"role": "READ_ONLY",
"type": "text"
}
]
}
Create new API key.
The API key used to make the request must have the Edit API keys
permission
Description of the API key
API Key used for entities scanner script
Expiration date of the API key. Format: ISO8601 with timezone offset
Name of the API key
Entities scanner
POST /api/v1/auth/key HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 173
{
"description": "API Key used for entities scanner script",
"expirationDate": "2025-06-28T19:24:16.414Z",
"name": "Entities scanner",
"roles": [
{
"role": "READ_ONLY",
"type": "text"
}
]
}
{
"apiKey": "3WpQ3WpQ3WpQ3WpQ",
"description": "API Key used for entities scanner script",
"expirationDate": "2025-06-28T19:24:16.414Z",
"name": "Entities scanner",
"roles": [
{
"role": "READ_ONLY",
"type": "text"
}
]
}
Update API key
The API key used to make the request must have the Edit API keys
permission
The unique, auto-generated identifier for the API key
ak1234567890abcdef
Description of the API key
API Key used for entities scanner script
Name of the API key
Entities scanner
PUT /api/v1/auth/key/{cid} HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer JWT
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-06-28T19:24:16.414Z",
"last4": "0kAg",
"name": "Entities scanner",
"roles": [
{
"role": "READ_ONLY",
"type": "text"
}
]
}
Delete API key
The API key used to make the request must have the Edit API keys
permission
The unique, auto-generated identifier for the API key
ak1234567890abcdef
DELETE /api/v1/auth/key/{cid} HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer JWT
Accept: */*
No content
Last updated
Was this helpful?