> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tracklysms.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Typeform

# Typeform Integration Guide

Typeform has native webhook support — it can POST form responses directly to Trackly.

## Method 1: Native Webhook (Recommended)

### Step 1: Create your form

1. Create a new Typeform
2. Add questions:
   * **Phone Number** (type: Phone Number, required)
   * **Short Text** for First Name
   * **Short Text** for Last Name
3. Add a **Statement** or **Legal** block with your TCPA consent language: "By submitting, you agree to receive SMS marketing messages. Msg & data rates may apply. Reply STOP to unsubscribe."

### Step 2: Configure the webhook

1. Go to **Connect → Webhooks**
2. Click **Add a webhook**
3. Set the **Endpoint URL** to:
   ```
   https://api.tracklysms.com/api/v2/optins/webhook
   ```
4. Click **Save**

### Step 3: Payload mapping

Typeform webhooks send a structured JSON payload with nested answer objects. You'll need a lightweight middleware to transform Typeform's format into Trackly's flat format. Options:

**Option A: Zapier (simplest)**

1. Use Zapier as a middleware: Typeform trigger → Webhooks by Zapier POST action
2. Map Typeform fields to Trackly's flat format:
   * Phone Number answer → `phone_number`
   * First Name answer → `first_name`
   * `list_id`: your Trackly sending list ID
   * `consent_text`: your TCPA consent language
3. Add header: `X-Api-Key: trk_your_api_key_here`

**Option B: Make.com**

1. Typeform module → HTTP module (POST to Trackly webhook)
2. Same field mapping as above

### Step 4: Test

Submit a test response and verify the contact appears in your Trackly sending list.

## Method 2: Iframe Embed

Embed Trackly's opt-in page instead of using a Typeform:

1. On your website, add an HTML embed element
2. Paste:
   ```html theme={null}
   <iframe src="https://api.tracklysms.com/optin/page/YOUR_PUBLIC_TOKEN" width="100%" height="520" frameborder="0" style="border:none;max-width:480px;margin:0 auto;display:block;"></iframe>
   ```

## Universal Methods

* **Subscribe link**: Share `https://api.tracklysms.com/s/<your-slug>` in your Typeform's thank-you screen
* **Keyword opt-in**: Add "Text JOIN to (555) 555-5555" to your form's welcome screen
