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://
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.→ where the lead comes from (e.g.source site_), optionalweb pipeline.→ the target pipeline's identifier, copied from Capturia (optional)pipeline_ slug pipeline.→ the target stage's identifier, copied from the same place (optional; withoutstage_ slug pipeline., the stage is looked up in your default pipeline)pipeline_ slug qualification_followed by a question from your form → the lead's answer to that question, one pair per question (optional, see the tip below)answers.
Headers: add Authorization with the value Bearer cap_, replacing cap_ 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., @example., @example.) 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_ if this contact is already in your pipeline. If you added qualification_ 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 field | Required | Source field | Notes |
|---|---|---|---|
| phone | Yes | sent 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_consent | Yes | true (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_name | No | sent automatically (contact standard data) | Lead's first name |
| last_name | No | sent automatically (contact standard data) | Last name |
| full_name | No | also sent automatically, and ignored: the first and last name take precedence | Full name, when your source doesn't split first and last name: Capturia splits it at the first space. Ignored if first_ or last_ is sent. |
| No | sent automatically (contact standard data) | RFC 5322 valid email | |
| source_label | No | "ghl_workflow" | Free-form tag (e.g. 'webflow_form', 'fb_lead_ads') |
| utm. | No | your custom field, or a fixed value | Nested utm object, or the flat key utm. |
| utm. | No | your custom field, or a fixed value | Nested utm object, or the flat key utm. |
| utm. | No | your custom field, or a fixed value | Nested utm object, or the flat key utm. |
| tags | No | "tag1, tag2" (added to the contact tags GHL already sends) | Array of strings, or a comma-separated string |
| pipeline. | No | identifier 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. | No | identifier 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_, it is looked up in your default pipeline. Nested pipeline object, or flat key. |
| qualification_answers. | No | the contact field that holds the answer ({{contact. | A form answer, one pair per question: qualification_ followed by the question (e.g. qualification_) → 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_ list of question/answer pairs. |
SMS Consent — CASL / Quebec Law 25
The sms_ 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_. With GoHighLevel, the form's checkbox filters the trigger and sms_ 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_ 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_). 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://
Headers: add Authorization with the value Bearer cap_, replacing cap_ with your full API key.
Custom Data: add these key/value pairs
order_→ 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, thenid -)pack offer_→ the offer identifier copied in step 1 (fixed value)id amount→ the offer's price, typed in (fixed value, in dollars:7.and00 7are read)currency→CAD(optional: CAD by default)source_→label ghl_(optional)funnel - 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_ when the program starts and the agent texts first, "first_ when it writes by email, or "program":"none" with its reason (offer_: send the offer_ pair, not offer_). sms_ says whether the box was recorded. With a bump or an upsell in the order, each offer has its own purchase.
Error catalog
| Code | Error | Cause | Fix |
|---|---|---|---|
| 400 | invalid_payload | Empty body or malformed JSON (extra comma, missing quote) | Validate the JSON you send, then send again |
| 401 | missing_api_key | Authorization header absent or malformed | Add the header Authorization: Bearer cap_ |
| 401 | invalid_api_key | Key revoked or mistyped | Check the key in Capturia, generate a new one if needed |
| 401 | expired_api_key | Key past its expiration date | Create a new key in Capturia (API Keys page), then replace the old one in the tool |
| 403 | terms_acceptance_required | API 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 |
| 403 | insufficient_scope | Key lacks the leads:capture scope | Create a new key with the "Lead capture" preset |
| 415 | invalid_content_type | Body sent as a form (Form, x-www-form-urlencoded) instead of JSON | Send as JSON (Zapier: Payload Type = Json; Make: Body content type = application/json; GoHighLevel's Webhook action already sends JSON) |
| 422 | invalid_phone | Phone missing or format not recognized | Use E.164 (+15145551234) or NANP 10 digits (5145551234) |
| 422 | invalid_email | Malformed email | Send a valid address, or leave the field out |
| 422 | missing_consent | sms_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) |
| 422 | invalid_payload | Another field refused (text too long, malformed date, negative value, etc.) — details names the field | Fix the field named in details, then send again |
| 422 | pipeline_not_found | pipeline. matches no pipeline of the account | Copy the pipeline's text identifier again from the API Keys page (it is not its UUID) |
| 422 | stage_not_found | pipeline. matches no stage of the targeted pipeline | Copy the stage's text identifier again from the API Keys page, under the right pipeline |
| 429 | rate_limit_exceeded | The key's request quota is exceeded | Space out sends at the source (the Retry- header gives the delay) |
| 429 | rate_limited_ip | More than 100 requests per minute from the same IP address | Wait for the delay in the Retry- header, then space out sends at the source |
FAQ — common pitfalls
| Symptom | Cause |
|---|---|
| Platform test green (200 OK) but lead doesn't show up in pipeline | The same contact was already sent in the last 5 minutes — response status: idempotent_, 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 details | 415: 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 lead | sms_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 stage | Read ignored_ in the response: it names every received field that was not applied as received. unknown_: the field carries a name the API does not know (pipeline. instead of pipeline., for instance). existing_: the contact already existed and keeps its pipeline and stage. duplicate_: the same field arrived twice (root and Custom Data, for instance) and the other value was kept. unreadable_: 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 tracking | Field sent under a name the API does not know (utm_). Send the nested utm object or the flat key utm.; ignored_ names the field that was not applied. |
| 403 terms_acceptance_required after an update that used to work | A 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 Data | GHL 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_ → {{contact. | 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_ 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_ 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_ (duplicate_). |
The response lists contact_, timezone, location or my custom fields in ignored_ | Normal. 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_, 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_ pair (step 4). |
| My form's answers don't show up on the lead's record | The 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_ → 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_ with the reason limit_, and the lead is still created. |
| My test created the record, but the agent didn't text it | The email sent is an example email (@example., @example., @example.): 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.) with the reason unreadable_ | The 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.), or remove the pair: the contact's name, email and phone are already sent automatically. |
The purchase returns 404 offer_ | The offer_ 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_ | This 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_ or 403 terms_ | The purchase sends text-message consent (sms_), 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 text | The 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). |