---
title: "Create a lead through Zapier."
method: POST
path: "/api/external/v1/zapier/upsert-lead"
tags: ["Zapier"]
---

# Create a lead through Zapier.

`POST /api/external/v1/zapier/upsert-lead`

Set `is_test` to true to have the endpoint answer with a sample page URL
without importing anything — this is what Zapier calls when the user tests
the step while building a Zap.

## Request body

- object
  - `workspace_id` integer, required — The workspace to add the lead to.
  - `campaign_id` integer, required — The campaign to add the lead to.
  - `is_test` boolean, nullable — Return a sample response instead of importing.
  - `linkedin_profile_url` string, nullable — One of linkedin_profile_url, company_domain or email is required.
  - `company_domain` string, nullable — One of linkedin_profile_url, company_domain or email is required.
  - `email` string, nullable — One of linkedin_profile_url, company_domain or email is required.
  - `callback_url` string, required — Called with the generated page once the import finishes.
  - `custom_data` object, nullable — Key/value pairs stored as variables on the lead.

## Response `200`

- union
  - object — real import
    - `message` string
    - `job_id` string
  - object — is_test=true
    - `message` string
    - `genpage_url` string

## Other responses

- `404`

## Changes

- **2026-08-18** `29a37db12acb` — 2 breaking, 2 warning
  - added `subschema #1, subschema #2` to the response body `oneOf` list for the response status `200`
  - the response's body type changed from `object` to no type for status `200`
  - removed the optional property `job_id` from the response with the `200` status
  - removed the optional property `message` from the response with the `200` status
- **2026-08-17** `dd3f47f72f7a` — 2 info
  - added the non-success response with the status `404`
  - added the success response with the status `200`

[Change history](https://skmtc.dev/genpage/apis/genpage-external-api-documentation/changes/api/external/v1/zapier/upsert-lead/post.md)

---

[API](https://skmtc.dev/genpage/apis/genpage-external-api-documentation.md) · [All operations](https://skmtc.dev/genpage/apis/genpage-external-api-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/genpage/genpage-external-api-documentation/revisions/29a37db12acb/schema)
