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

get

List API keys

The API key used to make the request must have the Edit API keys permission

Authorizations
Query parameters
pageSizeinteger · int32Required

Number of results to return per page, between 1 and 1000. Default 250.

Default: 250
pageinteger · int32Required

Page number to return, 0-indexed. Default 0.

Default: 0
Responses
200

Successfully found API keys

get
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-09-15T10:22:00.071Z",
      "last4": "0kAg",
      "name": "Entities scanner",
      "roles": [
        {
          "role": "READ_ONLY",
          "type": "text"
        }
      ]
    }
  ],
  "page": 1,
  "total": 1,
  "totalPages": 1
}

Get API key

get

Get API key

Authorizations
Path parameters
cidstringRequired

The unique, auto-generated identifier for the API key

Example: ak1234567890abcdef
Responses
200

Successfully found API key

get
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-09-15T10:22:00.071Z",
  "last4": "0kAg",
  "name": "Entities scanner",
  "roles": [
    {
      "role": "READ_ONLY",
      "type": "text"
    }
  ]
}

Create API key

post

Create new API key.

The API key used to make the request must have the Edit API keys permission

Authorizations
Body
descriptionstringOptional

Description of the API key

Example: API Key used for entities scanner script
expirationDatestring · date-timeOptional

Expiration date of the API key. Format: ISO8601 with timezone offset

namestringRequired

Name of the API key

Example: Entities scanner
Responses
200

Successfully created API key

post
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-09-15T10:22:00.071Z",
  "name": "Entities scanner",
  "roles": [
    {
      "role": "READ_ONLY",
      "type": "text"
    }
  ]
}
{
  "apiKey": "3WpQ3WpQ3WpQ3WpQ",
  "description": "API Key used for entities scanner script",
  "expirationDate": "2025-09-15T10:22:00.071Z",
  "name": "Entities scanner",
  "roles": [
    {
      "role": "READ_ONLY",
      "type": "text"
    }
  ]
}

Update API key

put

Update API key

The API key used to make the request must have the Edit API keys permission

Authorizations
Path parameters
cidstringRequired

The unique, auto-generated identifier for the API key

Example: ak1234567890abcdef
Body
descriptionstringOptional

Description of the API key

Example: API Key used for entities scanner script
namestringRequired

Name of the API key

Example: Entities scanner
Responses
200

Successfully updated API key

put
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-09-15T10:22:00.071Z",
  "last4": "0kAg",
  "name": "Entities scanner",
  "roles": [
    {
      "role": "READ_ONLY",
      "type": "text"
    }
  ]
}

Delete API key

delete

Delete API key

The API key used to make the request must have the Edit API keys permission

Authorizations
Path parameters
cidstringRequired

The unique, auto-generated identifier for the API key

Example: ak1234567890abcdef
Responses
200

Successfully deleted API key

No content

delete
DELETE /api/v1/auth/key/{cid} HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer JWT
Accept: */*

No content

Last updated

Was this helpful?