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

# Comprehensive profile dossier for a person

> Comprehensive person dossier. Runs /enrich/contact's adapter set plus Wikipedia and Apify social adapters (Twitter, GitHub, Instagram — conditional on the matching handle in the input), in parallel with a direct Lava News fetch for recent business happenings (last 90 days). xAI Grok synthesizes structured profile fields plus a 2–4 paragraph narrative summary with citations linking the narrative back to source candidates and articles. Charges sum of upstream provider costs + LLM synthesis cost + $0.10 lava-enrich markup. News failure alone does NOT cause a 502 — the endpoint degrades gracefully with the narrative omitting the news section.



## OpenAPI

````yaml /openapi.json post /enrich/profile
openapi: 3.0.0
info:
  title: Lava API
  description: >-
    Lava API enables businesses to implement usage-based billing for AI
    services. This API allows tracking, managing, and billing for third-party AI
    API usage through a forwarding system.
  version: 1.0.0
  contact:
    name: Lava support
    url: https://www.lava.so/contact
servers:
  - url: https://api.lava.so/v1/
    description: Lava API v1
security: []
tags:
  - name: Authentication
  - name: Core Endpoints
  - name: Models
  - name: Services
  - name: Requests
  - name: Wallet
  - name: Payment Methods
  - name: Spend Keys
  - name: Usage
  - name: Checkout Sessions
  - name: Customers
  - name: Plans
  - name: Subscriptions
  - name: Meters
  - name: Webhooks
  - name: Secret Keys
  - name: Credit Bundles
  - name: Gateway Settings
  - name: Skills
  - name: News Data
  - name: Search
  - name: Enrich
paths:
  /enrich/profile:
    post:
      tags:
        - Enrich
      summary: Comprehensive profile dossier for a person
      description: >-
        Comprehensive person dossier. Runs /enrich/contact's adapter set plus
        Wikipedia and Apify social adapters (Twitter, GitHub, Instagram —
        conditional on the matching handle in the input), in parallel with a
        direct Lava News fetch for recent business happenings (last 90 days).
        xAI Grok synthesizes structured profile fields plus a 2–4 paragraph
        narrative summary with citations linking the narrative back to source
        candidates and articles. Charges sum of upstream provider costs + LLM
        synthesis cost + $0.10 lava-enrich markup. News failure alone does NOT
        cause a 502 — the endpoint degrades gracefully with the narrative
        omitting the news section.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EnrichRequestBody'
      responses:
        '200':
          description: >-
            Synthesized profile with structured fields, narrative, citations,
            and per-field provenance. `profile` is null when the synthesizer's
            confidence is below threshold — markup is still charged.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnrichProfileResponse'
        '400':
          description: Person identifier missing or request body invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '502':
          description: >-
            Every person-fanout adapter failed. News failure alone does NOT
            trigger 502 — only person-fanout collapse.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - Auth: []
