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

# Create a lead (website forms, n8n, Make)

> Requires the `leads:write` scope (יצירת לידים).



## OpenAPI

````yaml /api-reference/openapi.json post /v1/leads
openapi: 3.1.0
info:
  title: Lancer API
  version: 1.0.0
  description: >-
    The Lancer public REST API. Authenticate with an organization API key
    (Settings → API & Webhooks) as `Authorization: Bearer lk_…` or `X-Api-Key`.
    Every key has scopes; each operation names the one it needs. Money is
    integer agorot (1 ₪ = 100). Lists are paginated with `page` and `pageSize`
    (max 100).
  contact:
    name: Lancer
    url: https://docs.lancer-erp.com
servers:
  - url: https://api.lancer-erp.com/api
    description: Production
security:
  - bearerAuth: []
  - apiKeyHeader: []
tags:
  - name: Leads
    description: >-
      Push leads into the sales pipeline from website forms, ad platforms, n8n
      or Make.
  - name: Clients
    description: Read and create clients (the businesses and people you bill).
  - name: Projects
    description: Read projects, their status and billing.
  - name: Payment requests
    description: Read and create payment requests, optionally with a hosted pay link.
  - name: Payments
    description: Read payments received.
paths:
  /v1/leads:
    post:
      tags:
        - Leads
      summary: Create a lead (website forms, n8n, Make)
      description: Requires the `leads:write` scope (יצירת לידים).
      operationId: postVLeads
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 120
                company:
                  type: string
                  maxLength: 200
                phone:
                  type: string
                  maxLength: 40
                email:
                  type: string
                source:
                  default: api
                  type: string
                  enum:
                    - website
                    - api
                    - whatsapp
                    - sms
                    - referral
                    - manual
                    - meta_ads
                    - google_ads
                    - booking
                expectedValueAgorot:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                followUpAt:
                  anyOf:
                    - type: string
                      pattern: ^\d{4}-\d{2}-\d{2}$
                    - type: string
                      const: ''
                notes:
                  type: string
                  maxLength: 5000
                stage:
                  type: string
                  maxLength: 60
                customFields:
                  type: object
                  propertyNames:
                    type: string
                    maxLength: 40
                  additionalProperties:
                    type:
                      - string
                      - number
                      - boolean
                      - 'null'
              required:
                - name
            example:
              name: Dana Levi
              company: Echo Studio
              email: dana@example.com
              phone: 050-1234567
              source: website
              expectedValueAgorot: 1500000
              notes: Asked about a website redesign
      responses:
        '201':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    minLength: 1
                  name:
                    type: string
                  company:
                    type:
                      - string
                      - 'null'
                  taxId:
                    default: null
                    type:
                      - string
                      - 'null'
                  phone:
                    type:
                      - string
                      - 'null'
                  email:
                    type:
                      - string
                      - 'null'
                  source:
                    type: string
                    enum:
                      - website
                      - api
                      - whatsapp
                      - sms
                      - referral
                      - manual
                      - meta_ads
                      - google_ads
                      - booking
                  stage:
                    type: object
                    properties:
                      id:
                        type: string
                        minLength: 1
                      name:
                        type: string
                      color:
                        type:
                          - string
                          - 'null'
                      position:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                    required:
                      - id
                      - name
                      - color
                      - position
                    additionalProperties: false
                  expectedValueAgorot:
                    anyOf:
                      - type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      - type: 'null'
                  followUpAt:
                    anyOf:
                      - type: string
                        pattern: ^\d{4}-\d{2}-\d{2}$
                      - type: 'null'
                  owner:
                    anyOf:
                      - type: object
                        properties:
                          id:
                            type: string
                            minLength: 1
                          name:
                            type: string
                        required:
                          - id
                          - name
                        additionalProperties: false
                      - type: 'null'
                  notes:
                    type:
                      - string
                      - 'null'
                  status:
                    type: string
                    enum:
                      - open
                      - won
                      - lost
                  lostReason:
                    type:
                      - string
                      - 'null'
                  wonAt:
                    type:
                      - string
                      - 'null'
                  lostAt:
                    type:
                      - string
                      - 'null'
                  convertedClientId:
                    anyOf:
                      - type: string
                        minLength: 1
                      - type: 'null'
                  sourceDetail:
                    default: null
                    type:
                      - string
                      - 'null'
                  score:
                    default: 0
                    type: integer
                    minimum: 0
                    maximum: 100
                  scoreBand:
                    default: cold
                    type: string
                    enum:
                      - hot
                      - warm
                      - cold
                  wonReasonCode:
                    default: null
                    anyOf:
                      - type: string
                        enum:
                          - price
                          - quality
                          - portfolio
                          - referral
                          - speed
                          - relationship
                          - other
                      - type: 'null'
                  wonReason:
                    default: null
                    type:
                      - string
                      - 'null'
                  lostReasonCode:
                    default: null
                    anyOf:
                      - type: string
                        enum:
                          - price
                          - budget
                          - competitor
                          - timing
                          - no_response
                          - not_fit
                          - other
                      - type: 'null'
                  customFields:
                    default: {}
                    type: object
                    propertyNames:
                      type: string
                    additionalProperties:
                      type:
                        - string
                        - number
                        - boolean
                        - 'null'
                  createdAt:
                    type: string
                  updatedAt:
                    type: string
                required:
                  - id
                  - name
                  - company
                  - taxId
                  - phone
                  - email
                  - source
                  - stage
                  - expectedValueAgorot
                  - followUpAt
                  - owner
                  - notes
                  - status
                  - lostReason
                  - wonAt
                  - lostAt
                  - convertedClientId
                  - sourceDetail
                  - score
                  - scoreBand
                  - wonReasonCode
                  - wonReason
                  - lostReasonCode
                  - customFields
                  - createdAt
                  - updatedAt
                additionalProperties: false
        '400':
          description: Invalid input
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
                required:
                  - error
                additionalProperties: false
        '401':
          description: Missing, unknown or revoked API key
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
                required:
                  - error
                additionalProperties: false
        '403':
          description: The key lacks the scope (code INSUFFICIENT_SCOPE)
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
                required:
                  - error
                additionalProperties: false
        '404':
          description: Not found in this organization
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
                required:
                  - error
                additionalProperties: false
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
                required:
                  - error
                additionalProperties: false
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: lk_…
    apiKeyHeader:
      type: apiKey
      in: header
      name: X-Api-Key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.