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

# Create document from URL

> Fetches content from the provided URL and creates a new knowledge base document from it.



## OpenAPI

````yaml /openapi.json post /public/v1/knowledge-base/documents/url
openapi: 3.0.3
info:
  title: Callin Public API
  version: 1.0.0
  description: >-
    The Callin public API lets you programmatically build and manage AI voice
    agents, control their knowledge bases, and retrieve call logs and
    transcripts. All endpoints are versioned under /public/v1.
servers:
  - url: https://api.callin.io/api
    description: API Endpoint
security: []
tags:
  - name: Health
    description: Service availability check. No authentication required.
  - name: Identity
    description: Verify which account is associated with the current API key.
  - name: Agents
    description: Create, retrieve, and update AI voice agents.
  - name: Conversations
    description: List and inspect call logs, transcripts, and conversation details.
  - name: Knowledge Base
    description: Manage documents and groups that agents use during calls.
paths:
  /public/v1/knowledge-base/documents/url:
    post:
      tags:
        - Knowledge Base
      summary: Create document from URL
      description: >-
        Fetches content from the provided URL and creates a new knowledge base
        document from it.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateDocumentFromUrlRequest'
      responses:
        '200':
          description: Document created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessDocumentUrlCreateResponse'
        '400':
          description: Invalid request body
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - ApiKeyHeader: []
        - BearerAuth: []
components:
  schemas:
    CreateDocumentFromUrlRequest:
      type: object
      description: >-
        Add a knowledge document by pointing at a public web page. The agent can
        use this content during calls.
      required:
        - url
        - name
      properties:
        url:
          type: string
          description: >-
            URL to a page of documentation that the agent will have access to in
            order to interact with users.
        name:
          type: string
          description: A custom, human-readable name for the document.
    SuccessDocumentUrlCreateResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
        data:
          $ref: '#/components/schemas/DocumentDetailsUrl'
      description: New URL-based document added to the knowledge base.
    ErrorResponse:
      type: object
      description: >-
        Returned for most client and validation errors. Read `error.message` and
        optional `error.fields` for details.
      properties:
        success:
          type: boolean
          example: false
          description: Always `false` for this shape.
        error:
          type: object
          description: Structured error payload from the API.
          properties:
            code:
              type: string
              description: Stable machine-oriented error code when provided.
            message:
              type: string
              description: Human-readable explanation suitable to show or log.
            status:
              type: integer
              description: HTTP status code echoed for convenience.
            fields:
              type: array
              description: >-
                Optional per-field validation issues (shape is
                endpoint-specific).
              items:
                type: object
    DocumentDetailsUrl:
      type: object
      description: >-
        URL-sourced document. `details` holds only `url`; file fields live only
        on file documents.
      additionalProperties: false
      properties:
        documentId:
          type: string
          description: The ID of the document.
        type:
          type: string
          enum:
            - url
          description: 'Discriminator: URL document.'
        name:
          type: string
          description: The display name of the document.
        details:
          $ref: '#/components/schemas/DocumentUrlDetails'
        metadata:
          type: object
          description: Optional server metadata.
          properties:
            createdAt:
              type: string
              format: date-time
              description: When the document was created.
            createdBy:
              $ref: '#/components/schemas/MetaCreatedBy'
    DocumentUrlDetails:
      type: object
      description: Type-specific payload when `type` is `url` (no file fields).
      additionalProperties: false
      properties:
        url:
          type: string
          description: The source URL of the document.
    MetaCreatedBy:
      type: object
      properties:
        userId:
          type: string
          description: The ID of the user who created the item
        userEmail:
          type: string
          description: The email of the user who created the item
  securitySchemes:
    ApiKeyHeader:
      type: apiKey
      in: header
      name: x-api-key
      description: Send your Callin API key in the `x-api-key` header.
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: 'Same API key as a Bearer token: `Authorization: Bearer <your-api-key>`.'

````