# Authentication

> **Documentation index**
> Browse the [Woodpecker developer documentation index](https://developers.woodpecker.co/llms.txt) to discover related API references, guides, webhooks, MCP tools, and CLI documentation.

> All requests must be authenticated using an API key in the `x-api-key` header.

All requests must be authenticated using an API key in the `x-api-key` header.

## Generating an API key

To authenticate requests, you must first generate an API key. [Click here](https://app.woodpecker.co/panel#add-ons/integrations/api-keys) to go to the API keys view, or follow the instructions below:

1. Log into the Woodpecker account
2. Go to the Add-ons in the top-right corner → API & Integrations → 'API keys'
3. Click `Create a key`
4. You can add a label to each created key to describe what integration it is being used for

API keys are user-specific, meaning each user only sees their own keys. Keep them private and do not share them with others.

## Authenticating requests

The base URL is:

```
https://api.woodpecker.co/rest
```

All requests need to be authenticated using an `x-api-key` header. Try the request below, making sure to replace `{YOUR_API_KEY}` with your actual key.

```bash
curl --request GET \
  --url "https://api.woodpecker.co/rest/v1/me" \
  --header "x-api-key: {YOUR_API_KEY}"
```
