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

# Freshsales

> Create Freshsales contacts when LinkedIn contacts reply, using the Freshsales API from a Kerux campaign.

> [!NOTE]
>
> **Pro plan.** Freshsales works through a connection and HTTP steps, 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, a **Webhook / HTTP** step creates the contact in Freshsales. A later step can move the deal when a meeting is booked.

> [!NOTE]
>
> **How it connects:** the Freshsales API with your API key. See the [Freshsales API docs](https://developers.freshworks.com/crm/api/). Requests and answers follow those docs.

## Before you start

* **Your API key:** in Freshsales, open your profile's **API settings** and copy it.
* **Your domain:** the part before `.myfreshworks.com` in your Freshsales address.

## 1. Connect Freshsales

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

* **How it signs in:** **API key in a header**, **Header name** `Authorization`, and paste `Token token=` followed by your key (that's the format Freshsales reads: no Bearer, no basic auth).
* **Base URL:** `https://YOUR-DOMAIN.myfreshworks.com`

Click **Save**.

## 2. Create the contact 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 Freshsales" campaign. Its first step is a **Webhook / HTTP** step:

```json theme={null}
{
  "method": "POST",
  "url": "/crm/sales/api/contacts",
  "bodyType": "json",
  "body": {
    "contact": {
      "first_name": "{{contact.first_name}}",
      "last_name": "{{contact.last_name | optional}}"
    }
  }
}
```

That's the shape in Freshsales' own example. To add the email, LinkedIn URL or owner, first list your contact fields with `GET /crm/sales/api/settings/contacts/fields` (Freshsales' docs) and add them to `contact` with the names it returns; custom fields go under `custom_field`.

The answer has the new contact under `contact` with its `id`: `{{steps.<step>.response.body.contact.id}}`.

## Test with one contact

In the follow-up campaign's **Builder**, click **Test** to open **Test on one contact**, then open the contact in Freshsales.

## Common errors

> [accordion] 401 Unauthorized
>
> The header must read `Token token=YOUR_KEY` exactly. Edit the connection and type it again.

> [accordion] 400 about a field
>
> A field name isn't in your account's contact fields. Check them with the fields endpoint above.

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.