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

# Company Funding

> Provide the Company Domain or Company Name and get back the complete funding details of the company.

# Company Funding

Discover comprehensive funding data for companies including investment rounds, funding amounts, investor information, and leadership details.

## Endpoint Details

<Tabs>
  <Tab title="Pricing" icon="coins">
    | Metric         | Value                             |
    | -------------- | --------------------------------- |
    | **Cost**       | **4 credits** per company         |
    | **No Results** | **FREE** if no funding data found |

    <Tip>
      Includes detailed funding history, investor lists, and CEO/founder information.
    </Tip>
  </Tab>

  <Tab title="Rate Limits" icon="gauge">
    ### Per-Endpoint Limit

    | Metric              | Value               |
    | ------------------- | ------------------- |
    | **Requests/Minute** | 300                 |
    | **Burst Capacity**  | \~5 requests/second |

    <Info>
      Rate limits are subject to change. Custom rate limits are available on enterprise plans — [contact us](mailto:support@leadmagic.io).
    </Info>
  </Tab>
</Tabs>

***

## Quick Example

<CodeGroup>
  ```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark"}}
  curl -X POST 'https://api.leadmagic.io/v1/companies/company-funding' \
    -H 'X-API-Key: YOUR_API_KEY' \
    -H 'Content-Type: application/json' \
    -d '{"company_domain": "leadmagic.io"}'
  ```

  ```javascript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
  const response = await fetch('https://api.leadmagic.io/v1/companies/company-funding', {
    method: 'POST',
    headers: {
      'X-API-Key': 'YOUR_API_KEY',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({ company_domain: 'leadmagic.io' })
  });
  const data = await response.json();
  console.log(`Total Funding: ${data.total_funding}`);
  ```

  ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
  import requests

  response = requests.post(
      'https://api.leadmagic.io/v1/companies/company-funding',
      headers={'X-API-Key': 'YOUR_API_KEY'},
      json={'company_domain': 'leadmagic.io'}
  )
  data = response.json()
  print(f"Total Funding: {data.get('total_funding', 'Unknown')}")
  ```
</CodeGroup>

***

## Request Parameters

<ParamField body="company_domain" type="string">
  Company website domain (preferred).
</ParamField>

<ParamField body="company_name" type="string">
  Company name.
</ParamField>

<Warning>
  You must provide either `company_domain` or `company_name` (or both).
</Warning>

***

## Response

<ResponseField name="company_name" type="string" required>
  Company name
</ResponseField>

<ResponseField name="total_funding" type="string">
  Total funding raised (formatted)
</ResponseField>

<ResponseField name="latest_round" type="string">
  Most recent funding round type (Series A, B, etc.)
</ResponseField>

<ResponseField name="latest_round_amount" type="string">
  Amount raised in latest round
</ResponseField>

<ResponseField name="latest_round_date" type="string">
  Date of latest round
</ResponseField>

<Expandable title="Funding Rounds">
  <ResponseField name="funding_rounds" type="array">
    Array of funding rounds with type, amount, date, and investors
  </ResponseField>
</Expandable>

<Expandable title="Investors">
  <ResponseField name="investors" type="array">
    List of investor names
  </ResponseField>

  <ResponseField name="lead_investors" type="array">
    Lead investors in recent rounds
  </ResponseField>
</Expandable>

<Expandable title="Leadership">
  <ResponseField name="leadership.ceo.firstName" type="string">
    CEO first name
  </ResponseField>

  <ResponseField name="leadership.ceo.lastName" type="string">
    CEO last name
  </ResponseField>

  <ResponseField name="leadership.ceo.designation" type="string">
    CEO title
  </ResponseField>

  <ResponseField name="leadership.ceo.b2b_profile" type="string">
    CEO profile URL
  </ResponseField>
</Expandable>

### Example Response

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "company_name": "LeadMagic",
  "total_funding": "$8.7B",
  "latest_round": "Series I",
  "latest_round_amount": "$600M",
  "latest_round_date": "2023-03-15",
  "funding_rounds": [
    {
      "type": "Series I",
      "amount": "$600M",
      "date": "2023-03-15",
      "investors": ["Andreessen Horowitz", "Founders Fund"]
    }
  ],
  "investors": ["Andreessen Horowitz", "Sequoia Capital", "General Catalyst"],
  "leadership": {
    "ceo": {
      "firstName": "Alex",
      "lastName": "Rivera",
      "designation": "CEO & Co-Founder",
      "b2b_profile": "linkedin.com/in/patrickcollison"
    }
  },
  "credits_consumed": 4,
  "message": "Funding data found."
}
```

