---
title: "Add Sources To Dataset By Pattern"
method: POST
path: "/knowledge-base/datasets/{dataset_id}/sources/pattern"
tags: ["datasets", "dataset_sources"]
---

# Add Sources To Dataset By Pattern

`POST /knowledge-base/datasets/{dataset_id}/sources/pattern`

## Request

- Base URL: `https://api.anyreach.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.anyreach.ai/knowledge-base/datasets/{dataset_id}/sources/pattern`
- Auth: HTTP bearer

## Path parameters

- `dataset_id` string, uuid, required

## Headers

- `x-anyreach-org` string, nullable: Organization ID for user PATs (pat_ prefix tokens)

## Request body

- AddSourcesByPatternRequestSchema
  - `pattern` string, required
  - `type` 'FILE' | 'URL', required

## Response `200`

Successful Response

- unknown

## Other responses

- `404`: Not found
- `422`: Validation Error

---

[API](https://skmtc.dev/anyreach/apis/anyreach-api.md) - [All operations](https://skmtc.dev/anyreach/apis/anyreach-api/llms.txt) - [OpenAPI document](https://skmtc.dev/anyreach/apis/anyreach-api/revisions/2eddf40c8c93?raw)
