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

# Create lead

> Creates a new lead.



## OpenAPI

````yaml POST /leads
openapi: 3.1.0
info:
  title: Flozy External API
  version: 1.0.0
  description: >-
    Integrate Flozy's CRM data — leads, tasks, opportunities, contacts, and
    pipelines — into your own tools and workflows.


    ## Authentication


    Send your API key on every request using **one** of:


    | Method | Example |

    |--------|---------|

    | `X-API-Key` header | `X-API-Key: flz_live_abc123…` |

    | `Authorization` header | `Authorization: Bearer flz_live_abc123…` |


    Keys start with `flz_live_` followed by 64 hex characters. Create and manage
    keys in **Settings → API Keys** (agency owners only).


    ## Rate limits


    - **100 req/min** per API key (rolling window)

    - **200 req/min** per IP (applied before key validation)


    Responses include `X-RateLimit-Limit`, `X-RateLimit-Remaining`, and
    `X-RateLimit-Reset` headers.
servers: []
security:
  - ApiKeyHeader: []
tags:
  - name: Leads
    description: >-
      Prospects and clients. The central resource — tasks, opportunities, and
      contacts all attach to leads.
  - name: Lead Statuses
    description: Status definitions for leads. Use `PUT /leads/{id}/status` to assign them.
  - name: Tasks
    description: >-
      Can be standalone or linked to a lead. Subtasks supported via
      `parent_task_id`.
  - name: Opportunities
    description: Live inside pipeline stages, always linked to a lead.
  - name: Contacts
    description: People associated with a lead. Nested under `/leads/{leadId}/contacts`.
  - name: Pipelines
    description: Read-only. Use to discover valid stage IDs.
  - name: Custom Fields
    description: Read-only. Custom field definitions for your agency.
paths:
  /leads:
    post:
      tags:
        - Leads
      summary: Create lead
      description: Creates a new lead.
      operationId: createLead
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - title
              properties:
                title:
                  type: string
                  maxLength: 200
                  example: Acme Corp
                status_name:
                  type: string
                  maxLength: 100
                  description: >-
                    Status slug. Auto-created if it does not exist. Use `GET
                    /lead-statuses` to list existing slugs.
                  example: in_progress
                meta_data:
                  type: object
                  properties:
                    about:
                      $ref: '#/components/schemas/LeadAbout'
            example:
              title: Acme Corp
              status_name: new
              meta_data:
                about:
                  description: Enterprise SaaS prospect.
                  url: https://acme.com
      responses:
        '201':
          description: Lead created.
          content:
            application/json:
              example:
                http_code: 201
                status: success
                message: Lead created
                data:
                  id: 42
                  title: Acme Corp
                  status_name: new
                  meta_data:
                    about:
                      description: Enterprise SaaS prospect.
                      url: https://acme.com
                  created_at: '2026-04-07T12:00:00.000Z'
        '400':
          description: Validation error.
          content:
            application/json:
              example:
                http_code: 400
                status: failed
                message: 'title: Required'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
      security:
        - ApiKeyHeader:
            - write:leads
components:
  schemas:
    LeadAbout:
      type: object
      description: About section data — matches what is shown in the lead detail panel.
      additionalProperties: false
      properties:
        description:
          type: string
          maxLength: 500
          nullable: true
          example: Enterprise SaaS prospect from EMEA.
        url:
          type: string
          format: uri
          nullable: true
          example: https://acme.com
    Error:
      type: object
      properties:
        http_code:
          type: integer
          example: 400
        status:
          type: string
          example: failed
        message:
          type: string
          example: Validation failed
  responses:
    Unauthorized:
      description: Missing or invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            http_code: 401
            status: failed
            message: Invalid or missing API key
    Forbidden:
      description: Valid key but insufficient scope.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            http_code: 403
            status: failed
            message: Insufficient scope
  securitySchemes:
    ApiKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
      description: Your Flozy API key. Starts with `flz_live_`.

````