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

# Create a source

> A new source, with channel, purpose, audience and verification ceiling.



## OpenAPI

````yaml openapi/en/control.json POST /v1/sources
openapi: 3.1.0
info:
  title: Niadra control API
  version: '1'
  description: >-
    Tenants, projects, sources, keys, people, configuration and usage. It never
    receives customer content.
servers:
  - url: https://control.api.niadra.com
security: []
paths:
  /v1/sources:
    post:
      summary: Create a source
      description: >-
        Creates a source in a space. Access to memory is denied by default and
        granted by purpose in the policy; the verification ceiling caps what the
        source may declare. Needs the admin role.


        **Authentication.** Person token issued by the control plane
        (`Authorization: Bearer <JWT>`), with the role the operation needs.
      operationId: create_source_v1_sources_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SourceCreate'
            example:
              space_id: 0192f0a0-3d4e-7f50-8b61-7c8d9e0f1a23
              name: Billing agent
              audience: internal_agent
              vendor: in-house
              channel: erp
              purposes:
                - billing
              verification_ceiling: no_customer
              trusted_action_ops:
                - credit
              navigation_enabled: true
              confirms_before_acting: false
              critical: false
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SourceOut'
              example:
                source_id: 0192f0a0-5f60-7172-8d83-9e0f1a2b3c45
                space_id: 0192f0a0-3d4e-7f50-8b61-7c8d9e0f1a23
                name: Billing agent
                audience: internal_agent
                vendor: in-house
                channel: erp
                purposes:
                  - billing
                verification_ceiling: no_customer
                confirms_before_acting: false
                navigation_enabled: true
                trusted_action_ops:
                  - credit
                critical: false
                revoked_at: null
          description: The source.
        '422':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: The request does not match the contract.
      security:
        - personToken: []
components:
  schemas:
    SourceCreate:
      additionalProperties: false
      properties:
        audience:
          $ref: '#/components/schemas/Audience'
          description: >-
            What the source may read, by audience class: a customer-facing
            agent, an internal agent, a human desk and others.
        channel:
          anyOf:
            - maxLength: 256
              minLength: 1
              type: string
            - type: 'null'
          title: Channel
        confirms_before_acting:
          default: false
          title: Confirms Before Acting
          type: boolean
          description: >-
            The agent confirms values before acting, so measurement does not
            count those confirmations as repeated questions.
        critical:
          default: false
          title: Critical
          type: boolean
          description: >-
            Sessions of this source stay out of control groups and always
            receive the memory.
        name:
          maxLength: 256
          minLength: 1
          title: Name
          type: string
        navigation_enabled:
          default: true
          title: Navigation Enabled
          type: boolean
          description: Whether the source may use the history navigation tools.
        purposes:
          items:
            maxLength: 256
            minLength: 1
            type: string
          maxItems: 32
          title: Purposes
          type: array
          description: >-
            Purposes the policy grants access by, such as `customer_service` or
            `billing`.
        space_id:
          format: uuid
          title: Space Id
          type: string
        trusted_action_ops:
          items:
            maxLength: 256
            minLength: 1
            type: string
          maxItems: 64
          title: Trusted Action Ops
          type: array
          description: >-
            Operations whose declared actions this source may use to close open
            items before the system of record confirms them.
        vendor:
          anyOf:
            - maxLength: 256
              minLength: 1
              type: string
            - type: 'null'
          title: Vendor
        verification_ceiling:
          $ref: '#/components/schemas/Verification'
          default: V2
          description: >-
            The highest verification level this source may declare: V2 for
            automated agents, V3 for sources that run OTP, V4 only for human
            desks and systems of record, `no_customer` for internal agents.
      required:
        - space_id
        - name
        - audience
      title: SourceCreate
      type: object
    SourceOut:
      additionalProperties: false
      properties:
        audience:
          $ref: '#/components/schemas/Audience'
        channel:
          anyOf:
            - type: string
            - type: 'null'
          title: Channel
        confirms_before_acting:
          title: Confirms Before Acting
          type: boolean
        critical:
          title: Critical
          type: boolean
        name:
          title: Name
          type: string
        navigation_enabled:
          title: Navigation Enabled
          type: boolean
        purposes:
          items:
            type: string
          title: Purposes
          type: array
        revoked_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Revoked At
        source_id:
          format: uuid
          title: Source Id
          type: string
        space_id:
          format: uuid
          title: Space Id
          type: string
        trusted_action_ops:
          items:
            type: string
          title: Trusted Action Ops
          type: array
        vendor:
          anyOf:
            - type: string
            - type: 'null'
          title: Vendor
        verification_ceiling:
          $ref: '#/components/schemas/Verification'
      required:
        - source_id
        - space_id
        - name
        - audience
        - vendor
        - channel
        - purposes
        - verification_ceiling
        - confirms_before_acting
        - navigation_enabled
        - trusted_action_ops
        - critical
        - revoked_at
      title: SourceOut
      type: object
    Problem:
      additionalProperties: false
      description: RFC 9457 problem details; `code` comes from the versioned error catalog.
      properties:
        code:
          title: Code
          type: string
        detail:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Detail
        request_id:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Request Id
        status:
          title: Status
          type: integer
        title:
          title: Title
          type: string
        type:
          default: about:blank
          title: Type
          type: string
      required:
        - title
        - status
        - code
      title: Problem
      type: object
    Audience:
      enum:
        - customer_agent
        - internal_agent
        - human
        - reviewer
        - analyst
        - trigger_target
        - export
      title: Audience
      type: string
    Verification:
      description: Session verification levels. `no_customer` sits outside the V0-V4 scale.
      enum:
        - V0
        - V1
        - V2
        - V3
        - V4
        - no_customer
      title: Verification
      type: string
  securitySchemes:
    personToken:
      type: http
      scheme: bearer
      bearerFormat: JWT

````