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

# Look up lead by phone

> Looks up a lead by phone number

## Usage Notes

Use `phone` to look up a lead by their phone number. If exactly one active lead matches that phone number, the response returns the lead ID.

When the same lead phone number is associated with multiple outbound phone numbers, include `outboundPhone` to identify which lead to return. The outbound phone number must be one of the phone numbers configured for your organization.


## OpenAPI

````yaml get /leads/lookup
openapi: 3.0.1
info:
  title: AttentPublicAPI
  version: '2024-05-17T21:09:13Z'
servers:
  - url: https://api.attent.app/v1
security: []
paths:
  /leads/lookup:
    get:
      description: Looks up a lead by phone number
      parameters:
        - name: phone
          in: query
          required: true
          schema:
            $ref: '#/components/schemas/phoneProperty'
          description: The phone number of the lead to look up
        - name: outboundPhone
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/phoneProperty'
          description: The configured outbound phone number associated with the lead.
      responses:
        '200':
          description: Lead found successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: >-
                      The ID of the lead associated with the provided phone
                      number.
                required:
                  - id
              example:
                id: '1234'
        '400':
          description: Bad request. Invalid phone number format.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                example:
                  message: Invalid phone number format.
        '403':
          $ref: '#/components/responses/403'
        '404':
          description: Lead not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                example:
                  message: Lead not found.
        '409':
          description: >-
            Multiple leads match the provided phone number. Provide
            outboundPhone to identify the lead.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
              example:
                message: Multiple leads match this phone number; provide outboundPhone.
        '500':
          $ref: '#/components/responses/500'
      security:
        - api_key: []
components:
  schemas:
    phoneProperty:
      type: string
      description: >
        The phone number must begin with an area code (+) and can contain
        digits, spaces, parentheses, and hyphens (e.g. +1 (555) 555-5555)
  responses:
    '403':
      description: Forbidden API key
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
            example:
              message: Forbidden
    '500':
      description: Internal Server Error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
            example:
              message: Internal Server Error
  securitySchemes:
    api_key:
      type: apiKey
      name: x-api-key
      in: header

````