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

# Bulk create facts

> Creates multiple facts in a single request.



## OpenAPI

````yaml https://app.stainless.com/api/spec/documented/avido/openapi.documented.yml post /v0/facts/bulk
openapi: 3.1.1
info:
  title: Avido API
  description: >-
    Avido's API for LLM usage events, tool calls, trace management, webhook
    validation, and more. See each endpoint's request/response schema for
    details.
  version: 0.1.0
  contact:
    name: Avido Support
    email: support@avidoai.com
    url: https://avidoai.com/support
servers:
  - url: https://api.avidoai.com
    description: Production API
security:
  - ApiKey: []
    ApplicationId: []
paths:
  /v0/facts/bulk:
    post:
      tags:
        - Facts
      summary: Bulk create facts
      description: Creates multiple facts in a single request.
      operationId: createFactsBulk
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateFactsRequest'
      responses:
        '201':
          description: Successfully created facts
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkFactResponse'
        '400':
          description: bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: invalid input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '500':
          description: internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    CreateFactsRequest:
      type: object
      properties:
        facts:
          minItems: 1
          maxItems: 1000
          type: array
          items:
            $ref: '#/components/schemas/CreateFactRequest'
          description: Array of facts to create
      required:
        - facts
      additionalProperties: false
      title: CreateFactsRequest
      description: Request body for bulk creating facts
    BulkFactResponse:
      type: object
      properties:
        count:
          type: integer
          minimum: 0
          maximum: 9007199254740991
          description: Number of facts created
          example: 5
      required:
        - count
      additionalProperties: false
      title: Bulk Fact Response
      description: Response for bulk fact creation
    ErrorResponse:
      type: object
      properties:
        message:
          type: string
          description: A human-readable error message explaining the error.
          example: Resource not found
      required:
        - message
      additionalProperties: false
      title: ErrorResponse
      description: Standard error format for failed API operations.
    ValidationErrorResponse:
      type: object
      properties:
        message:
          type: string
          description: A human-readable error message indicating what went wrong.
          example: Invalid request data
        issues:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
              message:
                type: string
              path:
                type: array
                items:
                  type: string
            required:
              - code
              - message
              - path
            additionalProperties: false
          description: Array of detailed validation error objects.
          example:
            - code: invalid_string
              message: Invalid UUID
              path:
                - id
      required:
        - message
        - issues
      additionalProperties: false
      title: ValidationErrorResponse
      description: Details about validation errors in incoming requests.
    CreateFactRequest:
      type: object
      properties:
        statement:
          type: string
          minLength: 1
          maxLength: 10000
          description: The fact statement text
          example: The refund policy allows returns within 30 days of purchase.
        scope:
          type: string
          enum:
            - TOPIC
            - APPLICATION
          description: >-
            The scope of the fact. TOPIC means it applies to specific topics,
            APPLICATION means it applies globally.
          example: TOPIC
        status:
          description: The initial status (defaults to DRAFT)
          type: string
          enum:
            - DRAFT
            - ACTIVE
          example: ACTIVE
        sourceQuote:
          description: The original quote from the source document
          example: Returns are accepted within 30 days.
          nullable: true
          anyOf:
            - type: string
              maxLength: 10000
            - type: 'null'
        sourceDocumentId:
          description: The ID of the source document
          example: 123e4567-e89b-12d3-a456-426614174000
          nullable: true
          anyOf:
            - type: string
              format: uuid
              pattern: >-
                ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
            - type: 'null'
        quickstartId:
          description: The ID of the associated quickstart
          example: 123e4567-e89b-12d3-a456-426614174000
          nullable: true
          anyOf:
            - type: string
              format: uuid
              pattern: >-
                ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
            - type: 'null'
        generatedBy:
          description: How the fact was generated (defaults to MANUAL)
          type: string
          enum:
            - MANUAL
            - QUICKSTART
          example: MANUAL
        topicIds:
          description: Topic IDs to link this fact to
          maxItems: 100
          type: array
          items:
            type: string
            format: uuid
            pattern: >-
              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
      required:
        - statement
        - scope
      additionalProperties: false
      title: CreateFactRequest
      description: Request body for creating a new fact
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: Your unique Avido API key
    ApplicationId:
      type: apiKey
      in: header
      name: x-application-id
      description: Your unique Avido Application ID

````