---
title: "Capture Lead"
method: POST
path: "/api/v1/leads"
tags: ["Leads"]
---

# Capture Lead

`POST /api/v1/leads`

## Request

- Base URL: `https://www.endlesstravelplans.com`
- URL: `https://www.endlesstravelplans.com/api/v1/leads`
- Auth: none required

## Request body

- object
  - `email` string, required: The lead's email.
  - `tool` string, nullable: The originating tool.
  - `source` string, nullable: Where the capture happened.
  - `magnet` string, nullable: Must not be greater than 50 characters.
  - `utm_source` string, nullable: Must not be greater than 255 characters.
  - `utm_medium` string, nullable: Must not be greater than 255 characters.
  - `utm_campaign` string, nullable: Must not be greater than 255 characters.
  - `referrer` string, nullable: Must not be greater than 255 characters.
  - `record_type` string, nullable: Artifact to link.
  - `record_id` integer, nullable: Artifact id (must belong to the caller).
  - `consent` boolean: Must be accepted.
  - `timezone` string, nullable: Must not be greater than 64 characters.
  - `consent_rule` string, nullable: The client showed the opt-in box only in the EU/UK (decision #4).

## Response `200`

- union
  - object
    - `message` string
  - object: Recorded shape (tests/Fixtures/api-shapes/leads-store.json)
    - `message` string

## Other responses

- `422`: validation_failed: The request body failed validation; field messages are in `errors`.
- `429`: rate_limited: A throttle or a per-account allowance refused the request; `retry_after` or `remaining` may be present.
- `500`: server_error: Unhandled failure; quote `request_id` to support.

---

[API](https://skmtc.dev/endlesstravelplans/apis/endless-travel-plans-api.md) · [All operations](https://skmtc.dev/endlesstravelplans/apis/endless-travel-plans-api/llms.txt) · [OpenAPI document](https://skmtc.dev/endlesstravelplans/apis/endless-travel-plans-api/revisions/ae82ed3e4a8f?raw)
