Capturia measures its ads and site traffic with the Meta pixel and Google Analytics. You can decline at any time. Learn more

FR
GoHighLevelIntegration guide

GoHighLevel

Send Capturia the leads of a GoHighLevel form and the purchases of your funnels through a workflow's Webhook action, step by step.

Setup

Create a GHL workflow triggered by your form, filtered on its consent checkbox, with the native Webhook action.

Put the consent checkbox in your form

In GoHighLevel's form builder, a new form already contains a T & C element: a checkbox. Write your text-message consent wording in it: who is texting, about what, how often, possible charges, HELP and STOP. This is the checkbox the workflow will read. The screenshot shows the published form, as your visitors see it.

Create the workflow and its filtered trigger

In Automation > Workflows, create a workflow and add the Form submitted trigger. Add two filters: Form is → your form, and Terms and Conditions → Yes. Only leads who checked the consent box trigger the workflow.

Add the Webhook action

Under the trigger, click the +, search for webhook and choose Webhook, in the Send data section. Not Custom webhook: marked with a crown, it's a HighLevel premium action, and the Webhook action is enough here.

Configure the action

Action name: a clear name (e.g. Send the lead to Capturia)

Method: POST

URL: https://api.capturia.io/v1/leads/capture

Custom Data: add these key/value pairs

  • sms_consent → true (fixed value: the trigger's filter guarantees the box is checked)
  • source_label → ghl_workflow
  • utm.source → where the lead comes from (e.g. site_web), optional
  • pipeline.pipeline_slug → the target pipeline's identifier, copied from Capturia (optional)
  • pipeline.stage_slug → the target stage's identifier, copied from the same place (optional; without pipeline.pipeline_slug, the stage is looked up in your default pipeline)
  • qualification_answers. followed by a question from your form → the lead's answer to that question, one pair per question (optional, see the tip below)

Headers: add Authorization with the value Bearer cap_live_xxxxxxxx, replacing cap_live_xxxxxxxx with your full Capturia API key.

No need to map the phone, email or name: the action sends the contact's standard data on its own, and Capturia reads it directly. No encoding to set: the action sends JSON.

Publish the workflow

Click Save, then switch the toggle from Draft to Publish.

Test with a real form submission

Submit your form with your own cell number, your own email and the consent box checked. An example email (@example.com, @example.net, @example.org) creates the record, but the agent never texts an example contact. In the workflow's Execution logs tab, open the Webhook action's details (View details): Success and a message starting with "status":200 confirm the send, with created for a new lead or existing_pipeline_contact if this contact is already in your pipeline. If you added qualification_answers. pairs, the message says how many answers were recorded (Lead captured with 7 qualification answer(s)). Every send creates a real lead (no trial mode): the record shows up under Prospects and the SMS agent texts the number if everything is in order. Archive the test record afterwards.

Field mapping

The Webhook action automatically sends the contact's standard data (phone, email, name): your Custom Data pairs add consent, source, the form's answers and, if needed, the target pipeline.

Capturia fieldRequiredSource fieldNotes
phoneYessent automatically (contact standard data)E.164 (+15145551234), NANP 10 or 11 digits, or formatted (514) 555-1234 / 514-555-1234. 10-digit numbers auto-prefixed with +1.
sms_consentYestrue (fixed value, behind the trigger's filter)Boolean true OR string 'true' / 'yes' / 'oui' / 'vrai' / '1' / 'on' / 'checked' (case-insensitive). Accepted at the body root or inside the customData object (GoHighLevel webhooks).
first_nameNosent automatically (contact standard data)Lead's first name
last_nameNosent automatically (contact standard data)Last name
full_nameNoalso sent automatically, and ignored: the first and last name take precedenceFull name, when your source doesn't split first and last name: Capturia splits it at the first space. Ignored if first_name or last_name is sent.
emailNosent automatically (contact standard data)RFC 5322 valid email
source_labelNo"ghl_workflow"Free-form tag (e.g. 'webflow_form', 'fb_lead_ads')
utm.sourceNoyour custom field, or a fixed valueNested utm object, or the flat key utm.source
utm.mediumNoyour custom field, or a fixed valueNested utm object, or the flat key utm.medium
utm.campaignNoyour custom field, or a fixed valueNested utm object, or the flat key utm.campaign
tagsNo"tag1, tag2" (added to the contact tags GHL already sends)Array of strings, or a comma-separated string
pipeline.pipeline_slugNoidentifier copied from Capturia (fixed value)Text identifier of the target pipeline (not its UUID). Copy it in Capturia: Settings, API Keys, "Your pipeline and stage identifiers" section. Without it, the default pipeline is targeted. Nested pipeline object, or flat key.
pipeline.stage_slugNoidentifier copied from Capturia (fixed value)Text identifier of the target stage, copied from the same place. Without it, the stage marked "Default stage" next to the identifiers. Sent without pipeline_slug, it is looked up in your default pipeline. Nested pipeline object, or flat key.
qualification_answers.<question>Nothe contact field that holds the answer ({{contact.…}}), one pair per questionA form answer, one pair per question: qualification_answers. followed by the question (e.g. qualification_answers.Do you live in Quebec?) → the lead's answer. It shows up on the record, question and answer, and the SMS agent knows it. A question written with underscores is shown with spaces. Up to 20 answers, 1,000 characters per answer. Or the qualification_answers list of question/answer pairs.

SMS Consent — CASL / Quebec Law 25

The sms_consent field is required. Canada's Anti-Spam Legislation (CASL) and Quebec's Law 25 require explicit consent before any commercial SMS. Capturia stores a timestamped record of this attestation for your legal protection.

Recommended setup — consent captured at source

Add a custom consent question directly in the source form (Facebook form custom question, Typeform field). Map this field to sms_consent. With GoHighLevel, the form's checkbox filters the trigger and sms_consent is sent as the fixed value true (see the GoHighLevel guide). Consent is explicit, dated, and tied to the lead who gave it.

Alternative setup — checkbox on the landing page

If the source form doesn't allow custom questions, add a consent checkbox on the landing page before the ad. Keep a copy of the page (Wayback Machine, dated screenshot) as evidence.

Legal grey area

Writing a fixed sms_consent: true without real lead attestation = legal risk. In case of complaint, Capturia may be required to provide proof of consent. Without proof, liability falls on the business that sends the lead.

Step-by-step test

Submit your form with your own cell number, your own email and the consent box checked, then open the workflow's Execution logs tab: the Webhook action's details show Success and Capturia's response ("status":200, with created or existing_pipeline_contact). It's a real lead (no trial mode): the record shows up under Prospects and the SMS agent texts the number if consent is in order. Never test with a real customer's record, and archive the test record afterwards.

Send a purchase

When a buyer pays in a GoHighLevel funnel, a workflow sends the purchase to Capturia through the same Webhook action, at the purchases address. Capturia records the purchase on the buyer's contact (created if needed) and starts the offer's after-purchase program: if they checked the text-message consent box, the offer's text agent writes to them first; otherwise, the program writes to them by email.

Prepare the offer and the key in Capturia

The offer you sell exists in Capturia, with its after-purchase program. Copy its identifier: Settings, API Keys, "Your offer identifiers" section, the offer's Copy button.

Your API key carries the Read + write preset (it includes events:ingest and leads:capture) and the API terms attestation, checked when creating the key or in its Permissions tab. Sending text-message consent means attesting it: without leads:capture or up-to-date terms, a purchase that sends it is refused.

Add a separate text-message consent box

Text-message consent is given in a separate box, optional and unchecked at first. In GoHighLevel, create a checkbox custom field (for example "Text consent"), put it in the form the buyer fills before paying (the contact details step of your funnel), and write your consent text in it: who writes, about what, how often, possible charges, HELP and STOP.

Create the workflow on the order

In Automation > Workflows, create a workflow and add the Order Submitted trigger. Filter it on the offer's product (Global Product → your product): one workflow per offer. Under the trigger, add an If/Else condition on your "Text consent" field: one branch where the box is checked, and the None branch for the others.

Add the Webhook action in each branch

In each branch, add the Webhook action (Send data section), not Custom webhook: marked with a crown, it's a premium action: HighLevel counts each of its runs and bills the ones beyond the free runs or those included in your plan. The Webhook action also sends the Authorization header and the purchase data you add below.

Method: POST

URL: https://api.capturia.io/v1/purchases

Headers: add Authorization with the value Bearer cap_live_xxxxxxxx, replacing cap_live_xxxxxxxx with your full API key.

Custom Data: add these key/value pairs

  • order_id → the order identifier (Order ID, under Order in the value list), followed by a hyphen and a word specific to the offer (e.g. the identifier, then -pack)
  • offer_id → the offer identifier copied in step 1 (fixed value)
  • amount → the offer's price, typed in (fixed value, in dollars: 7.00 and 7 are read)
  • currency → CAD (optional: CAD by default)
  • source_label → ghl_funnel (optional)
  • in the checked branch only: sms_consent → true (fixed value)

No need to map the email, phone or name: the action sends them on its own, with the contact's GoHighLevel ID, which finds the same contact on their next purchase.

Publish and test with a real order

Click Save, then switch the workflow from Draft to Publish. Place a real order in your funnel with your own cell phone and your own email, box checked. In Execution logs, the Webhook action's details show Capturia's response: "status":201 and "created":true for a new purchase, 200 and "created":false if this order had already been received. The contact shows up in Capturia with its purchase, at its price, and the agent's first text goes out at the moment the program chooses. The same response says what follows the purchase: "follow_up":{"program":"active","first_message":"sms"…} when the program starts and the agent texts first, "first_message":"email" when it writes by email, or "program":"none" with its reason (offer_created_from_key: send the offer_id pair, not offer_key). sms_consent says whether the box was recorded. With a bump or an upsell in the order, each offer has its own purchase.

Error catalog

CodeErrorCauseFix
400invalid_payloadEmpty body or malformed JSON (extra comma, missing quote)Validate the JSON you send, then send again
401missing_api_keyAuthorization header absent or malformedAdd the header Authorization: Bearer cap_live_...
401invalid_api_keyKey revoked or mistypedCheck the key in Capturia, generate a new one if needed
401expired_api_keyKey past its expiration dateCreate a new key in Capturia (API Keys page), then replace the old one in the tool
403terms_acceptance_requiredAPI terms of use not accepted (or a new version to accept)Someone who manages API keys opens the key in Capturia (API Keys page, Permissions tab) and checks the terms attestation
403insufficient_scopeKey lacks the leads:capture scopeCreate a new key with the "Lead capture" preset
415invalid_content_typeBody sent as a form (Form, x-www-form-urlencoded) instead of JSONSend as JSON (Zapier: Payload Type = Json; Make: Body content type = application/json; GoHighLevel's Webhook action already sends JSON)
422invalid_phonePhone missing or format not recognizedUse E.164 (+15145551234) or NANP 10 digits (5145551234)
422invalid_emailMalformed emailSend a valid address, or leave the field out
422missing_consentsms_consent absent, false, or unrecognized value — the field is looked up at the body root AND inside the customData object (GHL)Map the consent field to sms_consent (true / yes / oui). From GHL: fixed value true, behind the trigger's Terms and Conditions filter (or, for another trigger, an If/Else condition on a checkbox custom field)
422invalid_payloadAnother field refused (text too long, malformed date, negative value, etc.) — details names the fieldFix the field named in details, then send again
422pipeline_not_foundpipeline.pipeline_slug matches no pipeline of the accountCopy the pipeline's text identifier again from the API Keys page (it is not its UUID)
422stage_not_foundpipeline.stage_slug matches no stage of the targeted pipelineCopy the stage's text identifier again from the API Keys page, under the right pipeline
429rate_limit_exceededThe key's request quota is exceededSpace out sends at the source (the Retry-After header gives the delay)
429rate_limited_ipMore than 100 requests per minute from the same IP addressWait for the delay in the Retry-After header, then space out sends at the source

FAQ — common pitfalls

SymptomCause
Platform test green (200 OK) but lead doesn't show up in pipelineThe same contact was already sent in the last 5 minutes — response status: idempotent_replay, no duplicate (tests often reuse the same number). If the contact already existed, it keeps its stage: see the "not in the right pipeline" entry below.
415 "Unsupported Content-Type." or 400 "The request content is invalid." without details415: the tool sends a form instead of JSON (Payload Type set to Form in Zapier, application/x-www-form-urlencoded in Make). 400: the JSON is malformed, often an extra comma or a missing quote around a variable.
200 OK response but no SMS sent to leadsms_consent: true but AI agent not configured, or SMS AI agent disabled, or no Twilio number provisioned for the client.
200 OK response but the lead is not in the right pipeline or stageRead ignored_fields in the response: it names every received field that was not applied as received. unknown_field: the field carries a name the API does not know (pipeline.id instead of pipeline.pipeline_slug, for instance). existing_contact_kept: the contact already existed and keeps its pipeline and stage. duplicate_field: the same field arrived twice (root and Custom Data, for instance) and the other value was kept. unreadable_value: the value cannot be read ("[object Object]", or an object where a simple value is expected), a sign that the mapped field points to an object instead of a specific field. Capturia removes that text: what remains readable is kept, otherwise the field stays empty; a tag or a qualification answer that carries this text is discarded entirely.
Lead created without UTM trackingField sent under a name the API does not know (utm_source). Send the nested utm object or the flat key utm.source; ignored_fields names the field that was not applied.
403 terms_acceptance_required after an update that used to workA new version of the API terms of use must be accepted: someone who manages API keys accepts it in Capturia, in the key's Permissions tab, and the key works again without a new secret.
422 missing_consent even though sms_consent is in Custom DataGHL wraps Custom Data in a customData object, which Capturia unwraps automatically (no configuration needed). If the error still occurs, check that the value sent is a fixed true, not a {{contact...}} checkbox interpolation.
422 missing_consent with sms_consent → {{contact.my_checkbox}}GHL interpolates the label of the checked option (e.g. "SMS Consent"), never true. Filter the Form submitted trigger on Terms and Conditions (step 2), or, for another trigger, put an If/Else condition on a checkbox custom field (step 2 tip), and send the fixed value true.
The contact has a custom field named "SMS Consent" — does it conflict with the sms_consent in Custom Data?No. The GHL webhook sends every custom field of the contact under its display name on its own, in addition to your Custom Data pairs. Capturia gives your Custom Data sms_consent precedence over those automatic fields — exactly the setup prescribed in step 4, no field renaming required. A standard contact field (email, first name, phone) that you remap in Custom Data keeps the contact's value; if the two differ, the response names your copy in ignored_fields (duplicate_field).
The response lists contact_id, timezone, location or my custom fields in ignored_fieldsNormal. The Webhook action sends all of the contact's data on its own, including several fields Capturia doesn't use: the response names them with the reason unknown_field, and they stay ignored for every account. The phone, email, name and your Custom Data pairs are applied. To pass a form answer along, add its qualification_answers. pair (step 4).
My form's answers don't show up on the lead's recordThe custom fields GoHighLevel sends on its own are ignored: only the answers you name get through. In Custom Data, add one pair per question, qualification_answers.<the question> → the contact field that holds the answer (tip in step 4). Capturia's response then says how many answers were recorded. A pair that is too long (an answer over 1,000 characters) or beyond 20 answers is named in ignored_fields with the reason limit_exceeded, and the lead is still created.
My test created the record, but the agent didn't text itThe email sent is an example email (@example.com, @example.net, @example.org): Capturia creates the record as a test record, and the agent never texts an example contact, whose number is often made up. The response message says so. Run the test again with your own email and your own cell number.
The response names a Custom Data pair (customData.Last_name) with the reason unreadable_valueThe value of this pair points to an object of the contact instead of one of its fields: GoHighLevel then sends it as the text "[object Object]". Capturia never saves it: it removes that text and keeps what remains readable; otherwise the field stays empty, or keeps the value the Webhook action already sends on its own at the root. In the pair, pick the exact field from the contact's values list ({{contact.last_name}}), or remove the pair: the contact's name, email and phone are already sent automatically.
The purchase returns 404 offer_not_foundThe offer_id pair matches no offer of the key's account: the identifier comes from another Capturia account than the key in the Authorization header, or the offer no longer exists. In the key's account, copy the identifier again with the Copy button (Settings, API Keys, "Your offer identifiers" section), as a fixed value.
The purchase returns 409 purchase_conflictThis order number was already used for another product, amount or currency. Add a word specific to the offer after the number (step 4 of "Send a purchase"): each product of the order becomes a separate purchase.
The purchase returns 403 insufficient_scope or 403 terms_acceptance_requiredThe purchase sends text-message consent (sms_consent), and the key attests it: it carries the leads:capture scope (Read + write preset) and the API terms attestation, to check in the key's Permissions tab. Nothing was recorded: send the purchase again once the key is up to date.
The buyer got an email, not a textThe purchase arrived without consent (separate box unchecked, or the Webhook action of the None branch), or the order's phone is not the one on their contact: the program then writes by email. For the agent to text, your account has a text agent with an active number (the one of the System that sells the offer, otherwise another of your text agents).