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

# Create Lead

> Creates a new lead



## OpenAPI

````yaml /us/openapi.json post /external/v1/leads
openapi: 3.1.0
info:
  title: OpenAPI ClinicOS
  description: ClinicOS OpenAPI Documentation
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://us.api.aiosmedical.com
security: []
paths:
  /external/v1/leads:
    post:
      tags:
        - Leads
      summary: Create Lead
      description: Creates a new lead
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateLeadPayload'
      responses:
        '200':
          description: Lead created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Lead'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: number
                    example: 400
                  error:
                    type: object
                    properties:
                      message:
                        type: array
                        items:
                          type: string
                        example:
                          - email must be an email
                      error:
                        type: string
                        example: Bad Request
                      statusCode:
                        type: number
                        example: 400
                  timestamp:
                    type: string
                    example: '2025-06-04T12:00:00.000Z'
                  path:
                    type: string
                    example: /external/v1/leads
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: number
                    example: 500
                  error:
                    type: string
                    example: Internal Server Error
                  timestamp:
                    type: string
                    example: '2025-06-04T12:00:00.000Z'
                  path:
                    type: string
                    example: /external/v1/leads
components:
  schemas:
    CreateLeadPayload:
      type: object
      properties:
        email:
          type: string
          format: email
          example: test@example.com
        data:
          type: object
          example:
            name: John Doe
            email: test@example.com
            phone: '1234567890'
            address: 123 Main St, Anytown, USA
    Lead:
      type: object
      properties:
        id:
          type: string
          example: 123e4567-e89b-12d3-a456-426614174000
        email:
          type: string
          example: test@example.com
        data:
          type: object
          example:
            name: John Doe
            email: test@example.com
            phone: '1234567890'
            address: 123 Main St, Anytown, USA
        createdAt:
          type: string
          example: '2025-06-04T12:00:00.000Z'

````