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

# Get Lead Via External ID

> Retrieves details of a specific lead within an outbound



## OpenAPI

````yaml get /v2/Outbound/{pearlId}/Lead/External/{externalId}
openapi: 3.0.1
info:
  title: NLPearl Client API
  description: A sample API that demonstrates features in the OpenAPI specification
  version: v2
servers:
  - url: https://api.nlpearl.ai
    description: Production Environement
security:
  - bearer_auth: []
paths:
  /v2/Outbound/{pearlId}/Lead/External/{externalId}:
    get:
      tags:
        - Outbound
      summary: Get Lead Via External ID
      description: Retrieves details of a specific lead within an outbound
      parameters:
        - name: pearlId
          in: path
          required: true
          schema:
            type: string
        - name: externalId
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Details of the specific lead.
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/LeadApiView'
            application/json:
              schema:
                $ref: '#/components/schemas/LeadApiView'
            text/json:
              schema:
                $ref: '#/components/schemas/LeadApiView'
        '400':
          description: Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
components:
  schemas:
    LeadApiView:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier of the lead, represented as an ObjectId.
          nullable: true
        externalId:
          type: string
          description: The identifier for the lead from an external system, such as a CRM.
          nullable: true
        phoneNumber:
          type: string
          description: The phone number of the lead.
          nullable: true
        timeZone:
          type: string
          description: >-
            The time zone of the lead, represented as a float (e.g., -5.0 for
            EST).
          nullable: true
        status:
          allOf:
            - $ref: '#/components/schemas/eLeadStatusView'
          description: >+
            The Status of the lead is the status of the last conversation.


            To determine the definition of 'Success' or 'Not Successful,' please
            refer to the [Create a Pearl](/pages/create_pearl#pearl-name) page
            at step 4.


            `1 - New`


            `10 - NeedRetry`


            `20 - InCallQueue`


            `30 - WrongCountryCode`


            `40 - OnCall`


            `70 - VoiceMailLeft`


            `100 - Success`


            `110 - NotSuccessful`


            `130 - Completed`


            `150 - Unreachable`


            `220 - Blacklisted`


            `300 - QueueAbandon`


            `500 - Error`

        created:
          type: string
          description: The date and time when the lead was created.
          format: date-time
        callsId:
          type: array
          items:
            type: string
          description: The list of the ID's of all the calls this lead has received.
          nullable: true
        lastCall:
          allOf:
            - $ref: '#/components/schemas/LeadLastCallApiView'
          nullable: true
        callData:
          type: object
          additionalProperties:
            type: string
          description: "A dictionary containing additional information about the call.\r\nIt is used as variables that you can use in \"Opening Sentence\" or \"Flow Script\" when you create a Pearl on the platform.\r\nThe keys represent the field names, and the values contain the corresponding data.\r\nThis information can be used to personalize the conversation or manage lead-specific details.\r\nThis parameter is optional.\r\nsee [Variables](/pages/variables) for more information.\r\nHere is an example of the json to send:\r\n`{ \"email\" : \"joe@gmail.com\", \"address\": \"3 Abbey Road UK\" , \"carLicense\" : \"90-929-82\" }`"
          nullable: true
        collectedData:
          type: object
          additionalProperties: {}
          description: "A dictionary containing all the information collected about the lead during the call.  \r\nThese values are the result of the conversation and reflect the answers or actions taken by the lead.  \r\nThe `key` represents the ID of the variable configured on the platform,  \r\nand the `value` corresponds to the collected data.  \r\n            \r\nThis information can be used to understand user intent, track specific responses, or power further automation.  \r\nFor more details on how variables work, see [Variables](/pages/variables).\r\n            \r\nHere is an example of the JSON format:\r\n`{ \"confirmBooking\": true, \"dropOffLocation\": \"Orly Airport\", \"rideTime\": \"Friday at 12:00\", \"userIntent\": \"Book a taxi to the airport\" }`"
          nullable: true
      additionalProperties: false
    ValidationProblemDetails:
      type: object
      properties:
        type:
          type: string
          nullable: true
        title:
          type: string
          nullable: true
        status:
          type: integer
          format: int32
          nullable: true
        detail:
          type: string
          nullable: true
        instance:
          type: string
          nullable: true
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
          nullable: true
      additionalProperties: {}
    eLeadStatusView:
      type: integer
      description: >+
        The Status of the lead is the status of the last conversation.


        To determine the definition of 'Success' or 'Not Successful,' please
        refer to the [Create a Pearl](/pages/create_pearl#pearl-name) page at
        step 4.


        `1 - New`


        `10 - NeedRetry`


        `20 - InCallQueue`


        `30 - WrongCountryCode`


        `40 - OnCall`


        `70 - VoiceMailLeft`


        `100 - Success`


        `110 - NotSuccessful`


        `130 - Completed`


        `150 - Unreachable`


        `220 - Blacklisted`


        `300 - QueueAbandon`


        `500 - Error`

      format: int32
    LeadLastCallApiView:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier of the call.
          nullable: true
        startTime:
          type: string
          description: The date and time when the call processing started.
          format: date-time
        pearlId:
          type: string
          description: The ID of the Pearl Used in This Call.
          nullable: true
        status:
          allOf:
            - $ref: '#/components/schemas/eCallStatusView'
          description: |+
            Represents the current status of a call.

            `3 - InProgress`

            `4 - Completed`

            `5 - Busy`

            `6 - Failed`

            `7 - NoAnswer`

            `8 - Canceled`

        from:
          type: string
          description: The phone number from which the call was made.
          nullable: true
        name:
          type: string
          description: The name associated with the call, if available.
          nullable: true
        collectedData:
          allOf:
            - $ref: '#/components/schemas/CallCollectedDataApiView'
          description: The object including all the information collected during the call.
          nullable: true
        summary:
          type: string
          description: A summary of the conversation.
          nullable: true
        duration:
          type: integer
          description: The duration of the call in seconds.
          format: int32
        recording:
          type: string
          description: The URL of the recording of the call, if available.
          nullable: true
        tags:
          type: array
          items:
            type: string
          description: The tags or labels triggered during the conversation
          nullable: true
      additionalProperties: false
    eCallStatusView:
      type: integer
      description: |+
        Represents the current status of a call.

        `3 - InProgress`

        `4 - Completed`

        `5 - Busy`

        `6 - Failed`

        `7 - NoAnswer`

        `8 - Canceled`

      format: int32
    CallCollectedDataApiView:
      type: object
      properties:
        transcript:
          type: array
          items:
            $ref: '#/components/schemas/AgentChatMessageApiView'
          description: The transcript of the conversation.
          nullable: true
        collectedInfos:
          type: array
          items:
            $ref: '#/components/schemas/CollectedInfoView'
          description: The information collected during the conversations.
          nullable: true
      additionalProperties: false
    AgentChatMessageApiView:
      type: object
      properties:
        role:
          allOf:
            - $ref: '#/components/schemas/eChatMessageRoleView'
          description: |+
            `2 - Pearl`

            `3 - Client`

        content:
          type: string
          description: The content of the message
          nullable: true
        startTime:
          type: number
          description: The moment the message starts
          format: float
          nullable: true
        endTime:
          type: number
          description: The moment the message ends
          format: float
          nullable: true
      additionalProperties: false
    CollectedInfoView:
      type: object
      properties:
        id:
          type: string
          description: The ID of the variable collected
          nullable: true
        name:
          type: string
          description: The display name of the variable collected.
          nullable: true
        value:
          description: The value of the variable collected.
          nullable: true
      additionalProperties: false
    eChatMessageRoleView:
      type: integer
      description: |+
        `2 - Pearl`

        `3 - Client`

      format: int32
  securitySchemes:
    bearer_auth:
      type: http
      description: >-
        Specify the authorization token.


        For more information, check out the [Authorization
        Guide](/api-reference/authorization).
      scheme: bearer

````