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

# Create lead

> Record a new lead for a company, capturing a potential customer's interest in a specific product.

Required permissions:
 - `lead:manage`
 - `member:email:read`
 - `access_pass:basic:read`
 - `member:basic:read`



## OpenAPI

````yaml /openapi/api-v1-stable.json post /leads
openapi: 3.1.0
info:
  description: >-
    The Whop REST API. Please see
    https://docs.whop.com/developer/api/getting-started for more details.
  termsOfService: https://whop.com/tos-developer-api/
  title: Whop API
  version: 1.0.0
  x-api-version-date: '2026-07-20'
servers:
  - description: Production Whop API
    url: https://api.whop.com/api/v1
  - description: Sandbox Whop API
    url: https://sandbox-api.whop.com/api/v1
security: []
tags:
  - description: Products
    name: Products
  - description: Payments
    name: Payments
  - description: Refunds
    name: Refunds
  - description: Disputes
    name: Disputes
  - description: Dispute alerts
    name: Dispute alerts
  - description: Resolution center cases
    name: Resolution center cases
  - description: Checkout configurations
    name: Checkout configurations
  - description: Setup intents
    name: Setup intents
  - description: Payment methods
    name: Payment methods
  - description: Invoices
    name: Invoices
  - description: Promo codes
    name: Promo codes
  - description: Card transactions
    name: Card transactions
  - description: Ledger accounts
    name: Ledger accounts
  - description: Withdrawals
    name: Withdrawals
  - description: Payout methods
    name: Payout methods
  - description: Verifications
    name: Verifications
  - description: Identity profiles
    name: Identity profiles
  - description: Payout accounts
    name: Payout accounts
  - description: Topups
    name: Topups
  - description: Companies
    name: Companies
  - description: Authorized users
    name: Authorized users
  - description: Fee markups
    name: Fee markups
  - description: Members
    name: Members
  - description: Memberships
    name: Memberships
  - description: Leads
    name: Leads
  - description: Entries
    name: Entries
  - description: Shipments
    name: Shipments
  - description: Reviews
    name: Reviews
  - description: Company token transactions
    name: Company token transactions
  - description: Affiliates
    name: Affiliates
  - description: Experiences
    name: Experiences
  - description: Forums
    name: Forums
  - description: Forum posts
    name: Forum posts
  - description: Chat channels
    name: Chat channels
  - description: Support channels
    name: Support channels
  - description: Messages
    name: Messages
  - description: Reactions
    name: Reactions
  - description: Dm members
    name: Dm members
  - description: Dm channels
    name: Dm channels
  - description: Notifications
    name: Notifications
  - description: Courses
    name: Courses
  - description: Course chapters
    name: Course chapters
  - description: Course lessons
    name: Course lessons
  - description: Course students
    name: Course students
  - description: Course lesson interactions
    name: Course lesson interactions
  - description: Apps
    name: Apps
  - description: Webhooks
    name: Webhooks
  - description: App builds
    name: App builds
  - description: Access tokens
    name: Access tokens
  - description: Account links
    name: Account links
  - description: Files
    name: Files
  - description: Ai chats
    name: Ai chats
  - description: Bounties
    name: Bounties
  - description: Stats
    name: Stats
  - description: Conversions
    name: Conversions
  - description: Ad reports
    name: Ad reports
