---
title: "Create Source"
method: POST
path: "/insight/{insight_id}/source"
tags: ["sources"]
---

# Create Source

`POST /insight/{insight_id}/source`

## Request

- Base URL: `https://api.overfit.de` (the document declares no server; this is the origin it was published from)
- URL: `https://api.overfit.de/insight/{insight_id}/source`
- Auth: one of:
  - OpenID Connect (`https://auth.okns.de/realms/overfit-products/.well-known/openid-configuration`)
  - API key in header `X-API-Key`

Create a new source. A Source is allways associated with an insight and can not be created without an insight.
Accepts Insight ID (ins_) and SourceCreate Schema as input.

## Path parameters

- `insight_id` string, required

## Request body

- SourceCreate
  - `name` string, nullable
  - `description` string, nullable
  - `public` boolean
  - `source_data` union, required
    - RemoteDocumentData
      - `source_type` 'REMOTE_DOCUMENT', required
      - `url` string, uri, required
      - `keywords` string, nullable
      - `source_alias` string, nullable
    - WebsiteData
      - `source_type` 'WEBSITE', required
      - `url` string, uri, required
      - `keywords` string, nullable
    - DocumentUploadData
      - `source_type` 'DOCUMENT_UPLOAD', required
      - `path` string, nullable
      - `keywords` string, nullable
      - `source_alias` string, nullable

## Response `200`

Successful Response

- Source[]
  - `id` string, required
  - `name` string, nullable
  - `description` string, nullable
  - `insight_id` string, required
  - `time_created` string, date-time, required
  - `source_type` 'WEBSITE' | 'REMOTE_DOCUMENT' | 'SEARCH' | 'DOCUMENT_UPLOAD', required
  - `public` boolean
  - `keywords` string, nullable
  - `path` string, required
  - `length` integer, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/overfit/apis/overfit-insights-revolutionizing-data-retrieval.md) · [All operations](https://skmtc.dev/overfit/apis/overfit-insights-revolutionizing-data-retrieval/llms.txt) · [OpenAPI document](https://skmtc.dev/overfit/apis/overfit-insights-revolutionizing-data-retrieval/revisions/0055f7fe41e5?raw)
