> For the complete documentation index, see [llms.txt](https://developers.flipsnack.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.flipsnack.com/zapier/get-zapier-lead-form-sample.md).

# zapier.getZapierLeadFormSample

**Note:** Requests must be made to **<https://api.flipsnack.com/v1>**.

## Request parameters <a href="#request_params" id="request_params"></a>

| Name                      | Type   | Description                                                                                                                                                                                                                   |
| ------------------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| apiKey (required)         | string | The API key provided for your user. If it is not specified, the request will return the error code "30 - Missing mandatory parameter". If the key is incorrect the request returns the error code "41 - Invalid credentials". |
| action (required)         | string | The API method that should be called. In this case the value should be *zapier.getZapierLeadFormSample*. If it is not specified, the request will return the error code "30 - Missing mandatory parameter".                   |
| collectionHash (required) | string | The hash of the flipbook you wish to get sample data. If you do not specify a flipbook hash, then the request will return the error code "30 - Missing mandatory parameter".                                                  |

## Response parameters <a href="#response_params" id="response_params"></a>

| Name   | Type   | Description                                                                                                                                                                     |
| ------ | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| id     | number | Your sample data ID                                                                                                                                                             |
| fields | string | <p>Your predefined fields as \[key] - value pairs. </p><p></p><p>Example:</p><p> “Phone Number”: “+1 555-555-1234”,</p><p> “Email Address”: “<youremailaddress@domain.com>”</p> |

## Error codes <a href="#error_codes" id="error_codes"></a>

For complete list of error codes and messages go to [API status codes](/api-status-codes.md) section.

## Examples <a href="#example" id="example"></a>

### Request

{% tabs %}
{% tab title="cURL" %}

```bash
# GET
curl -X GET \
     -G \
     https://api.flipsnack.com/v1/ \
     -d action=zapier.getZapierLeadFormSample \
     -d apiKey=<YOUR-API-KEY> \
     -d collectionHash=<YOUR-COLLECTION-HASH>
```

{% endtab %}

{% tab title="HTML" %}

```html
<form method="post" action="https://api.flipsnack.com/v1/">
   <input type="hidden" name="action" value="getZapierLeadFormSample">
   <input type="hidden" name="apiKey" value="<YOUR-API-KEY>">
   <input type="hidden" name="collectionHash" value="<YOUR-COLLECTION-HASH>">
   <button type="submit">Submit</button>
</form>
```

{% endtab %}
{% endtabs %}

### Response

{% tabs %}
{% tab title="JSON" %}

```json
{
    "data": {
        "getZapierLeadFormSample": {
            "id": 1,
            "Email address": "Your \"Email address\"",
            "Full name": "Your \"Full name\"",
            "Phone number": "Your \"Phone number\"",
            "Country/region": "Your \"Country/region\"",
            "Website": "Your \"Website\"",
            "Paragraph": "Your \"Paragraph\"",
            "Custom input": "Your \"Custom input\"",
            "GDPR": "Your \"GDPR\""
        }
    }
}

```

{% endtab %}
{% endtabs %}