paths:
  /leads:
    post:
      tags:
        - Leads
      summary: Create lead
      description: >-
        Record a new lead for a company, capturing a potential customer's
        interest in a specific product.


        Required permissions:
         - `lead:manage`
         - `member:email:read`
         - `access_pass:basic:read`
         - `member:basic:read`
      operationId: createLead
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              description: Parameters for CreateLeadV2
              properties:
                company_id:
                  description: >-
                    The unique identifier of the company to create the lead for,
                    starting with 'biz_'.
                  example: biz_xxxxxxxxxxxxxx
                  type: string
                metadata:
                  additionalProperties: true
                  description: >-
                    A JSON object of custom metadata to attach to the lead for
                    tracking purposes.
                  type:
                    - object
                    - 'null'
                product_id:
                  description: >-
                    The unique identifier of the product the lead is interested
                    in, starting with 'prod_'.
                  example: prod_xxxxxxxxxxxxx
                  type:
                    - string
                    - 'null'
                referrer:
                  description: >-
                    The referral URL that brought the lead to the company, such
                    as 'https://example.com/landing'.
                  type:
                    - string
                    - 'null'
                user_id:
                  description: >-
                    The unique identifier of the user to record as the lead. If
                    authenticated as a user, that user is used automatically.
                  example: user_xxxxxxxxxxxxx
                  type:
                    - string
                    - 'null'
              required:
                - company_id
              type: object
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Lead'
          description: A successful response
        '400':
          content:
            application/json:
              example:
                error:
                  code: parameter_missing
                  message: 'Missing required parameter: amount.'
                  param: amount
                  type: invalid_request_error
              schema:
                properties:
                  error:
                    properties:
                      code:
                        description: >-
                          A short string indicating the specific error code,
                          e.g. 'parameter_missing', 'parameter_invalid',
                          'invalid_json'
                        type:
                          - string
                          - 'null'
                      message:
                        type: string
                      param:
                        description: The parameter that caused the error, if applicable
                        type:
                          - string
                          - 'null'
                      type:
                        type: string
                    required:
                      - type
                      - message
                    type: object
                required:
                  - error
                type: object
          description: Bad request
        '401':
          content:
            application/json:
              example:
                error:
                  message: Invalid or missing API key
                  type: unauthorized
              schema:
                properties:
                  error:
                    properties:
                      code:
                        description: >-
                          A short string indicating the specific error code,
                          e.g. 'parameter_missing', 'parameter_invalid',
                          'invalid_json'
                        type:
                          - string
                          - 'null'
                      message:
                        type: string
                      param:
                        description: The parameter that caused the error, if applicable
                        type:
                          - string
                          - 'null'
                      type:
                        type: string
                    required:
                      - type
                      - message
                    type: object
                required:
                  - error
                type: object
          description: Unauthorized
        '403':
          content:
            application/json:
              example:
                error:
                  message: You do not have permission to access this resource
                  type: forbidden
              schema:
                properties:
                  error:
                    properties:
                      code:
                        description: >-
                          A short string indicating the specific error code,
                          e.g. 'parameter_missing', 'parameter_invalid',
                          'invalid_json'
                        type:
                          - string
                          - 'null'
                      message:
                        type: string
                      param:
                        description: The parameter that caused the error, if applicable
                        type:
                          - string
                          - 'null'
                      type:
                        type: string
                    required:
                      - type
                      - message
                    type: object
                required:
                  - error
                type: object
          description: Forbidden
        '404':
          content:
            application/json:
              example:
                error:
                  message: Resource not found
                  type: not_found
              schema:
                properties:
                  error:
                    properties:
                      code:
                        description: >-
                          A short string indicating the specific error code,
                          e.g. 'parameter_missing', 'parameter_invalid',
                          'invalid_json'
                        type:
                          - string
                          - 'null'
                      message:
                        type: string
                      param:
                        description: The parameter that caused the error, if applicable
                        type:
                          - string
                          - 'null'
                      type:
                        type: string
                    required:
                      - type
                      - message
                    type: object
                required:
                  - error
                type: object
          description: Not found
        '422':
          content:
            application/json:
              example:
                error: null
              schema:
                properties:
                  error:
                    properties:
                      code:
                        description: >-
                          A short string indicating the specific error code,
                          e.g. 'parameter_missing', 'parameter_invalid',
                          'invalid_json'
                        type:
                          - string
                          - 'null'
                      message:
                        type: string
                      param:
                        description: The parameter that caused the error, if applicable
                        type:
                          - string
                          - 'null'
                      type:
                        type: string
                    required:
                      - type
                      - message
                    type: object
                required:
                  - error
                type: object
          description: Verification required
        '429':
          content:
            application/json:
              example:
                error: null
              schema:
                properties:
                  error:
                    properties:
                      code:
                        description: >-
                          A short string indicating the specific error code,
                          e.g. 'parameter_missing', 'parameter_invalid',
                          'invalid_json'
                        type:
                          - string
                          - 'null'
                      message:
                        type: string
                      param:
                        description: The parameter that caused the error, if applicable
                        type:
                          - string
                          - 'null'
                      type:
                        type: string
                    required:
                      - type
                      - message
                    type: object
                required:
                  - error
                type: object
          description: Too many requests
        '500':
          content:
            application/json:
              example:
                error:
                  message: An unexpected error occurred
                  type: internal_server_error
              schema:
                properties:
                  error:
                    properties:
                      code:
                        description: >-
                          A short string indicating the specific error code,
                          e.g. 'parameter_missing', 'parameter_invalid',
                          'invalid_json'
                        type:
                          - string
                          - 'null'
                      message:
                        type: string
                      param:
                        description: The parameter that caused the error, if applicable
                        type:
                          - string
                          - 'null'
                      type:
                        type: string
                    required:
                      - type
                      - message
                    type: object
                required:
                  - error
                type: object
          description: Internal server error
      security:
        - bearerAuth:
            - lead:manage
            - member:email:read
            - access_pass:basic:read
            - member:basic:read
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Whop from '@whop/sdk';


            const client = new Whop({
              apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted
            });


            const lead = await client.leads.create({ company_id:
            'biz_xxxxxxxxxxxxxx' });


            console.log(lead.id);
