# Authentication Elastic Cloud APIs support key-based authentication. You must [create an API key](https://www.elastic.co/guide/en/cloud/current/ec-api-authentication.html) and use the encoded value in the request header. For convenience, you can export your API key into your shell environment: ``` export EC_API_KEY="YOUR_GENERATED_API_KEY" ``` For example, the following `curl` command retrieves a list of your deployments: ``` curl -H "Authorization: ApiKey $EC_API_KEY" https://api.elastic-cloud.com/api/v1/deployments ```