Webhook tool

Close CRM AI voice agents that turn phone calls into leads

The agent searches Close for the caller's number, creates a contact on a new lead when there is no match, and adds a note with what the caller wanted.

Inbound lead agent

Finds or creates the Close lead and notes the call.

Instructions

Search for the caller's number. If there is no lead, ask for their full name and create one. Before the call ends, add a note to the lead with what they asked for and anything you promised. Transfer to sales if they ask for a person.

Handoff
Sales rep

Connected tools

  • Find leadWebhook
  • Create leadWebhook
  • Add noteWebhook
  • Transfer to salesTransfer

What a Close AI voice agent can do

Open one to watch a call. The grey lines are the tools the agent calls mid-sentence.

A search for the caller's number tells the agent whether Close already has them, and returns the ID of the matching lead.

Tool definitions

Webhook tools go to POST /v1/agents/tools. Transfers are a system tool on the agent. Replace the placeholder values in capitals with your own.

Webhook

Find lead

Searches Close for the caller's number.

Show the JSON definition
find_lead
{
  "type": "webhook",
  "name": "find_lead",
  "description": "Searches Close for the caller's phone number. Returns the IDs and types of matching objects. Use the ID that starts with lead_.",
  "pre_tool_speech": "auto",
  "execution_mode": "immediate",
  "response_timeout_secs": 20,
  "api_schema": {
    "url": "https://api.close.com/api/v1/data/search/",
    "method": "POST",
    "request_headers": {
      "Authorization": {
        "type": "secret",
        "secret_value": "Basic YOUR_BASE64_API_KEY_AND_COLON"
      }
    },
    "request_body_schema": {
      "type": "object",
      "properties": {
        "query": {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "constant_value": "text"
            },
            "mode": {
              "type": "string",
              "constant_value": "exact_value"
            },
            "value": {
              "type": "string",
              "dynamic_variable": "system__caller_id"
            }
          }
        },
        "_limit": {
          "type": "integer",
          "constant_value": 5
        }
      },
      "required": []
    }
  }
}

Webhook

Create lead

Creates a contact, and Close makes a lead for it.

Show the JSON definition
create_lead
{
  "type": "webhook",
  "name": "create_lead",
  "description": "Creates a contact for a new caller with their name and phone number. Close creates a new lead named after the contact. Returns the contact, including lead_id.",
  "pre_tool_speech": "auto",
  "execution_mode": "immediate",
  "response_timeout_secs": 20,
  "api_schema": {
    "url": "https://api.close.com/api/v1/contact/",
    "method": "POST",
    "request_headers": {
      "Authorization": {
        "type": "secret",
        "secret_value": "Basic YOUR_BASE64_API_KEY_AND_COLON"
      }
    },
    "request_body_schema": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "The caller's full name."
        },
        "phones": {
          "type": "array",
          "description": "One phone: the caller's number, {{system__caller_id}}, with type mobile.",
          "items": {
            "type": "object",
            "properties": {
              "phone": {
                "type": "string",
                "description": "The caller's number in E.164 format."
              },
              "type": {
                "type": "string",
                "enum": [
                  "mobile",
                  "office"
                ],
                "description": "The kind of number."
              }
            },
            "required": [
              "phone",
              "type"
            ]
          }
        }
      },
      "required": [
        "name",
        "phones"
      ]
    }
  }
}

Webhook

Add note

Adds a note activity to the lead.

Show the JSON definition
add_note
{
  "type": "webhook",
  "name": "add_note",
  "description": "Adds a note about this call to the caller's lead. Use it once, before the call ends.",
  "pre_tool_speech": "auto",
  "execution_mode": "async",
  "response_timeout_secs": 20,
  "api_schema": {
    "url": "https://api.close.com/api/v1/activity/note/",
    "method": "POST",
    "request_headers": {
      "Authorization": {
        "type": "secret",
        "secret_value": "Basic YOUR_BASE64_API_KEY_AND_COLON"
      }
    },
    "request_body_schema": {
      "type": "object",
      "properties": {
        "lead_id": {
          "type": "string",
          "description": "The lead ID from find_lead or create_lead. It starts with lead_."
        },
        "note": {
          "type": "string",
          "description": "What the caller asked for and what you told them, in two or three sentences."
        }
      },
      "required": [
        "lead_id",
        "note"
      ]
    }
  }
}

Transfer

Transfer to sales

Cold transfer to a sales rep.

Show the JSON definition
transfer_to_sales
{
  "config": {
    "system_tools": {
      "transfer_to_number": {
        "description": null,
        "pre_tool_speech": "auto",
        "transfers": [
          {
            "destination": {
              "type": "phone",
              "phone_number": "+14155550142"
            },
            "condition": "The caller asks to speak with a person, after the note is added."
          }
        ]
      }
    }
  }
}

Set it up

No native connector. The tools call the Close API directly with an API key, sent as a Basic Authorization header you store as a secret. Vendor details read in November 2026.

  1. Create an API key

    In Close, go to Settings, then Developer, then API Keys, and create a key. Close scopes each API key to one user in one organization.

  2. Build the header value

    Close takes the key as the Basic auth username with an empty password. Base64-encode the key followed by a colon, and store "Basic " plus that string as the Authorization header secret.

  3. Add the tools

    Add the three webhook tools with that secret. find_lead reads system__caller_id, so the agent never asks for the number.

  4. Test with two numbers

    Call from a number that is on a contact in Close, then from a new number, and check the lead and its note in each case.

Before you build

Why a header and not basic_auth

Close's password must be empty, and Cartesia's basic_auth mode needs a non-empty secret password and keeps the username in plain text. A secret Authorization header keeps the whole key hidden.

Search results are IDs only

Close's search returns each match's ID and object type unless the request lists fields. A contact match and a lead match can both come back. The agent needs the lead ID.

Enterprise-grade security

  • HIPAA compliant badge

    HIPAA compliant

  • SOC 2 Type 2 badge

    SOC 2 Type 2

  • GDPR badge

    GDPR

Close AI voice agent FAQs

Does Close have an AI voice agent?

Yes. Close's AI agent, Chloe, places outbound calls and logs outcomes, summaries and transcripts back to the lead. Close's help center says Chloe's voice agents are outbound only, English only, and call US and Canadian numbers only.

Should I use Chloe or a Cartesia agent with Close?

Chloe is the shorter path for outbound calls to US and Canadian leads in English. The Cartesia agent on this page answers inbound calls, searches Close by the caller's number, creates a contact on a new lead when there is no match, and adds a note.

How do I connect Close to an AI voice agent?

Create an API key in Close under Settings, Developer, API Keys. Base64-encode the key followed by a colon, store "Basic " plus that string as a secret Authorization header, and add the three webhook tools.

Will the agent hit Close's rate limits?

Close says its limits are high enough that typical API workflows aren't affected. It limits requests per endpoint group, per API key and per organization, and returns 429 with a retry-after header when you go over.

Who bills the phone minutes on a Close voice agent?

Cartesia bills the agent at $0.03/min, plus LLM usage and telephony. Phone minutes depend on the number. Cartesia-provisioned numbers are US only and carry Cartesia's telephony fee. Numbers from your Twilio account or a SIP trunk pay your carrier's rates instead.

Get started today

Talk to an expert.

Connect with a member of our team and learn how Cartesia can help you build world-class voice experiences.

Contact Sales

Start building.

Access our models via API and bring a voice agent into production in minutes.

Try Cartesia