Skip to content

Create tenant API key

Request

Create an API key for a tenant's REST API. Requires a Full access key. The key is returned in apiKey in this response only, so store it securely. It can take a few seconds to start working. A tenant can have at most 20 keys, including those created in the Push console.

Security
x-api-key
Path
tenantIdstring, (uuid)required

Unique identifier for the tenant.

Bodyapplication/jsonrequired
friendlyNamestring, <= 50 charactersrequired

Name for the key. Letters, digits, spaces and ( ) , . ' - are allowed.

Example:"SIEM integration"
permissionsstringrequired

What the key can do. A READ_ONLY key can only make GET requests.

Enum:"FULL_ACCESS""READ_ONLY"
Example:"READ_ONLY"
curl -i -X POST \
  'https://eu1.partner-api.pushsecurity.com/v1/tenants/{tenantId}/apiKeys' \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: YOUR_API_KEY_HERE' \
  -d '{
    "friendlyName": "SIEM integration",
    "permissions": "READ_ONLY"
  }'

Responses

OK

Bodyapplication/json
apiKeystringrequired

The API key. It is returned only once.

Example:"psak_0123456789abcdef0123456789abcdef"
creationTimestampinteger, (int64)required

When the key was created, as a UNIX timestamp in seconds.

Example:1718100000
creatorEmailstringrequired

Email address of whoever created the key. For a key created through the Partner API, this is the creator of the partner API key that was used.

Example:"jane@msp.example.com"
enabledbooleanrequired

Whether the key can be used.

Example:true
friendlyNamestringrequired

Name given to the API key when it was created.

Example:"SIEM integration"
idstring, (uuid)required

Unique identifier for the API key.

Example:"5b0c6a7e-3f1d-4c2b-9e8a-7d6f5e4c3b2a"
lastUsedTimestampinteger or null, (int64)required

When the key was last used, as a UNIX timestamp in seconds. null if never used.

Example:1718186400
permissionsstringrequired

What the key can do. A READ_ONLY key can only make GET requests.

Enum:"FULL_ACCESS""READ_ONLY"
Example:"FULL_ACCESS"
Response
{ "id": "5b0c6a7e-3f1d-4c2b-9e8a-7d6f5e4c3b2a", "friendlyName": "SIEM integration", "creatorEmail": "jane@msp.example.com", "permissions": "FULL_ACCESS", "enabled": true, "creationTimestamp": 1718100000, "lastUsedTimestamp": 1718186400, "apiKey": "psak_0123456789abcdef0123456789abcdef" }