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

# Get Lead

> Retrieve a single lead by ID

## Request

<ParamField header="X-API-Key" type="string" required>
  Your API key
</ParamField>

<ParamField path="id" type="string" required>
  The lead ID
</ParamField>

## Response

<ResponseField name="id" type="string">
  Unique lead identifier
</ResponseField>

<ResponseField name="linkedinUrl" type="string">
  LinkedIn profile URL of the lead
</ResponseField>

<ResponseField name="status" type="string">
  Current lead status
</ResponseField>

<ResponseField name="firstName" type="string">
  Lead's first name (if available)
</ResponseField>

<ResponseField name="lastName" type="string">
  Lead's last name (if available)
</ResponseField>

<ResponseField name="title" type="string">
  Lead's job title (if available)
</ResponseField>

<ResponseField name="company" type="string">
  Lead's company (if available)
</ResponseField>

<ResponseField name="campaignId" type="string">
  The campaign this lead belongs to
</ResponseField>

<ResponseField name="createdAt" type="string">
  ISO 8601 timestamp when the lead was added
</ResponseField>

<ResponseField name="updatedAt" type="string">
  ISO 8601 timestamp of last update
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl https://api.sendpilot.ai/v1/leads/lead_abc123 \
    -H "X-API-Key: YOUR_API_KEY"
  ```

  ```javascript Node.js theme={null}
  const response = await fetch('https://api.sendpilot.ai/v1/leads/lead_abc123', {
    headers: {
      'X-API-Key': process.env.SENDPILOT_API_KEY
    }
  });
  const lead = await response.json();
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      'https://api.sendpilot.ai/v1/leads/lead_abc123',
      headers={'X-API-Key': 'YOUR_API_KEY'}
  )
  lead = response.json()
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "id": "lead_abc123",
    "linkedinUrl": "https://www.linkedin.com/in/john-doe",
    "status": "CONNECTION_ACCEPTED",
    "firstName": "John",
    "lastName": "Doe",
    "title": "VP of Engineering",
    "company": "TechCorp",
    "campaignId": "camp_xyz789",
    "createdAt": "2024-02-20T10:00:00.000Z",
    "updatedAt": "2024-02-23T15:30:00.000Z"
  }
  ```

  ```json 404 theme={null}
  {
    "statusCode": 404,
    "error": "Not Found",
    "code": "LEAD_NOT_FOUND",
    "message": "Lead with ID 'lead_abc123' not found in this workspace"
  }
  ```
</ResponseExample>


## OpenAPI

````yaml GET /v1/leads/{id}
openapi: 3.0.0
info:
  title: SendPilot External API
  description: >
    The SendPilot API enables you to programmatically manage LinkedIn outreach
    campaigns,

    add leads, update lead statuses, send messages, and receive real-time
    webhook notifications.
  version: 1.0.0
  contact:
    name: SendPilot Support
    email: support@sendpilot.ai
    url: https://sendpilot.ai
servers:
  - url: https://api.sendpilot.ai
    description: Production server
security:
  - ApiKeyAuth: []
tags:
  - name: Credits
    description: Credits and quota management
  - name: Campaigns
    description: Campaign management endpoints
  - name: Leads
    description: Lead management endpoints
  - name: Lead Database
    description: Lead Database search endpoints
  - name: Lead Extractor
    description: Lead extraction campaign endpoints
  - name: Inbox
    description: Direct messaging endpoints
paths:
  /v1/leads/{id}:
    get:
      tags:
        - Leads
      summary: Get lead by ID
      description: Retrieve detailed information about a specific lead
      operationId: getLeadById
      parameters:
        - name: id
          in: path
          required: true
          description: Lead ID
          schema:
            type: string
      responses:
        '200':
          description: Lead details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Lead'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  schemas:
    Lead:
      type: object
      properties:
        id:
          type: string
        linkedinUrl:
          type: string
        status:
          type: string
          enum:
            - PENDING
            - CONNECTION_SENT
            - CONNECTION_ACCEPTED
            - MESSAGE_SENT
            - REPLY_RECEIVED
            - DONE
        firstName:
          type: string
          nullable: true
        lastName:
          type: string
          nullable: true
        title:
          type: string
          nullable: true
        company:
          type: string
          nullable: true
        campaignId:
          type: string
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      required:
        - id
        - linkedinUrl
        - status
        - campaignId
        - createdAt
        - updatedAt
    Error:
      type: object
      properties:
        statusCode:
          type: integer
        error:
          type: string
        code:
          type: string
        message:
          type: string
      required:
        - statusCode
        - message
  responses:
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key for authentication

````