Skip to main content
POST
cURL

Authorizations

Authorization
string
header
required

Send your API key as Authorization: Bearer YOUR_API_KEY.

Headers

Idempotency-Key
string

Optional retry key for create-style operations. Reusing the same key with the same request returns the original result; reusing it with a different request returns 409.

Required string length: 1 - 255

Body

application/json
locationId
string
required

Must be a connected V2 project (a GHL location connected to TFU). Passing an unconnected location id returns 404 "V2 project for locationId=… not found".

Minimum string length: 1
Example:

"loc_abc123"

name
string
required
Minimum string length: 1
Example:

"Roofing Follow Up"

agentType
enum<string>
required

Campaign type returned by List agent types, which decides what triggers the call: outreach on a CRM tag, inbound on an incoming call, appointment when an appointment is booked. An unrecognised value is rejected with a 400 listing the valid types. Integrations written before this taxonomy may instead send a legacy V2 template id as system, with no agentType; that path still works and infers the type and capabilities from the template, but it is not the supported way to create an agent.

Available options:
outreach,
inbound,
appointment
Example:

"outreach"

capabilityIds
enum<string>[]

Behaviours to install on the new agent. Required for outreach and inbound — omitting it returns a 400 reading "At least one capability is required". Silently ignored for appointment, which always starts with Appointment Booking. Every id is installed with its tool, post-call fields, workflow route, and config gate. The FIRST id additionally selects the base template the agent is cloned from, which is what the campaign reports as system; the others are installed on top of it.

Minimum array length: 1
Available options:
appointment_booking,
live_transfer,
add_tag
Example:
templateId
enum<string>

Single-capability form of capabilityIds, kept for callers written before multi-select. Ignored when capabilityIds is present.

Available options:
appointment_booking,
live_transfer,
add_tag
Example:

"live_transfer"

campaign
object

Optional campaign fields applied during Create agent. Server-owned fields such as id, agentId, name, agentType, active, createdAt, and updatedAt are ignored — the agent starts paused and inherits its agent type from the parent request.

config
object

Optional editable agent configuration accepted on create and update. Omitted fields keep their template defaults on create, or remain unchanged on update.

{key}
any

Response

Original successful response for a replayed Idempotency-Key request.

success
boolean
required
agent
object
required
idempotentReplay
boolean

True when returned from a previous successful Idempotency-Key request.