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

# Create URL source

> Create a new URL-based content source. URLs are SSRF-validated (public HTTPS/HTTP only).



## OpenAPI

````yaml /api-reference/openapi.json post /api/content/sources
openapi: 3.1.0
info:
  title: Tedro API
  version: 1.0.0
  description: REST API for the Tedro communication operations platform.
servers:
  - url: https://api.tedro.io
    description: Production
security:
  - sessionCookie: []
    workspaceId: []
paths:
  /api/content/sources:
    post:
      tags:
        - Content
      summary: Create URL source
      description: >-
        Create a new URL-based content source. URLs are SSRF-validated (public
        HTTPS/HTTP only).
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSourceBody'
      responses:
        '201':
          description: Source created and first sync enqueued
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SourceResponse'
        '400':
          description: Bad Request - invalid or missing parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '401':
          description: Unauthorized - missing or invalid session cookie
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden - insufficient role (admin required)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - sessionCookie: []
          workspaceId: []
components:
  schemas:
    CreateSourceBody:
      type: object
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 200
        url:
          type: string
          maxLength: 2000
          format: uri
        crawlMode:
          type: string
          enum:
            - single
            - sitemap
        syncIntervalMs:
          type: integer
          minimum: 3600000
          maximum: 604800000
        maxPages:
          type: integer
          minimum: 1
          maximum: 200
      required:
        - name
        - url
      additionalProperties: false
      description: >-
        Create a URL-type content source. SSRF-validated public HTTPS/HTTP URL
        only.
      example:
        name: Help center
        url: https://help.example.com
        crawlMode: sitemap
        maxPages: 50
    SourceResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
        workspaceId:
          type: string
          format: uuid
        type:
          type: string
        name:
          type: string
        config:
          type:
            - object
            - 'null'
          additionalProperties: {}
        syncStatus:
          type: string
        createdAt:
          type: string
        updatedAt:
          type: string
      required:
        - id
        - workspaceId
        - type
        - name
        - config
        - syncStatus
        - createdAt
        - updatedAt
      additionalProperties: {}
    ValidationErrorResponse:
      type: object
      properties:
        error:
          type: string
        details:
          type: array
          items:
            type: object
            properties:
              path:
                type: string
              message:
                type: string
            required:
              - path
              - message
      required:
        - error
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
      required:
        - error
  securitySchemes:
    sessionCookie:
      type: apiKey
      in: cookie
      name: better-auth.session_token
      description: Session cookie set by Better Auth on sign-in.
    workspaceId:
      type: apiKey
      in: header
      name: x-workspace-id
      description: Workspace UUID. Required on all /api/* endpoints.

````