Skip to main content
POST
/
sources
/
subscribe
Subscribe to a global source
curl --request POST \
  --url https://apigcp.trynia.ai/v2/sources/subscribe \
  --header 'Content-Type: application/json' \
  --data '
{
  "url": "<string>",
  "source_type": "repository",
  "ref": "<string>"
}
'
{
  "action": "<string>",
  "message": "<string>",
  "global_source_id": "<string>",
  "namespace": "<string>",
  "status": "<string>",
  "local_reference_id": "<string>",
  "display_name": "<string>"
}

Body

application/json

Request model for subscribing to a global source

url
string
required

URL of the source (GitHub repo, docs URL, arXiv URL/ID, or HuggingFace dataset URL)

source_type
enum<string> | null

Source type. Auto-detected from URL if not provided.

Available options:
repository,
documentation,
research_paper,
huggingface_dataset
ref
string | null

Git ref for repositories (branch, tag, or commit SHA)

Response

Successful Response

Response model for global source subscription

action
string
required

Action taken: instant_access | wait_for_indexing | not_indexed | use_private | indexing_started

message
string
required

Human-readable description of the action

global_source_id
string | null

Canonical ID of the global source

namespace
string | null

TurboPuffer namespace for the source

status
string | null

Current status of the global source

local_reference_id
string | null

ID of the created local reference (project/data_source)

display_name
string | null

Display name of the source