> ## Documentation Index
> Fetch the complete documentation index at: https://help.avoca.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Greenhouse Applicant Webhook

> Give new Greenhouse applicants an AI screening call through Speed-to-Lead

## Overview

Point a Greenhouse webhook at Avoca and each new applicant (or each applicant moved into a stage you choose) becomes a Speed-to-Lead lead under the **Greenhouse** lead source. The team's Speed-to-Lead campaign for that source places the screening call, the same way it calls any other lead. Ask your Avoca contact to set up that campaign before you turn the webhook on.

```
POST https://api.prod.avoca.ai/api/outbound/speed-to-lead/greenhouse
```

## Set up the webhook in Greenhouse

In Greenhouse, go to **Configure → Dev Center → Web Hooks** and create one webhook for each event you want:

* **Application created** calls each new applicant.
* **Candidate has changed stage** calls applicants when they enter a stage you list in `stage` (see [Choose who gets called](#choose-who-gets-called)).

For each webhook:

| Greenhouse field | Value |
| - | - |
| Endpoint URL | `https://api.prod.avoca.ai/api/outbound/speed-to-lead/greenhouse`, plus any filters below |
| Secret key | Greenhouse requires one. Avoca authenticates the delivery with your API key header instead. |
| Advanced → Additional Headers | `X-API-Key: <your team API key>` |

Use a **team** API key, the one for the team that should place the calls (see [Authentication](https://help.avoca.ai/api-reference/webhooks/lead-intake.md#authentication)). Enterprise and portfolio keys are rejected with `403`, because Greenhouse doesn't send anything Avoca could use to pick a team.

When you save, Greenhouse sends a test ping. Avoca answers it with `200`, which keeps the webhook enabled.

## Choose who gets called

Add filters to the endpoint URL. Each one takes repeated keys or comma-separated values:

| Parameter | Effect |
| - | - |
| `job_id` | Only applications to these Greenhouse job ids. Omit it to include every job. |
| `stage` | Only applications currently in these stages (stage names, not case-sensitive). Without it, only new applications are called and stage changes are ignored, so an applicant isn't called at every step. |

```
https://api.prod.avoca.ai/api/outbound/speed-to-lead/greenhouse?job_id=1234&job_id=5678&stage=Phone%20Screen
```

Avoca also skips:

* Prospects, and applications that are no longer active (for example, rejected or hired)
* Applicants without a US (+1) phone number. A mobile number is used first when there are several.

## What lands on the lead

* The applicant's name, phone number and personal email (or the first email)
* The job names, as the lead's service type
* Notes with the Greenhouse application id, job, office, current stage and profile link, which your screening script can read

Greenhouse retries and later stage changes for the same application merge into the existing lead while the selected phone number stays the same. If the selected phone number changes (for example, a recruiter corrects it or adds a mobile number), Avoca creates a separate lead that may receive outreach (see [Duplicate and repeat deliveries](https://help.avoca.ai/api-reference/webhooks/lead-intake.md#duplicate-and-repeat-deliveries)).

## Responses

Greenhouse treats any status other than `200` as a failed delivery and retries it, so Avoca answers `200` to everything it understands, including deliveries it deliberately skips.

| Status | Meaning |
| - | - |
| 200 | Ping acknowledged, applicant processed (`data.lead_id`), or delivery skipped (`ignored: true` with a `reason`) |
| 401 | Missing or invalid API key |
| 403 | The API key is an enterprise or portfolio key; use a team key |
| 500 | Avoca couldn't store the lead. Greenhouse retries it. |

Skip reasons: `prospect`, `not_active`, `job_not_selected`, `stage_not_selected`, `stage_change_without_stage_filter`, `no_us_phone`, `unsupported_action`, `invalid_payload`.
