treg / api

API reference

One base URL, one token. Call any of 122 documented operations, or proxy a real request to any of 2,630 catalogued provider endpoints through /call/.

base https://treg.wrldwide.agency Bearer token auth openapi.json interactive console

How a call works

You make the real upstream request — the provider's own path, its own parameters, its own response. treg injects the credential server-side and relays the answer verbatim. Nothing here models a provider's API, which is why an upstream change does not break us and why the caller never holds a secret.

curl -H "Authorization: Bearer $TREG_TOKEN" \
  "https://treg.wrldwide.agency/call/moz.web.url.metrics"

Prefix any catalogued endpoint id with /call/. If your team has its own key for that provider, treg uses it and the call is not metered; otherwise eligible endpoints are served on treg's key and metered against your prepaid balance at the provider's own rate.

Finding an endpoint

Search by what you want to do, not by vendor: GET /catalog/search?q=backlinks. When several providers can do the same job, /catalog/platforms/{slug} lists them side by side with measured success rate, speed and price. Choosing is yours — treg compares, but it does not route between providers automatically and does not fail over.

The whole catalog is also browsable as pages: /catalog.

Other ways in

/llms.txt is the file to point a coding agent at — it teaches the whole protocol in one fetch. curl -fsSL https://treg.wrldwide.agency/install.sh | sh installs the CLI. The MCP endpoint is at https://treg.wrldwide.agency/mcp. An interactive console for everything below lives at /docs/api.

Endpoints

Authenticated requests carry Authorization: Bearer <token> (or X-Treg-Token). The catalog routes are open and need no token.

DELETE/call/{rest}

Call Tool

rest, x-treg-org
GET/call/{rest}

Call Tool

rest, x-treg-org
OPTIONS/call/{rest}

Call Tool

rest, x-treg-org
PATCH/call/{rest}

Call Tool

rest, x-treg-org
POST/call/{rest}

Call Tool

rest, x-treg-org
PUT/call/{rest}

Call Tool

rest, x-treg-org
GET/catalog/endpoints/{endpoint_id}

Catalog Endpoint

endpoint_id
GET/catalog/platforms

Catalog Platforms

GET/catalog/platforms/{slug}

Catalog Platform

slug, include_hidden
GET/catalog/search

Catalog Search

q, limit
POST/agents/checkin

Agent Checkin

x-treg-org
GET/auth/cli-token

Auth Cli Token

x-treg-org
POST/auth/cli/approve

Auth Cli Approve

GET/auth/cli/orgs

Auth Cli Orgs

GET/auth/cli/poll

Auth Cli Poll

login_id
POST/auth/cli/start

Auth Cli Start

POST/auth/email/start

Auth Email Start

POST/auth/email/verify

Auth Email Verify

GET/auth/github

Auth Github

cli
GET/auth/github/callback

Auth Github Callback

code, state, treg_oauth_state
GET/auth/google

Auth Google

cli
GET/auth/google/callback

Auth Google Callback

code, state, treg_oauth_state
GET/auth/invite-signin

Auth Invite Signin

code, t
POST/auth/invite-signin

Auth Invite Signin Confirm

POST/auth/logout

Auth Logout

GET/auth/me

Auth Me

POST/auth/revoke-tokens

Auth Revoke Tokens

GET/billing

Billing Get

x-treg-org
POST/billing/autotopup

Billing Autotopup

x-treg-org
GET/billing/history

Billing History

limit, x-treg-org
POST/billing/portal

Billing Portal

x-treg-org
POST/billing/topup

Billing Topup

x-treg-org
GET/bundles

List Bundles

x-treg-org
GET/bundles/by-name/{name}

Get Bundle By Name

name, x-treg-org
DELETE/bundles/{bundle_id}

Delete Bundle

bundle_id, x-treg-org
GET/bundles/{bundle_id}

Get Bundle

bundle_id, x-treg-org
PATCH/bundles/{bundle_id}

Update Bundle

bundle_id, x-treg-org
GET/calls

List Calls

limit, days, before_id, x-treg-org
GET/calls/{call_ref}

Get Call

call_ref, x-treg-org
GET/connections

List Connections

x-treg-org
POST/connections/token

Connect With Token

x-treg-org
DELETE/connections/{secret_id}

Revoke Connection

secret_id, x-treg-org
POST/connections/{secret_id}/extra-credential

Set Extra Credential

secret_id, x-treg-org
POST/connections/{secret_id}/resource

Set Connection Resource

secret_id, x-treg-org
GET/connections/{secret_id}/resources

Connection Resources

secret_id, x-treg-org
POST/demo/sandbox

Demo Sandbox Mint

GET/demo/sandbox/live

Demo Sandbox Live

x-treg-org
GET/demo/sandbox/skill

Demo Sandbox Skill

x-treg-org
GET/health

Get Health

x-treg-org
POST/health/run

Run Health

all_orgs, x-treg-org
POST/invites/accept

Accept Invite

GET/invites/mine

My Invites

POST/invites/{invite_id}/accept

Accept My Invite

invite_id
GET/meta

Meta

GET/oauth/callback

Oauth Callback

state, code, error
GET/oauth/providers

Oauth Providers List

POST/oauth/start

Oauth Start

x-treg-org
GET/oauth/status/{state}

