Prerequisites
- A GoHighLevel sub-account connected as a project. In the dashboard that is Projects. See Agencies, projects and sub-accounts.
- An API key with the
agents:write,phone_numbers:writeandcalls:writescopes, created under API Keys in the dashboard. See Authentication. - A payment method on your agency wallet. Numbers and minutes are paid.
- A phone you can answer.
Step 1: Find the project’s locationId
Almost every request is scoped to a project by itslocationId, the
GoHighLevel location id. List campaign projects
returns the projects that can hold campaigns. Pick the one you want.
locationId of your project.
Step 2: Create the agent and its campaign
One request to Create agent creates the agent, its prompt, and the campaign that decides who it calls and when.
The response is the agent, with its
id, the config as stored, and the
campaign under campaign. The campaign is created paused, with
active: false. Nothing dials yet. If part of the setup could not be applied,
partialFailures says which part.
Keep the agent id. Every request below uses it.
Step 3: Give it a number
The campaign needs a caller ID. Search agent phone numbers for a local number, then buy it for the agent.fromNumbers. If you already own numbers in Twilio, attach one of
those instead. See Phone numbers and caller ID.
Step 4: Hear it call you
Before a lead hears the agent, you should. Call Create test call:contact object with stand-in lead details if you want the prompt’s
variables filled in. The response carries the callId. When you hang up, read
the record:
Step 5: Switch it live
One field on Update campaign:new_lead in the sub-account and the agent calls
them, inside the campaign’s calling window. The response carries
callingWindow. If the default hours do not suit the business, set them
before you go live. See Calling window.
What you built
- An agent that knows what to say. See What an agent is.
- A campaign that decides who to call and when. See What a campaign is.
- A number the calls come from.
Next steps
- Write a skill to handle the price objection the way you would.
- What your agent records to see what each call writes back to the CRM.
- Campaign workflows to tag, move and notify on each outcome.
- Set up rebilling for a sub-account to charge the client for the calls you just set running.
- Connect an AI assistant to run all of this by talking to it.