***

## Success Messages

| Message                                   | Meaning                      | Cost      |
| ----------------------------------------- | ---------------------------- | --------- |
| `Funding data found.`                     | Full funding data returned   | 4 credits |
| `No funding data found for this company.` | No funding records available | FREE      |

***

## Best Practices

<AccordionGroup>
  <Accordion title="Target recently funded companies" icon="rocket">
    Companies with recent funding have budget and are actively investing in growth.
  </Accordion>

  <Accordion title="Track investor portfolios" icon="briefcase">
    Companies backed by the same investors often have similar needs.
  </Accordion>

  <Accordion title="Use for lead scoring" icon="star">
    Funding stage and amount are strong signals for company budget and growth trajectory.
  </Accordion>
</AccordionGroup>

***

## Use Cases

<CardGroup cols={2}>
  <Card title="Sales Prioritization" icon="ranking-star">
    Prioritize outreach to recently funded companies with budget.
  </Card>

  <Card title="Market Intelligence" icon="chart-line">
    Track funding trends in your target market.
  </Card>

  <Card title="Lead Scoring" icon="star">
    Score leads based on funding stage and amount.
  </Card>

  <Card title="Account Research" icon="magnifying-glass">
    Understand financial position before outreach.
  </Card>
</CardGroup>


## OpenAPI

