Skip to main content

Create API Key

POSThttps://api.eu1.coralogix.com/mgmt/openapi/5/aaa/api-keys/v3

Creates a new API key for the authenticated team.

Authorizations

Authorizationstringheaderrequired
API key authentication

Request​

Body

application/json
    accessPolicy#string

    JSON string representing the access policy for this API key. Defines granular permissions for users and groups. An empty string is no policy. A key that a team owns accepts only team-custom-api-keys permissions in the policy.

    Example: {"version":"2025-01-01","default":{"permissions":{"team-custom-api-keys:ReadAccessPolicy":"grant","team-custom-api-keys:Manage":"deny","team-custom-api-keys:UpdateAccessPolicy":"deny","team-custom-api-keys:ReadConfig":"grant"}},"rules":[]}
    hashed#boolean

    Whether the value is stored as a one-way hash. Omitting it is the same as false. The API cannot read the value of a hashed key again.

    Example: true

    This data structure allows to specify loose permissions and permission presets for an API key.

    name#stringrequired

    Display name. Not unique: another key can have the same name.

    Possible values: non-empty

    Example: my_api_key

    Owner of the key. A key that a team owns can be created only for the team of the caller. An organisation cannot own a key that this operation creates: it answers 400.

Response

application/json

This data structure is the response obtained when creating an API key. Read the key with the get operation.

    keyId#stringrequired

    Key identifier.

    Example: my_key_id
    name#stringrequired

    Display name.

    Example: my_api_key
    value#stringrequired

    The value of the key. A hashed key has it here too, once: the get operation never returns the value of a hashed key.

    Example: my_api_key_value