Webflow Integration Guide
Webflow forms can POST directly to Trackly’s webhook — no Zapier needed.Method 1: Native Form with Custom Action (Recommended)
Step 1: Create your form in Webflow
- Open your Webflow project in the Designer
- Add a Form Block to your page
- Add these fields:
- Phone (type: Tel, name:
phone_number, required) - Consent checkbox (required) with label: “I agree to receive SMS marketing messages. Msg & data rates may apply. Reply STOP to unsubscribe.” This checkbox is an on-page UX/legal gate only — its field name is irrelevant to Trackly intake and the API never reads a
consentfield. What the API requires is theconsentText/consent_textvalue (the exact disclosure language shown), sent in the request body (see Step 4).
- Phone (type: Tel, name:
- Optionally add: First Name (
first_name), Last Name (last_name), Email (email)
Step 2: Send the submission through an authenticated relay
The webhook athttps://api.tracklysms.com/api/v2/optins/webhook is guarded by API-key auth: it requires the X-Api-Key: trk_your_api_key_here header (or Authorization: Bearer trk_...) and returns 401 Invalid credentials when that header is absent.
A native Webflow Form Block POST cannot attach custom headers, so pointing the form’s Action directly at the webhook URL will be rejected with a 401. Webflow’s native site-settings Webhooks (Project Settings → Integrations → Webhooks) also cannot add arbitrary request headers, and the form_submission event emits Webflow’s fixed payload envelope rather than a flat map of your field keys — so neither path can satisfy the auth header or the body contract.
Instead, route the submission through a layer that can set the header and shape the body:
- A Webflow Cloud / Logic flow, or
- A relay/automation step (Make.com, Zapier, etc.), or
- Custom JS on the page that issues a
fetch()POST with theX-Api-Keyheader.
X-Api-Key header and a JSON or form-encoded body containing phoneNumber, listId, and a non-empty consentText. If you prefer no API key at all, use Method 2 (iframe) or Method 3 (script), which need no credentials.
Step 4: Map your fields
Trackly accepts flexible field names. Use these in your Webflow form field names:phone_number,phone,tel→ maps to phoneNumberfirst_name→ maps to firstNamelast_name→ maps to lastNameemail→ maps to email
listId and consentText in the request your relay sends. Add hidden fields to your form:
- Hidden field
list_idwith value set to your Trackly sending list ID - Hidden field
consent_textwith your TCPA consent language
Method 2: Iframe Embed
- Add a Custom Code Embed element to your page
- Paste:
- Replace
YOUR_PUBLIC_TOKENwith your opt-in configuration’s public token (found in the Embed Code card)
Method 3: Script Tag
- Add a Custom Code Embed element or use Project Settings → Custom Code → Footer Code
- Paste your script tag from the Embed Code card:
Finding Your Credentials
- API Key: Settings → API Keys in Trackly SMS
- List ID: SMS → Sending Lists → click your list → the ID is in the URL
- Public Token: Opt-ins → click your config → Embed Code card