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

# Create Lead Report

> Create a "lead" remote report submitted by the client (no user/creator).

Authenticated via the organization's `x-api-key`. The report is created with
`type=remote` and `creator=NULL`, counted against the entity's subscription
quota like a normal remote report. Returns the report `token` and its app
`link`.

Body fields:
- **dealership** (required): id of the dealership the lead is attached to.
  Must belong to the API key's organization. Resolves the organization,
  entity, subscription quota and report visibility.
- **email** (optional): client email, stored on the report and used for the
  email notification.
- **phone** (optional): client phone, stored on the report and used for the
  SMS notification.
- **name** (optional): client name, shown in the notifications.
- **folder_name** (optional): report folder alias.
- **lang** (optional, default "fr"): language of the notifications.
- **custom_sms** (optional): custom SMS body template ({{ name }},
  {{ reportUrl }} placeholders supported).
- **sendEmail** (optional, default false): send the report link by email
  (requires `email`).
- **sendPhone** (optional, default false): send the report link by SMS
  (requires `phone`).



## OpenAPI

````yaml post /public/reports/create-lead
openapi: 3.1.0
info:
  title: Carviz API
  version: 1.0.0
servers:
  - url: https://api.carviz.com/prod
security: []
paths:
  /public/reports/create-lead:
    post:
      tags:
        - public
      summary: Create Lead Report
      description: >-
        Create a "lead" remote report submitted by the client (no user/creator).


        Authenticated via the organization's `x-api-key`. The report is created
        with

        `type=remote` and `creator=NULL`, counted against the entity's
        subscription

        quota like a normal remote report. Returns the report `token` and its
        app

        `link`.


        Body fields:

        - **dealership** (required): id of the dealership the lead is attached
        to.
          Must belong to the API key's organization. Resolves the organization,
          entity, subscription quota and report visibility.
        - **email** (optional): client email, stored on the report and used for
        the
          email notification.
        - **phone** (optional): client phone, stored on the report and used for
        the
          SMS notification.
        - **name** (optional): client name, shown in the notifications.

        - **folder_name** (optional): report folder alias.

        - **lang** (optional, default "fr"): language of the notifications.

        - **custom_sms** (optional): custom SMS body template ({{ name }},
          {{ reportUrl }} placeholders supported).
        - **sendEmail** (optional, default false): send the report link by email
          (requires `email`).
        - **sendPhone** (optional, default false): send the report link by SMS
          (requires `phone`).
      operationId: create_lead_report_public_reports_create_lead_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePublicLeadReportRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateLeadReportResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    CreatePublicLeadReportRequest:
      properties:
        dealership:
          type: string
          title: Dealership
        email:
          type: string
          title: Email
          default: ''
        phone:
          anyOf:
            - type: string
            - type: 'null'
          title: Phone
          default: ''
        name:
          type: string
          title: Name
          default: ''
        folder_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Folder Name
          default: ''
        lang:
          type: string
          title: Lang
          default: fr
        custom_sms:
          anyOf:
            - type: string
            - type: 'null'
          title: Custom Sms
        sendEmail:
          type: boolean
          title: Sendemail
          default: false
        sendPhone:
          type: boolean
          title: Sendphone
          default: false
      type: object
      required:
        - dealership
      title: CreatePublicLeadReportRequest
    CreateLeadReportResponse:
      properties:
        token:
          type: string
          title: Token
        link:
          type: string
          title: Link
      type: object
      required:
        - token
        - link
      title: CreateLeadReportResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````