Skip to main content

Authentication

Once you have created an API key, you can use it to authenticate requests to the CrowdSec Service API by including it in the x-api-key header of your HTTP requests.

info
  • We're assuming your API key is set in the environment variable $KEY
curl -i -H "x-api-key: ${KEY}" -X GET -H "Content-Type: application/json" \
https://admin.api.crowdsec.net/v1/info
answer on success
{
"organization_id": "MY-ORG-ID-abcdef1234",
"subscription_type": "ENTERPRISE",
"api_key_name": "my test api key"
}
CrowdSec ConsoleCrowdSec Console