components:
  schemas:
    EnrichRequestBody:
      type: object
      description: >-
        Person identifiers for /v1/enrich/contact and /v1/enrich/profile. At
        least one strong identifier (email, linkedin_url, phone, twitter_url,
        github_url, instagram_handle) OR name+company is required. Domain-only
        or company-only input returns 400.
      properties:
        email:
          type: string
          nullable: true
        linkedin_url:
          type: string
          nullable: true
        name:
          type: string
          nullable: true
        company:
          type: string
          nullable: true
        phone:
          type: string
          nullable: true
        twitter_url:
          type: string
          nullable: true
          description: >-
            Twitter/X profile URL. When supplied, /profile additionally fans out
            to Apify Twitter scraper.
        github_url:
          type: string
          nullable: true
          description: >-
            GitHub profile URL. When supplied, /profile additionally fans out to
            Apify GitHub scraper.
        instagram_handle:
          type: string
          nullable: true
          description: >-
            Instagram handle (with or without @ prefix). When supplied, /profile
            additionally fans out to Apify Instagram scraper.
        include_connected_crms:
          type: boolean
          nullable: true
          description: >-
            Opt-in flag for adding the caller's connected CRMs
            (HubSpot/Folk/Affinity) to the fanout. Only adapters for services
            the caller has actually connected are added; opt-in does not fan out
            to the universe of CRMs.
    EnrichProfileResponse:
      type: object
      properties:
        profile:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/ProfileResult'
        narrative:
          type: string
          nullable: true
        citations:
          type: array
          items:
            $ref: '#/components/schemas/ProfileCitation'
        sources_failed:
          type: array
          items:
            $ref: '#/components/schemas/EnrichSourceFailed'
        available_connections:
          type: array
          items:
            type: string
        cost:
          $ref: '#/components/schemas/EnrichCost'
      required:
        - profile
        - narrative
        - citations
        - sources_failed
        - available_connections
        - cost
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
              description: Human-readable error message describing what went wrong
              example: Invalid authentication credentials
            code:
              type: string
              description: Machine-readable error code describing what went wrong
              example: forward_token_json_invalid
            status:
              type: integer
              description: HTTP status code of the error
              example: 400
            issues:
              type: array
              items:
                type: object
                properties:
                  path:
                    type: array
                    items:
                      type: string
                    description: Path to the field that caused the validation error
                  message:
                    type: string
                    description: Error message describing the validation issue
                required:
                  - path
                  - message
              description: >-
                Optional array of specific validation issues with their paths
                and messages
              example:
                - path:
                    - model
                  message: 'Missing required field: model'
                - path:
                    - messages
                    - '0'
                    - content
                  message: Invalid message content format
          required:
            - message
            - code
            - status
      required:
        - error
    ProfileResult:
      type: object
      description: >-
        Comprehensive profile record. Subsumes the MergedContact shape plus a
        public bio and per-platform social profile blocks.
      properties:
        name:
          type: string
          nullable: true
        first_name:
          type: string
          nullable: true
        last_name:
          type: string
          nullable: true
        title:
          type: string
          nullable: true
        company:
          type: string
          nullable: true
        company_domain:
          type: string
          nullable: true
        email:
          type: string
          nullable: true
        linkedin_url:
          type: string
          nullable: true
        phone:
          type: string
          nullable: true
        location:
          type: string
          nullable: true
        twitter_url:
          type: string
          nullable: true
        github_url:
          type: string
          nullable: true
        bio:
          type: string
          nullable: true
        twitter:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/SocialProfile'
        github:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/SocialProfile'
        instagram:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/SocialProfile'
        provenance:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
        confidence:
          type: number
    ProfileCitation:
      type: object
      description: >-
        Citation linking a narrative section to a source id (adapter id like
        "wikipedia" or article reference like "news:0").
      properties:
        section:
          type: string
        source_id:
          type: string
        url:
          type: string
          nullable: true
      required:
        - section
        - source_id
    EnrichSourceFailed:
      type: object
      properties:
        provider:
          type: string
        reason:
          type: string
      required:
        - provider
        - reason
    EnrichCost:
      type: object
      description: >-
        Cost breakdown returned on every successful or no-match response.
        `markup` is the flat lava-enrich fee; `breakdown` lists each upstream
        provider's cost as reported by its adapter; `total` is markup +
        sum(breakdown).
      properties:
        total:
          type: string
        markup:
          type: string
        breakdown:
          type: object
          additionalProperties:
            type: string
      required:
        - total
        - markup
        - breakdown
    SocialProfile:
      type: object
      properties:
        handle:
          type: string
        bio:
          type: string
          nullable: true
        recent_posts:
          type: array
          items:
            type: string
        followers:
          type: number
          nullable: true
      required:
        - handle
        - recent_posts
  securitySchemes:
    Auth:
      type: http
      scheme: bearer
      description: >-
        Bearer token authentication used for standard API calls. Format: 'Bearer
        YOUR_API_KEY'

````