Skip to main content
POST
/
global-sources
/
subscribe
curl --request POST \
  --url https://apigcp.trynia.ai/v2/global-sources/subscribe \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "url": "https://github.com/vercel/ai-sdk"
}
'
{
"action": "instant_access",
"message": "Successfully subscribed to global repository. You can now search it immediately.",
"global_source_id": "github:vercel/ai-sdk",
"namespace": "repo_vercel_ai-sdk",
"status": "indexed",
"local_reference_id": "proj_abc123",
"display_name": "vercel/ai-sdk"
}

Authorizations

Authorization
string
header
required

API key must be provided in the Authorization header

Body

application/json
url
string
required

URL of the source to subscribe to. Supports:

Example:

"https://github.com/vercel/ai-sdk"

source_type
enum<string>

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

Available options:
repository,
documentation,
research_paper,
huggingface_dataset

Response

Subscription processed successfully

action
enum<string>

Action taken:

  • instant_access: Source is indexed and ready for immediate use
  • wait_for_indexing: Source is being indexed, you've been subscribed
  • not_indexed: Source is not indexed, use the index endpoint instead
  • use_private: You have a private index of this source
  • indexing_started: Indexing has been triggered (HuggingFace datasets)
Available options:
instant_access,
wait_for_indexing,
not_indexed,
use_private,
indexing_started
message
string

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 (indexed, indexing, pending, failed)

local_reference_id
string | null

ID of the created local reference (project or data_source)

display_name
string | null

Display name of the source