# How to send leads to Freshsales with the API

> Add website enquiries to Freshsales with the contacts upsert API. Find your bundle name and API key, and match returning customers by email.

Source: https://roughfigure.com/blog/send-leads-to-freshsales (updated 2026-11-11)

To send leads to Freshsales, copy your **API key** from **Settings → API settings**, note your **bundle name** (the first part of `yourname.myfreshworks.com`), and `POST` each lead to `/crm/sales/api/contacts/upsert` with the email as the unique identifier. Freshsales adds new people and updates the ones it already has.

## Find your key and bundle name

1. In Freshsales, click your profile picture and choose **Settings**.
2. Open **API settings** and copy **Your API key**.
3. Look at the address you sign in at. In `https://ridgewayfencing.myfreshworks.com`, the bundle name is `ridgewayfencing`.

## The request

```http
POST https://ridgewayfencing.myfreshworks.com/crm/sales/api/contacts/upsert
Authorization: Token token=<your API key>
Content-Type: application/json

{
  "unique_identifier": { "emails": "ruth.morgan@mail.test" },
  "contact": {
    "first_name": "Ruth",
    "last_name": "Morgan",
    "emails": "ruth.morgan@mail.test",
    "mobile_number": "+447700900654",
    "zipcode": "CF10 1EP"
  }
}
```

Note the unusual header: `Token token=…`, not `Bearer`. It’s the most common reason a first request comes back 401.

## Things to set up in Freshsales

- **Lead source.** Create a lead source called “Website estimator” under **Admin settings → Lead sources** and send its ID as `lead_source_id`, so reports show where work comes from.
- **Assignment rules.** Under **Admin settings → Assignment rules**, send new contacts by postcode or service to the right person.
- **Sales sequences.** Start a short sequence for new website contacts: a thank-you email the same day and a follow-up task two days later.

## Required fields can block leads

If an admin has made a contact field required (say, “Company”), API requests without it fail with a 400. Either relax the rule for the API or send a sensible default. Trades whose customers are homeowners usually don’t need a company at all.

## Doing it in RoughFigure

In RoughFigure we’ve built Freshsales in as a direct connection. Under **Integrations → Send leads to your CRM**, choose **Freshsales**, paste your API key and bundle name, and click **Connect**. Every estimator lead is then upserted as a contact with their name, email, mobile number and postcode, with no code and no duplicates. [See the Freshsales integration](https://roughfigure.com/integrations/freshsales).

## Questions

### Is Freshsales the same as Freshworks CRM?

Yes. Freshworks has used both names, and accounts live at `yourname.myfreshworks.com`. Older accounts on `freshsales.io` addresses use the same API under that address.

### Can I create a deal too?

Yes, by posting to the deals endpoint with the contact’s ID. Many teams let a workflow create deals once a contact is qualified instead.

### Why does the contact have my first name as the last name?

Freshsales needs a last name. If a customer only gives one name, a sensible fallback is to use it for both, which you can tidy up when you call.