````yaml post /v1/companies/company-funding
openapi: 3.1.0
info:
  title: LeadMagic API
  version: 1.4.34
  description: >
    # LeadMagic API Documentation


    The LeadMagic API provides comprehensive B2B data enrichment services
    including email validation, email finding, profile search, company
    intelligence, and more.


    ## Quick Start


    1. Get your API key from the [LeadMagic Dashboard](https://app.leadmagic.io)

    2. Add the `X-API-Key` header to all requests

    3. Start enriching your data!


    ## Base URL


    All API requests should be made to: `https://api.leadmagic.io`


    ## Rate Limits


    Each endpoint has specific rate limits (requests per minute). Exceeding
    limits returns a `429 Too Many Requests` response.


    ## Credits


    API calls consume credits based on the endpoint used. Check your balance
    with the `/v1/credits` endpoint.


    ## Support


    Contact us at support@leadmagic.io for assistance.
  contact:
    name: LeadMagic Support
    email: support@leadmagic.io
    url: https://leadmagic.io
  termsOfService: https://leadmagic.io/legal/terms
servers:
  - url: https://api.leadmagic.io
    description: Production API Server
security:
  - ApiKeyAuth: []
tags:
  - name: Credits
    description: Manage and check your credit balance
  - name: Analytics
    description: >-
      Monitor your API usage with comprehensive analytics endpoints (FREE - no
      credits consumed)
  - name: People Enrichment
    description: Find and validate contact information for individuals
  - name: Company Data
    description: Discover company information and intelligence
  - name: Jobs Data
    description: Search job listings and detect career changes
  - name: Ads Data
    description: Search advertising data across platforms
paths:
  /v1/companies/company-funding:
    post:
      tags:
        - Company Data
      summary: Company Funding
      description: >-
        Provide the Company Domain or Company Name and get back the complete
        funding details of the company.
      operationId: company-funding
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                company_name:
                  type: string
                  description: Provide Company Name
                  default: leadmagic
                company_domain:
                  type: string
                  description: Provide Company Domain
                  default: leadmagic.io
      responses:
        '200':
          description: Successful response with company funding details
          content:
            application/json:
              schema:
                type: object
                properties:
                  basicInfo:
                    type: object
                    properties:
                      companyName:
                        type: string
                        example: LeadMagic Inc
                      description:
                        type: string
                        example: >-
                          Example Robotics provides enterprise software
                          solutions for B2B companies.
                      shortName:
                        type: string
                        example: LeadMagic
                      founded:
                        type: string
                        example: '2015'
                      headquarters:
                        type: object
                        properties:
                          city:
                            type: string
                            example: Palo Alto
                          state:
                            type: string
                            example: California
                          country:
                            type: string
                            example: USA
                          fullAddress:
                            type: string
                            example: Palo Alto, California, USA
                      primaryDomain:
                        type: string
                        example: leadmagic.io
                      phone:
                        type: string
                        example: 1-650-276-3068
                      status:
                        type: string
                        example: NEW
                      followers:
                        type: integer
                        example: 2422
                      ownership:
                        type: string
                        example: Private
                  financialInfo:
                    type: object
                    properties:
                      revenue:
                        type: integer
                        example: 178000000
                      formattedRevenue:
                        type: string
                        example: 178M
                      totalFunding:
                        type: integer
                        example: 584000000
                      formattedFunding:
                        type: string
                        example: 584M
                      lastFundingRound:
                        type: object
                        properties:
                          round:
                            type: string
                            example: Series E
                          date:
                            type: string
                            format: date-time
                            example: '2021-05-01T00:00:00.000Z'
                          amount:
                            type: integer
                            example: 250000000
                  fundingHistory:
                    type: array
                    items:
                      type: object
                      properties:
                        round:
                          type: string
                          example: Series E
                        date:
                          type: string
                          format: date-time
                          example: '2021-05-01T00:00:00.000Z'
                        amount:
                          type: string
                          example: $250,000,000
                        investors:
                          type: array
                          items:
                            type: string
                          example:
                            - Franklin Templeton
                            - Coatue
                            - Sequoia
                            - Thrive Capital
                            - Tiger Global
                    example:
                      - round: Series E
                        date: '2021-05-01T00:00:00.000Z'
                        amount: $250,000,000
                        investors:
                          - Franklin Templeton
                          - Coatue
                          - Sequoia
                          - Thrive Capital
                          - Tiger Global
                      - round: Series D
                        date: '2020-08-01T00:00:00.000Z'
                        amount: $200,000,000
                        investors:
                          - Coatue
                          - Index Ventures
                          - Thrive Capital
                          - Battery Ventures
                          - NextWorld Capital
                          - Norwest Venture Partners
                          - Sequoia Capital
                          - Wing Venture Capital
                      - round: Series C
                        date: '2019-12-01T00:00:00.000Z'
                        amount: $65,000,000
                        investors:
                          - Sequoia Capital
                          - Battery Ventures
                          - Norwest Venture Partners
                          - Wing Venture Capital
                          - NextWorld Capital
                          - Cisco Investments
                  companySize:
                    type: object
                    properties:
                      employees:
                        type: integer
                        example: 1100
                      employeeRange:
                        type: string
                        example: 1,000 - 5,000
                      employeeGrowth:
                        type: string
                        example: N/A
                  leadership:
                    type: object
                    properties:
                      ceo:
                        type: object
                        properties:
                          firstName:
                            type: string
                            example: Amit
                          lastName:
                            type: string
                            example: Bendov
                          designation:
                            type: string
                            example: Co-Founder & CEO
                          b2b_profile:
                            type: string
                            example: amitbendov
                          twitter:
                            type: string
                            example: https://twitter.com/banditmove
                  industryAndSectors:
                    type: object
                    properties:
                      industrySectors:
                        type: array
                        items:
                          type: string
                        example:
                          - Sales Enablement Software
                          - Business Intelligence (BI)
                      industries:
                        type: array
                        items:
                          type: string
                        example:
                          - Software, Internet & Computer Services
                      technologyStack:
                        type: string
                        example: N/A
                  topCompetitors:
                    type: array
                    items:
                      type: object
                      properties:
                        name:
                          type: string
                          example: Chorus
                        revenue:
                          type: string
                          example: $21
                        employees:
                          type: string
                          example: '200'
                        totalFunding:
                          type: string
                          example: $1,003
                        headquarters:
                          type: object
                          properties:
                            city:
                              type: string
                              example: San Francisco
                            state:
                              type: string
                              example: US-CA
                            country:
                              type: string
                              example: USA
                            fullAddress:
                              type: string
                              example: San Francisco, US-CA, USA
                        founded:
                          type: string
                          format: date-time
                          example: '2015-01-01T00:00:00.000Z'
                        ownership:
                          type: string
                          example: Private
                        website:
                          type: string
                          example: https://www.chorus.ai
                    example:
                      - name: BoostUp
                        revenue: $6
                        employees: '85'
                        totalFunding: $425
                        headquarters:
                          city: Santa Clara
                          state: US-CA
                          country: USA
                          fullAddress: Santa Clara, US-CA, USA
                        founded: '2018-01-01T00:00:00.000Z'
                        ownership: Private
                        website: https://www.boostup.ai
                      - name: ExecVision
                        revenue: $43
                        employees: '31'
                        totalFunding: $81
                        headquarters:
                          city: Arlington
                          state: US-VA
                          country: USA
                          fullAddress: Arlington, US-VA, USA
                        founded: '2015-01-01T00:00:00.000Z'
                        ownership: Private
                        website: https://www.execvision.io
                      - name: Seismic
                        revenue: $375
                        employees: 1,000
                        totalFunding: $940
                        headquarters:
                          city: San Diego
                          state: US-CA
                          country: USA
                          fullAddress: San Diego, US-CA, USA
                        founded: '2010-01-01T00:00:00.000Z'
                        ownership: Private
                        website: https://seismic.com
                  acquisitions:
                    type: array
                    items:
                      type: object
                      properties:
                        companyName:
                          type: string
                          example: Vayo
                        acquisitionDate:
                          type: string
                          format: date-time
                          example: '2020-09-01T00:00:00.000Z'
                        description:
                          type: string
                          example: >-
                            Vayo is a SaaS-based firm that analyzes, integrates
                            and converts customer data into actionable insights
                            for business
                        source:
                          type: string
                          example: >-
                            https://techcrunch.com/2020/09/01/fresh-off-200m-series-d-leadmagic-acquires-early-stage-startup-vayo
                    example:
                      - companyName: Vayo
                        acquisitionDate: '2020-09-01T00:00:00.000Z'
                        description: >-
                          Vayo is a SaaS-based firm that analyzes, integrates
                          and converts customer data into actionable insights
                          for business
                        source: >-
                          https://techcrunch.com/2020/09/01/fresh-off-200m-series-d-leadmagic-acquires-early-stage-startup-vayo
                      - companyName: ONDiGO
                        acquisitionDate: '2018-04-01T00:00:00.000Z'
                        description: >-
                          ONDiGO is a CRM platform that offers customer
                          retention and management services to professionals and
                          micro-businesses.
                        source: >-
                          https://www.prnewswire.com/news-releases/leadmagic-acquires-ondigo-to-extend-its-conversation-intelligence-platform-300630168.html
                  socialMedia:
                    type: array
                    items:
                      type: object
                      properties:
                        platform:
                          type: string
                          example: twitter
                        url:
                          type: string
                          example: https://twitter.com/leadmagic
                    example:
                      - platform: twitter
                        url: https://twitter.com/leadmagic
                      - platform: facebook
                        url: https://www.facebook.com/To.LeadMagicHQ
                      - platform: b2b_profile
                        url: leadmagichq
                  news:
                    type: array
                    items:
                      type: object
                      properties:
                        title:
                          type: string
                          example: >-
                            Example Robotics: Example Robotics Launches New
                            Enterprise Platform
                        source:
                          type: string
                          example: Martech Cube
                        date:
                          type: string
                          format: date-time
                          example: '2024-08-07T08:40:00.000Z'
                    example:
                      - title: >-
                          Example Robotics: Example Robotics Launches New
                          Enterprise Platform
                        source: TechCrunch
                        date: '2024-08-07T08:40:00.000Z'
                      - title: >-
                          Example Robotics: Example Robotics Partners with
                          Example CRM
                        source: Business Wire
                        date: '2024-06-26T22:15:00.000Z'
                      - title: >-
                          Example Robotics Named Best SaaS Solution in 2024
                          Industry Awards
                        source: Forbes
                        date: '2024-06-26T00:00:00.000Z'
                  pressReleases:
                    type: array
                    items:
                      type: object
                      properties:
                        title:
                          type: string
                          example: >-
                            Press Release: Example Robotics Announces Strategic
                            Partnership with Example Robotics
                        source:
                          type: string
                          example: PR Newswire
                        date:
                          type: string
                          format: date-time
                          example: '2024-10-17T22:21:00.000Z'
                    example:
                      - title: >-
                          Press Release: Example Robotics Announces Strategic
                          Partnership with Example Robotics
                        source: PR Newswire
                        date: '2024-10-17T22:21:00.000Z'
                      - title: >-
                          Press Release: Example Robotics Named a Winner in The
                          Cloud Awards
                        source: PR Newswire
                        date: '2024-10-09T18:28:00.000Z'
                      - title: >-
                          Press Release: Example Robotics Recognized as Industry
                          Leader by Example Research
                        source: Business Wire
                        date: '2024-09-04T18:50:00.000Z'
                  keyHighlights:
                    type: array
                    items:
                      type: object
                      properties:
                        type:
                          type: string
                          example: partnership
                        text:
                          type: string
                          example: >-
                            Example Robotics Announces Strategic Partnership
                            with Example Robotics
                        date:
                          type: string
                          format: date-time
                          example: '2024-10-17T22:21:00.000Z'
                        src:
                          type: string
                          example: >-
                            https://www.prnewswire.com/news-releases/acme-corp-announces-partnership-302271451.html
                        source:
                          type: string
                          example: PR Newswire
                    example:
                      - type: partnership
                        text: >-
                          Example Robotics Announces Strategic Partnership with
                          Example Robotics
                        date: '2024-10-17T22:21:00.000Z'
                        src: >-
                          https://www.prnewswire.com/news-releases/acme-corp-announces-partnership-302271451.html
                        source: PR Newswire
                      - type: award
                        text: Example Robotics Named a Winner in The Cloud Awards
                        date: '2024-10-09T18:28:00.000Z'
                        src: >-
                          https://www.prnewswire.com/news-releases/acme-corp-cloud-awards-302271452.html
                        source: PR Newswire
                  summarySection:
                    type: string
                    example: >-
                      Example Robotics provides enterprise software solutions
                      for B2B companies. Example Robotics was founded in 2018.
                      Example Robotics's headquarters is located in San
                      Francisco, California, USA.
                  credits_consumed:
                    type: integer
                    example: 4
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimitExceeded'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  responses:
    BadRequest:
      description: |
        Bad Request - The request was malformed or contains invalid parameters.

        **Common causes:**
        - Missing required fields
        - Invalid field format (e.g., malformed email)
        - Invalid JSON syntax
        - Invalid parameter values
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ValidationError'
    Unauthorized:
      description: |
        Unauthorized - Authentication failed.

        **Common causes:**
        - Missing X-API-Key header
        - Invalid or expired API key
        - Malformed API key
      content:
        application/problem+json:
          schema:
            oneOf:
              - $ref: '#/components/schemas/MissingAuthenticationError'
              - $ref: '#/components/schemas/InvalidApiKeyError'
    PaymentRequired:
      description: >
        Payment Required - Insufficient credits for this request.


        **Action required:** Add credits to your account at
        https://app.leadmagic.io/billing
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/InsufficientCreditsError'
    NotFound:
      description: |
        Not Found - The requested resource could not be found.

        **Common causes:**
        - Profile doesn't exist or is not accessible
        - Company not found in our database
        - Invalid URL or identifier
      content:
        application/problem+json:
          schema:
            oneOf:
              - $ref: '#/components/schemas/ResourceNotFoundError'
              - $ref: '#/components/schemas/ProfileNotFoundError'
    RateLimitExceeded:
      description: |
        Too Many Requests - Rate limit exceeded.

        **Action required:** Check the `Retry-After` header for when to retry.

        **Headers returned:**
        - `Retry-After`: Seconds until you can retry
        - `RateLimit-Limit`: Your limit per minute
        - `RateLimit-Remaining`: Remaining requests this minute
        - `RateLimit-Reset`: Seconds until limit resets
      headers:
        Retry-After:
          schema:
            type: integer
          description: Seconds to wait before retrying
        RateLimit-Limit:
          schema:
            type: integer
          description: Maximum requests per minute
        RateLimit-Remaining:
          schema:
            type: integer
          description: Remaining requests this minute
        RateLimit-Reset:
          schema:
            type: integer
          description: Seconds until limit resets
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/RateLimitExceededError'
    InternalServerError:
      description: >
        Internal Server Error - Something went wrong on our end.


        **Action required:** Wait 30 seconds and retry. If the problem persists,
        contact support@leadmagic.io
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/InternalServerError'
  schemas:
    ValidationError:
      allOf:
        - $ref: '#/components/schemas/ErrorResponse'
      example:
        success: false
        errors:
          - type: https://api.leadmagic.io/errors/validation_error
            title: Request validation failed. Check your input parameters.
            status: 400
            code: validation_error
            param:
              - email
            detail: 'Email format is invalid. Expected format: user@domain.com'
            action: Provide a valid email address in the 'email' field.
            docs: https://leadmagic.io/docs/api-reference/errors
        meta:
          request_id: ea6e3248-f4d2-437d-bca3-20881b529129
          timestamp: '2024-02-01T12:00:00.000Z'
    MissingAuthenticationError:
      allOf:
        - $ref: '#/components/schemas/ErrorResponse'
      example:
        success: false
        errors:
          - type: https://api.leadmagic.io/errors/missing_authentication
            title: >-
              Authentication required. Provide a valid API key in the X-API-Key
              header (case-insensitive).
            status: 401
            code: missing_authentication
            docs: https://leadmagic.io/docs/api-reference/authentication
        meta:
          request_id: ea6e3248-f4d2-437d-bca3-20881b529129
          timestamp: '2024-02-01T12:00:00.000Z'
    InvalidApiKeyError:
      allOf:
        - $ref: '#/components/schemas/ErrorResponse'
      example:
        success: false
        errors:
          - type: https://api.leadmagic.io/errors/invalid_api_key
            title: Invalid API key. The key does not exist or is incorrect.
            status: 401
            code: invalid_api_key
            docs: https://leadmagic.io/docs/api-reference/authentication
        meta:
          request_id: ea6e3248-f4d2-437d-bca3-20881b529129
          timestamp: '2024-02-01T12:00:00.000Z'
    InsufficientCreditsError:
      allOf:
        - $ref: '#/components/schemas/ErrorResponse'
      example:
        success: false
        errors:
          - type: https://api.leadmagic.io/errors/insufficient_credits
            title: 'Insufficient credits: need 5, have 2.50. Add credits to continue.'
            status: 402
            code: insufficient_credits
            detail: >-
              This request requires 5 credit(s) but your account only has 2.50
              credits remaining.
            action: >-
              Add credits to your account at https://app.leadmagic.io/billing or
              contact support@leadmagic.io for enterprise plans.
            docs: https://leadmagic.io/docs/api-reference/credits
            context:
              credits_required: 5
              credits_available: 2.5
              credits_needed: 2.5
        meta:
          request_id: ea6e3248-f4d2-437d-bca3-20881b529129
          timestamp: '2024-02-01T12:00:00.000Z'
    ResourceNotFoundError:
      allOf:
        - $ref: '#/components/schemas/ErrorResponse'
      example:
        success: false
        errors:
          - type: https://api.leadmagic.io/errors/resource_not_found
            title: Resource not found.
            status: 404
            code: resource_not_found
            docs: https://leadmagic.io/docs/api-reference/errors
        meta:
          request_id: ea6e3248-f4d2-437d-bca3-20881b529129
          timestamp: '2024-02-01T12:00:00.000Z'
    ProfileNotFoundError:
      allOf:
        - $ref: '#/components/schemas/ErrorResponse'
      example:
        success: false
        errors:
          - type: https://api.leadmagic.io/errors/profile_not_found
            title: Profile not found or not accessible
            status: 404
            code: profile_not_found
            docs: https://leadmagic.io/docs/api-reference/errors
        meta:
          request_id: ea6e3248-f4d2-437d-bca3-20881b529129
          timestamp: '2024-02-01T12:00:00.000Z'
    RateLimitExceededError:
      allOf:
        - $ref: '#/components/schemas/ErrorResponse'
      example:
        success: false
        errors:
          - type: https://api.leadmagic.io/errors/rate_limit_exceeded
            title: >-
              Rate limit exceeded: 300 requests per 1 minute. Wait and try
              again.
            status: 429
            code: rate_limit_exceeded
            detail: >-
              You have exceeded the maximum allowed request rate. Please wait
              before making additional requests.
            action: >-
              Wait 42 seconds before retrying. Consider implementing exponential
              backoff.
            docs: https://leadmagic.io/docs/api-reference/rate-limits
            context:
              limit: 300
              window: 1 minute
              remaining: 0
              reset_at: 1706745642
              retry_after_seconds: 42
        meta:
          request_id: ea6e3248-f4d2-437d-bca3-20881b529129
          timestamp: '2024-02-01T12:00:00.000Z'
    InternalServerError:
      allOf:
        - $ref: '#/components/schemas/ErrorResponse'
      example:
        success: false
        errors:
          - type: https://api.leadmagic.io/errors/INTERNAL_ERROR
            title: >-
              Something went wrong on our end. Our team has been notified and is
              investigating.
            status: 500
            code: INTERNAL_ERROR
            detail: >-
              This is a temporary server error. The issue has been automatically
              reported to our team.
            action: >-
              Wait 30 seconds and retry your request. If the problem persists,
              contact support@leadmagic.io
            docs: https://leadmagic.io/docs/api-reference/errors
        meta:
          request_id: ea6e3248-f4d2-437d-bca3-20881b529129
          timestamp: '2024-02-01T12:00:00.000Z'
    ErrorResponse:
      type: object
      description: RFC 9457 Problem Details error response
      required:
        - success
        - errors
      properties:
        success:
          type: boolean
          example: false
          description: Always false for error responses
        errors:
          type: array
          description: Array of error details (typically one, but can be multiple)
          items:
            $ref: '#/components/schemas/ErrorDetail'
        meta:
          $ref: '#/components/schemas/ResponseMeta'
    ErrorDetail:
      type: object
      description: RFC 9457 compliant error detail
      required:
        - type
        - title
        - status
      properties:
        type:
          type: string
          format: uri
          description: RFC 9457 - URI reference identifying the error type
          example: https://api.leadmagic.io/errors/validation_error
        title:
          type: string
          description: RFC 9457 - Short human-readable summary
          example: Request validation failed. Check your input parameters.
        status:
          type: integer
          description: RFC 9457 - HTTP status code
          example: 400
        detail:
          type: string
          description: RFC 9457 - Human-readable explanation specific to this occurrence
          example: The email field is required but was not provided.
        instance:
          type: string
          format: uri
          description: RFC 9457 - URI reference for this specific occurrence
          example: /v1/people/email-validation#req_abc123
        code:
          type: string
          description: Machine-readable error code for programmatic handling
          example: validation_error
        param:
          type: array
          description: Parameters that caused the error
          items:
            type: string
          example:
            - email
        action:
          type: string
          description: Suggested action to resolve the error
          example: Provide a valid email address in the 'email' field.
        docs:
          type: string
          format: uri
          description: Link to relevant documentation
          example: https://leadmagic.io/docs/api-reference/errors
        context:
          type: object
          description: Additional context specific to this error type
          additionalProperties: true
    ResponseMeta:
      type: object
      description: Metadata included in all responses
      properties:
        request_id:
          type: string
          format: uuid
          description: Unique identifier for this request (use for debugging/support)
          example: ea6e3248-f4d2-437d-bca3-20881b529129
        timestamp:
          type: string
          format: date-time
          description: ISO 8601 timestamp when the response was generated
          example: '2024-02-01T12:00:00.000Z'
        environment:
          type: string
          description: API environment (production, staging)
          example: production
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        Your LeadMagic API key. Header name is case-insensitive (X-API-Key,
        X-API-KEY, x-api-key all work).

````