POST
/
data-sources
curl --request POST \
  --url https://apigcp.trynia.ai/v2/data-sources \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "url": "https://docs.example.com",
  "url_patterns": [
    "https://docs.example.com/api/*",
    "https://docs.example.com/guides/*"
  ],
  "project_id": "<string>",
  "max_age": 123,
  "formats": [
    "markdown",
    "html"
  ],
  "only_main_content": true
}'
{
  "id": "<string>",
  "url": "<string>",
  "status": "pending",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "page_count": 0,
  "project_id": "<string>",
  "source_type": "web",
  "is_active": true
}

Authorizations

Authorization
string
header
required

API key must be provided in the Authorization header

Body

application/json

Response

200
application/json

Data source indexing started successfully

The response is of type object.