---
title: "Create a lead"
method: POST
path: "/leads"
tags: ["Leads"]
---

# Create a lead

`POST /leads`

## Request

- Base URL: `https://joinways.app/api/v1`
- URL: `https://joinways.app/api/v1/leads`
- Auth: one of:
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://joinways.app/oauth/authorize`, token URL `https://joinways.app/api/oauth/token`, scopes: `mcp.write`)

Creates a request (e.g. from a form or Zapier). With `platform_link`, the request gets the identity every Joinways ingestion path writes: when a lead already carries the same request (same link, a known alias of it, or the same inquiry at the same venue), that lead is returned with `existing: true` and `200` instead of a duplicate. The same inquiry at another venue is a sibling request: it is created (`201`). `source` defaults to `platform` when given, else `api`. **Role permission:** `leads.manage`.

## Headers

- `Idempotency-Key` string

## Request body

- LeadCreate
  - `client_name` string, required
  - `client_email` string, email
  - `client_phone` string
  - `company` string
  - `event_type` string
  - `date_event` string, date
  - `date_event_end` string, date
  - `participants_fixed` integer
  - `budget_estimated` number
  - `location_id` string, uuid: A venue of the workspace.
  - `requested_space_ids` string[]: Spaces of `location_id` the request asks for.
  - `source` string: Origin label (e.g. `zapier`, `typeform`). Defaults to `platform` when given, else `api`.
  - `notes` string
  - `platform_link` string, uri: Link of the request on the booking platform; identifies the request (no duplicate).
  - `platform` string: Booking platform of the request (e.g. `kactus`); builds the inquiry key and marks the lead as a platform request.

## Response `200`

The request was already in Joinways; the existing lead is returned.

- LeadCreateResult: An inbound request (email, platform, form…) as listed by `GET /leads` and returned by `POST /leads`. A lead locked by the Free plan (`is_locked`) has `client_email`, `client_phone` and `ai_score` set to `null`.
  - `id` string, uuid
  - `status` 'pending' | 'validated' | 'rejected' | 'needs_info': `pending` = to process, `validated` = accepted (it has an event), `rejected` = declined, `needs_info` = waiting for information from the client.
  - `client_name` string, nullable
  - `client_email` string, nullable
  - `client_phone` string, nullable
  - `company` string, nullable
  - `event_type` string, nullable
  - `venue_name` string, nullable: Venue named in the request.
  - `venue_city` string, nullable
  - `location_id` string, uuid, nullable: The workspace venue the request is for.
  - `date_event` string, date, nullable
  - `date_event_end` string, date, nullable
  - `start_time` string, nullable
  - `end_time` string, nullable
  - `participants_min` integer, nullable
  - `participants_max` integer, nullable
  - `participants_fixed` integer, nullable
  - `budget_estimated` number, nullable
  - `budget_flexible` boolean, nullable
  - `source` string, nullable: Origin label (a platform name, `api`, `zapier`…).
  - `source_type` 'email' | 'instagram' | 'whatsapp' | 'form' | 'linkedin' | 'facebook' | 'website' | 'referral' | 'manual' | 'aircall'
  - `platform_link` string, nullable: Link of the request on the booking platform.
  - `inquiry_key` string, nullable: Identity of the request (`<platform>:<inquiry id>` or `<platform>:link:<canonical link>`). Same key = same request (siblings across venues).
  - `ai_score` number, nullable
  - `is_read` boolean
  - `is_platform` boolean
  - `is_locked` boolean: Locked by the Free plan monthly allowance (content sealed).
  - `archived_at` string, date-time, nullable: Deleted (soft) or merged into another lead.
  - `event_id` string, uuid, nullable: Event the request is on (converted or linked).
  - `requested_space_ids` string[]: Spaces (rooms) of `location_id` the request asks for.
  - `created_at` string, date-time, nullable
  - `updated_at` string, date-time, nullable
  - `validated_at` string, date-time, nullable
  - `rejected_at` string, date-time, nullable
  - `rejection_reason` 'date_unavailable' | 'capacity' | 'budget' | 'not_a_fit' | 'other': Why the venue declined the request (optional). Only set on a `rejected` lead; cleared as soon as the status changes.
  - `info_requested_at` string, date-time, nullable
  - `client_replied_at` string, date-time, nullable
  - `existing` boolean, required: true = no lead created; this is the lead already carrying the request.
  - `matched_via` 'identity' | 'alias' | 'sibling' | 'source_reference': Only when `existing`; how the request was recognised.

## Other responses

- `201`: Lead created.
- `400`: Validation failed (`invalid_request`). For a body that fails the schema, `details` holds `formErrors` and `fieldErrors`.
- `401`: Missing, invalid, expired or revoked bearer token (`unauthorized`).
- `403`: `forbidden`: the token lacks the scope, its owner's role lacks the permission named by the operation, or the workspace has neither the Pro plan nor a trial (`details.reason` `plan_not_eligible`).
- `409`: The state of the record refuses the operation (`conflict`). `details.reason` is a stable code.
- `429`: Too many requests (`rate_limited`). `details.reason`: `per-ip`, `per-account-minute`, `per-account-day`, or `email_rate_limited` (email budget). Always carries `Retry-After`: wait that many seconds.

---

[API](https://skmtc.dev/joinways/apis/joinways-public-api.md) · [All operations](https://skmtc.dev/joinways/apis/joinways-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/joinways/apis/joinways-public-api/revisions/39e84309953e?raw)