components:
  schemas:
    Lead:
      description: >-
        A prospective customer who has expressed interest in a company or
        product but has not yet purchased.
      properties:
        created_at:
          description: The datetime the lead was created.
          example: '2023-12-01T05:00:00.401Z'
          format: date-time
          type: string
        id:
          description: The unique identifier for the lead.
          example: lead_xxxxxxxxxxxxx
          type: string
        member:
          description: >-
            The company member record if this lead has converted into a paying
            customer. Null if the lead has not converted.
          properties:
            id:
              description: The unique identifier for the company member.
              type: string
          required:
            - id
          type:
            - object
            - 'null'
        metadata:
          additionalProperties: true
          description: >-
            Custom key-value pairs attached to this lead. Null if no metadata
            was provided.
          type:
            - object
            - 'null'
        product:
          description: >-
            The product the lead expressed interest in. Null if the lead is not
            associated with a specific product.
          properties:
            id:
              description: The unique identifier for the product.
              example: prod_xxxxxxxxxxxxx
              type: string
            title:
              description: >-
                The display name of the product shown to customers on the
                product page and in search results.
              example: Pickaxe Analytics
              type: string
          required:
            - id
            - title
          type:
            - object
            - 'null'
        referrer:
          description: >-
            The URL of the page that referred this lead to the company. Null if
            no referrer was captured.
          example: https://twitter.com/whabormarket
          type:
            - string
            - 'null'
        updated_at:
          description: The datetime the lead was last updated.
          example: '2023-12-01T05:00:00.401Z'
          format: date-time
          type: string
        user:
          description: The user account associated with this lead.
          properties:
            email:
              description: >-
                The user's email address. Requires the member:email:read
                permission to access. Null if not authorized.
              example: john.doe@example.com
              type:
                - string
                - 'null'
            id:
              description: The unique identifier for the user.
              example: user_xxxxxxxxxxxxx
              type: string
            name:
              description: The user's display name shown on their public profile.
              example: John Doe
              type:
                - string
                - 'null'
            username:
              description: The user's unique username shown on their public profile.
              example: johndoe42
              type: string
          required:
            - id
            - email
            - name
            - username
          type: object
      required:
        - id
        - created_at
        - updated_at
        - referrer
        - metadata
        - user
        - product
        - member
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: auth-scheme
      description: >-
        A company API key, company scoped JWT, app API key, or user OAuth token.
        You must prepend your key/token with the word 'Bearer', which will look
        like `Bearer ***************************`
      scheme: bearer
      type: http

````