# API Keys & Webhooks
## API Keys
HireBee provides a REST API for programmatic access to your recruitment data.
### Creating an API Key
1. Go to **Settings → API & Webhooks → API Keys**.
2. Click **Create API Key**.
3. Name your key (e.g., "HRIS Integration", "Reporting Tool").
4. Select scopes (what the key can access):
- `jobs:read` — read job data
- `jobs:write` — create/update jobs
- `candidates:read` — read candidate data
- `candidates:write` — create/update candidates
- `applications:read` — read applications
- `applications:write` — update application status
5. Set an expiration date (optional but recommended).
6. Copy the key — **it's shown only once**.
### Key Management
- View all active keys and their last-used dates.
- Revoke keys instantly if compromised.
- Monitor API usage logs per key.
## Webhooks
Webhooks notify external systems when events happen in HireBee.
### Setting Up a Webhook
1. Go to **Settings → API & Webhooks → Webhooks**.
2. Click **Create Webhook**.
3. Enter the **Target URL** — where event data should be sent.
4. Select **Events** to subscribe to:
- `application.created` — new application received
- `application.updated` — application status changed
- `candidate.created` — new candidate added
- `interview.scheduled` — interview created
- `offer.sent` — offer sent to candidate
5. Optionally add a **secret** for signature verification.
6. Save and test with a test event.
### Webhook Delivery
- Events are delivered as HTTP POST requests with JSON payloads.
- Failed deliveries are retried automatically (up to 3 retries with exponential backoff).
- View delivery history and debug failed webhooks in the dashboard.
### Testing
Use the **Test Webhook** button to send a sample event to your URL and verify it's working correctly.