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

# Close

> Create Close leads with their contact when LinkedIn contacts reply, and react to Close status changes in Kerux.

> [!NOTE]
>
> **Pro plan.** Close works through a connection, HTTP steps and listeners (**Wait for webhook**, **Call & wait**), which are part of Pro and Agency (and the free trial). Anything you already have keeps working on every plan. See [Plans and billing](/help/account/billing.md).

When a contact replies on LinkedIn, a **Webhook / HTTP** step creates a Close lead with its contact (name, title, email), ready for your reps to call.

> [!NOTE]
>
> **How it connects:** Close's API with an API key (basic auth). See Close's [create a lead](https://developer.close.com/api/resources/leads/create) and [create a contact](https://developer.close.com/api/resources/contacts/create) docs. Requests and answers follow Close's docs.

## Before you start

* **An API key:** in Close, open **Settings > Developer > API Keys** and create one.

## 1. Connect Close

In Kerux, open **Integrations > Connections**, click **Connect** on **Custom API** (under **Developers**):

* **How it signs in:** **Username and password**: the API key as user name, the password empty.
* **Base URL:** `https://api.close.com`

Click **Save**, then **Test connection**.

## 2. Create the Close lead when someone replies

A contact who replies leaves the campaign (the **When the contact replies** box). In that box, add **Send to another campaign** and pick a short "Replied: to Close" campaign. Its first step is a **Webhook / HTTP** step with the Close connection:

```json theme={null}
{
  "method": "POST",
  "url": "/api/v1/lead/",
  "bodyType": "json",
  "body": {
    "name": "{{contact.company}}",
    "contacts": [
      {
        "name": "{{contact.full_name}}",
        "title": "{{contact.title | optional}}",
        "emails": [{ "email": "{{email}}", "type": "office" }]
      }
    ]
  }
}
```

To keep the LinkedIn profile on the contact, add it in the contact's URL list or a custom field, with the shapes Close's contact docs show. Close nests contacts in the lead; activities, tasks and opportunities are posted separately (Close's docs). The answer has the Close lead's `id` and `url`: `{{steps.<step>.response.body.id}}`.

## 3. React to status changes in Close

Close webhooks are created with a call to Close's webhook endpoint (see Close's webhook docs), for example for Close lead updates. Point it to a Kerux **Wait for webhook** step with **One shared URL + a match rule**, matched on the Close lead id from step 2. Click **Listen for test event**, change a test lead's status in Close, and branch on the status field from the sample.

## Test with one contact

In the follow-up campaign's **Builder**, click **Test** to open **Test on one contact**, then open the lead in Close from the `url` in the answer.

## Common errors

> [accordion] 401 Unauthorized
>
> The key goes in the user name with an empty password. Edit the connection and paste it again.

> [accordion] 400 about urls or emails
>
> Each email needs its `type`. Keep `office` as above or use a type Close lists.

> [accordion] Two Close leads for the same company
>
> Creating a lead doesn't merge with an existing one. Search Close first and add the contact to the existing lead with the contacts endpoint and its `lead_id`.

Related: [Webhook steps](/help/integrations/webhook-steps.md), [Connections](/help/integrations/connections.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.