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

# Create Data Source Endpoint

> B4 — register a data source (kind=upload|s3|database). database kind
accepts credential_ref ONLY -- any password/secret-looking field is
rejected loudly with 422; raw credentials are never stored.



## OpenAPI

````yaml /openapi.json post /v1/provisioning/client-profiles/{client_id}/data-sources
openapi: 3.1.0
info:
  description: Causeloop Platform Backend
  title: Causeloop API
  version: 1.0.0
servers: []
security: []
paths:
  /v1/provisioning/client-profiles/{client_id}/data-sources:
    post:
      tags:
        - provisioning-portal
      summary: Create Data Source Endpoint
      description: |-
        B4 — register a data source (kind=upload|s3|database). database kind
        accepts credential_ref ONLY -- any password/secret-looking field is
        rejected loudly with 422; raw credentials are never stored.
      operationId: >-
        create_data_source_endpoint_v1_provisioning_client_profiles__client_id__data_sources_post
      parameters:
        - in: path
          name: client_id
          required: true
          schema:
            title: Client Id
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DataSourceCreateRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema: {}
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - HTTPBearer: []
components:
  schemas:
    DataSourceCreateRequest:
      additionalProperties: true
      properties:
        credential_ref:
          anyOf:
            - type: string
            - type: 'null'
          title: Credential Ref
        cross_account_role_arn:
          anyOf:
            - type: string
            - type: 'null'
          title: Cross Account Role Arn
        db_engine:
          anyOf:
            - type: string
            - type: 'null'
          title: Db Engine
        db_host:
          anyOf:
            - type: string
            - type: 'null'
          title: Db Host
        db_schema_table:
          anyOf:
            - type: string
            - type: 'null'
          title: Db Schema Table
        kind:
          title: Kind
          type: string
        s3_region:
          anyOf:
            - type: string
            - type: 'null'
          title: S3 Region
        s3_uri:
          anyOf:
            - type: string
            - type: 'null'
          title: S3 Uri
      required:
        - kind
      title: DataSourceCreateRequest
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    HTTPBearer:
      scheme: bearer
      type: http

````