Oauth Status

state, x-treg-org
POST/onboard/accept-teammate

Onboard Accept Teammate

x-treg-org
POST/onboard/demo

Onboard Demo

POST/onboard/reset

Onboard Reset

POST/onboard/seed-tool

Onboard Seed Tool

x-treg-org
POST/onboard/skip

Onboard Skip

GET/orgs

List Orgs

x-treg-org
POST/orgs

Create Org

DELETE/orgs/{org_id}

Delete Org

org_id, confirm, x-treg-org
GET/orgs/{org_id}/agents

List Agents

org_id, x-treg-org
POST/orgs/{org_id}/agents

Create Agent

org_id, x-treg-org
GET/orgs/{org_id}/agents/observed

List Observed Agents

org_id, x-treg-org
DELETE/orgs/{org_id}/agents/{user_id}

Revoke Agent

org_id, user_id, x-treg-org
GET/orgs/{org_id}/balance

Org Balance

org_id, limit, offset, x-treg-org
GET/orgs/{org_id}/budgets

List Tag Budgets

org_id, dim, x-treg-org
PUT/orgs/{org_id}/budgets/{dim}

Set Tag Default

org_id, dim, x-treg-org
DELETE/orgs/{org_id}/budgets/{dim}/{val}

Delete Tag Budget

org_id, dim, val, x-treg-org
PUT/orgs/{org_id}/budgets/{dim}/{val}

Set Tag Budget

org_id, dim, val, x-treg-org
GET/orgs/{org_id}/deny

List Deny Rules

org_id, x-treg-org
POST/orgs/{org_id}/deny

Create Deny Rule

org_id, x-treg-org
DELETE/orgs/{org_id}/deny/{rule_id}

Delete Deny Rule

org_id, rule_id, x-treg-org
GET/orgs/{org_id}/invites

List Invites

org_id, x-treg-org
POST/orgs/{org_id}/invites

Create Invite

org_id, x-treg-org
DELETE/orgs/{org_id}/invites/{invite_id}

Revoke Invite

org_id, invite_id, x-treg-org
POST/orgs/{org_id}/leave

Leave Org

org_id, x-treg-org
GET/orgs/{org_id}/members

List Members

org_id, x-treg-org
DELETE/orgs/{org_id}/members/{user_id}

Remove Member

org_id, user_id, x-treg-org
PATCH/orgs/{org_id}/members/{user_id}

Set Member Role

org_id, user_id, x-treg-org
PATCH/orgs/{org_id}/members/{user_id}/access

Set Member Access

org_id, user_id, x-treg-org
PATCH/orgs/{org_id}/members/{user_id}/cap

Set Member Cap

org_id, user_id, x-treg-org
DELETE/orgs/{org_id}/pins

Clear Capability Pin

org_id, capability, x-treg-org
GET/orgs/{org_id}/pins

List Capability Pins

org_id, x-treg-org
POST/orgs/{org_id}/pins

Set Capability Pin

org_id, x-treg-org
GET/orgs/{org_id}/policy/cli-deny

List Cli Deny

org_id, x-treg-org
GET/orgs/{org_id}/projects

List Projects

org_id, x-treg-org
POST/orgs/{org_id}/projects

Create Project

org_id, x-treg-org
DELETE/orgs/{org_id}/projects/{project_id}

Delete Project

org_id, project_id, x-treg-org
DELETE/orgs/{org_id}/public-token

Delete Public Token

org_id, x-treg-org
POST/orgs/{org_id}/public-token

Create Public Token

org_id, x-treg-org
GET/orgs/{org_id}/settings

Get Org Settings

org_id, x-treg-org
PATCH/orgs/{org_id}/settings

Set Org Settings

org_id, x-treg-org
GET/orgs/{org_id}/tag-keys

List Tag Keys

org_id, x-treg-org
GET/orgs/{org_id}/usage

Org Usage

org_id, days, x-treg-org
GET/orgs/{org_id}/usage/by-tag

Usage By Tag

org_id, key, days, x-treg-org
GET/referrals

My Referrals

POST/referrals/code

Mint Referral Code

POST/run

Run Tool Server

x-treg-org
GET/runs

List Runs

limit, x-treg-org
GET/secrets

List Secrets

x-treg-org
POST/secrets

Create Secret

x-treg-org
DELETE/secrets/{secret_id}

Delete Secret

secret_id, x-treg-org
PATCH/secrets/{secret_id}

Update Secret

secret_id, x-treg-org
POST/skills

Register Skill

x-treg-org
POST/skills/analyze

Analyze Skill Folder

x-treg-org
POST/skills/import

Import Skill Folder

x-treg-org
GET/skills/samples

Skill Samples

GET/tools

List Tools

x-treg-org
POST/tools

Create Tool

x-treg-org
GET/tools/by-name/{name}

Get Tool By Name

name, x-treg-org
POST/tools/{name}/grant

Grant Local Run

name, x-treg-org
POST/tools/{name}/run-report

Report Local Run

name, x-treg-org
DELETE/tools/{tool_id}

Delete Tool

tool_id, x-treg-org
PATCH/tools/{tool_id}

Update Tool

tool_id, x-treg-org
GET/usage/me

My Usage

x-treg-org
POST/users

Register User