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

# Create a New Prospect

> Create a New Prospect



## OpenAPI

````yaml openapi.json post /v1/prospects
openapi: 3.1.0
info:
  title: Trata AI API
  description: >-
    Human like conversation to answer calls, drive engagement, automate
    follow-ups & schedule bookings 24/7  with end to end integrations ensuring
    you never miss a sales enquiry.
  version: 1.0.0
servers:
  - url: https://api.trata.ai
    description: Production
  - url: http://localhost:8000
    description: Development
security: []
paths:
  /v1/prospects:
    post:
      tags:
        - Prospects
      summary: Create a New Prospect
      description: Create a New Prospect
      operationId: createProspectV1
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Prospect-Input'
      responses:
        '200':
          description: Prospect created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Prospect-Output'
              example:
                id: pro.1731301754.OZSMSU1S
                orgId: org.1726902940.GZChqlpU
                name: Hari
                phoneNumber: 96260-12778
                externalReference: []
                status: SERVICE_ORDER_PLACED
                prospectProps: {}
                createdBy: trata-system
                createdAt: '2024-11-11T05:09:14.979287'
                updatedBy: trata-system
                updatedAt: '2024-11-11T05:09:14.979289'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    Prospect-Input:
      properties:
        name:
          anyOf:
            - type: string
              maxLength: 512
              minLength: 1
            - type: 'null'
          title: Name
          description: Name of the prospect
          example: John Doe
        email:
          anyOf:
            - type: string
              maxLength: 512
              minLength: 1
              format: email
            - type: 'null'
          title: Email
          description: Email of the prospect
          example: john.doe@example.com
        phoneNumber:
          anyOf:
            - type: string
              maxLength: 512
              minLength: 1
            - type: 'null'
          title: Phonenumber
          description: Phone number of the prospect
          example: '1234567890'
        externalReference:
          anyOf:
            - items:
                $ref: '#/components/schemas/ExternalReference'
              type: array
            - type: 'null'
          title: Externalreference
          description: External references for the prospect
        status:
          $ref: '#/components/schemas/ProspectStatus'
        prospectProps:
          anyOf:
            - type: object
            - type: 'null'
          title: Prospectprops
          description: Props for the prospect
          example: software
      type: object
      required:
        - status
      title: Prospect
    Prospect-Output:
      properties:
        id:
          type: string
          title: Id
        orgId:
          type: string
          title: Orgid
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        email:
          anyOf:
            - type: string
            - type: 'null'
          title: Email
        phoneNumber:
          anyOf:
            - type: string
            - type: 'null'
          title: Phonenumber
        externalReference:
          anyOf:
            - items:
                $ref: '#/components/schemas/ExternalReference'
              type: array
            - type: 'null'
          title: Externalreference
        status:
          type: string
          title: Status
        prospectProps:
          anyOf:
            - type: object
            - type: 'null'
          title: Prospectprops
        createdBy:
          type: string
          title: Createdby
        createdAt:
          type: string
          format: date-time
          title: Createdat
        updatedBy:
          type: string
          title: Updatedby
        updatedAt:
          type: string
          format: date-time
          title: Updatedat
      type: object
      required:
        - id
        - externalReference
        - status
        - prospectProps
      title: Prospect
      description: Prospects are the potential customers for business
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ExternalReference:
      properties:
        providerName:
          type: string
          maxLength: 512
          minLength: 1
          title: Providername
          description: External service provider name
          example: Google Analytics
        id:
          type: string
          maxLength: 512
          minLength: 1
          title: Id
          description: External service identifier
          example: GA-123456
        providerProps:
          anyOf:
            - type: object
            - type: 'null'
          title: Providerprops
          description: Props for the external reference
          example: abcdefg
      type: object
      required:
        - providerName
        - id
      title: ExternalReference
    ProspectStatus:
      type: string
      enum:
        - NEW
        - GENERAL_ENQUIRY
        - SCHEDULED_CALLBACK_WITH_BOT
        - SCHEDULED_APPOINTMENT_WITH_PERSON
        - SCHEDULED_APPOINTMENT_FOR_SERVICE
        - NOT_INTERESTED
        - PRODUCT_ORDER_PLACED
        - SERVICE_ORDER_PLACED
      title: ProspectStatus
    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
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````