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

# Generate Inbox Draft

> Generate and persist one Content Inbox draft for review.

Free surface (V3.2a re-gate): reachable by any org with the product flag on, NOT
gated by the $20/mo add-on entitlement. Free-tier LLM spend is bounded by the
per-(org, user) weekly generation cap (V3.2b, ``FREE_TIER_WEEKLY_GENERATION_CAP``
generations per ET calendar week), checked HERE as a PRECHECK before the billable
Gemini call so an over-cap free user's request 402s before any LLM spend happens
(``ContentDraftService.create_content_draft`` re-checks it as a backstop only).
Paid/comped orgs are uncapped.



## OpenAPI

````yaml https://api.bavlio.com/openapi.json post /api/v1/content/inbox/generate
openapi: 3.1.0
info:
  title: Bavlio API
  description: >-
    Outreach automation API — lead enrichment, email campaigns, LinkedIn
    automation, and AI agent. Full docs at https://docs.bavlio.com.
  version: 1.0.0
  x-guidance:
    product: Bavlio Data API
    protocols:
      - x402
    description: >-
      Pay-per-call B2B data endpoints for AI agents. USDC on Base mainnet via
      x402 v2. See /openapi.json for pricing. Landing page + marketing details:
      https://bavlio.com/developers
    network: eip155:8453
    docs_url: https://docs.bavlio.com
  x-payment-merchant-address: '0xcca4725e0e931982830bff523b141e1a7a58d3e7'
servers: []
security: []
tags:
  - name: API Keys
    description: >-
      Create, list, and revoke API keys for programmatic access. JWT
      authentication required.
  - name: credits
    description: Credit balance, cost estimates, and transaction history.
  - name: campaigns
    description: Create, manage, launch, and monitor email campaigns.
  - name: campaign-personalization
    description: AI-powered email subject and body personalization for campaigns.
  - name: email-finder
    description: Find and verify email addresses for prospects.
  - name: sender-profiles
    description: Manage sender identity profiles for outreach.
  - name: sender-profile-chat
    description: Interactive chat for building sender profiles.
  - name: templates
    description: Email template CRUD.
  - name: suppression
    description: Do-not-contact suppression list management.
  - name: datasets
    description: Lead dataset listing, download, and updates.
  - name: user-extractions
    description: Uploaded lead file management and processing.
  - name: enrichment-chat
    description: Interactive chat for data enrichment sessions.
  - name: enrichment-processing
    description: Batch lead enrichment processing.
  - name: File Upload (CSV/Excel)
    description: Upload and preview CSV/Excel lead files.
  - name: connected-accounts
    description: LinkedIn account connections via Unipile.
  - name: linkedin-content
    description: LinkedIn post creation, scheduling, and management.
  - name: linkedin-playground
    description: Direct LinkedIn actions (profile lookup, messaging, engagement).
  - name: bavimail-proxy
    description: BaviMail domain, alias, and email management.
  - name: agent
    description: Bavi AI agent chat with SSE streaming.
  - name: notifications
    description: Notification preferences and delivery.
  - name: referral
    description: Referral code management and stats.
  - name: feedback
    description: User feedback submission.
  - name: authentication
    description: JWT token verification and user info.
  - name: users
    description: User quota and usage information.
  - name: Health
    description: Health checks and system status.
  - name: Personalization
    description: Core lead personalization engine.
  - name: Session Management
    description: Enrichment session lifecycle.
  - name: Session Processing
    description: Session data processing.
  - name: webhooks
    description: Inbound webhook handlers (Stripe, BaviMail, Unipile).
paths:
  /api/v1/content/inbox/generate:
    post:
      tags:
        - content_inbox
      summary: Generate Inbox Draft
      description: >-
        Generate and persist one Content Inbox draft for review.


        Free surface (V3.2a re-gate): reachable by any org with the product flag
        on, NOT

        gated by the $20/mo add-on entitlement. Free-tier LLM spend is bounded
        by the

        per-(org, user) weekly generation cap (V3.2b,
        ``FREE_TIER_WEEKLY_GENERATION_CAP``

        generations per ET calendar week), checked HERE as a PRECHECK before the
        billable

        Gemini call so an over-cap free user's request 402s before any LLM spend
        happens

        (``ContentDraftService.create_content_draft`` re-checks it as a backstop
        only).

        Paid/comped orgs are uncapped.
      operationId: generate_inbox_draft_api_v1_content_inbox_generate_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ContentDraftGenerateRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContentDraftResponse'
        '401':
          description: Unauthorized
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    ContentDraftGenerateRequest:
      properties:
        topic:
          type: string
          maxLength: 1200
          minLength: 3
          title: Topic
        signal_ref:
          anyOf:
            - type: string
              maxLength: 300
              minLength: 3
            - type: 'null'
          title: Signal Ref
          description: >-
            Optional source-card ref from /content/signals/suggestions. When
            set, generation is grounded in that org-scoped signal's copied
            facts.
        media_asset_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Media Asset Id
        media_asset_ids:
          items:
            type: string
            format: uuid
          type: array
          maxItems: 20
          title: Media Asset Ids
        platforms:
          anyOf:
            - items:
                type: string
                enum:
                  - linkedin
                  - x
              type: array
              maxItems: 2
              minItems: 1
            - type: 'null'
          title: Platforms
          description: >-
            Target platforms for the draft. Omit to use all default platforms.
            LinkedIn and X are generated by default today.
        idempotency_key:
          type: string
          maxLength: 120
          minLength: 8
          title: Idempotency Key
      type: object
      required:
        - topic
        - idempotency_key
      title: ContentDraftGenerateRequest
      description: Generate and persist a new Inbox draft from a customer topic/seed.
    ContentDraftResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        status:
          type: string
          enum:
            - pending
            - approved
            - denied
            - snoozed
            - scheduled
          title: Status
        linkedin_body:
          anyOf:
            - type: string
            - type: 'null'
          title: Linkedin Body
        x_body:
          anyOf:
            - type: string
            - type: 'null'
          title: X Body
        media_asset_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Media Asset Id
        media_asset_ids:
          items:
            type: string
            format: uuid
          type: array
          title: Media Asset Ids
        scheduled_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Scheduled At
        voice_config_snapshot:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Voice Config Snapshot
        source:
          anyOf:
            - type: string
            - type: 'null'
          title: Source
        topic:
          anyOf:
            - type: string
            - type: 'null'
          title: Topic
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
      type: object
      required:
        - id
        - status
        - created_at
        - updated_at
      title: ContentDraftResponse
      description: >-
        A single Inbox draft card (list-row + get + action responses).


        NEVER includes ``dedupe_key`` (internal CAS key).
        ``voice_config_snapshot`` is the

        voice config stamped at generate time (E3.1); the UI may render it
        read-only.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.