REST API

REST API

Every tool in GTM Tools is reachable as a POST /api/v0/{tool_name} on the relevant server’s subdomain. Same JSON body shape, same auth header, no MCP client required.

Servers

ServerBase URL
Adminhttps://gtm-tools.sh
Socialshttps://gtm-tools.sh
Datahttps://gtm-tools.sh
Signalshttps://gtm-tools.sh

Authentication

Every request requires a bearer token:

Authorization: Bearer sk_...

The exception is get_api_key, which is the bootstrap path for new accounts.

Tool discovery

GET /api/v0 returns the tool index for a server, including per-tool token costs.

$curl https://api.gtm-tools.sh/api/v0 \
> -H "Authorization: Bearer $GTM_TOOLS_API_KEY"
1{
2 "tools": {
3 "get_linkedin_company_url": { "cost": 2 },
4 "get_linkedin_profile_url": { "cost": 5 },
5 "list_linkedin_company_employees": { "cost": 30 }
6 }
7}

Calling a tool

Every tool accepts a JSON body and returns a JSON object.

$curl -X POST https://api.gtm-tools.sh/api/v0/get_linkedin_company_url \
> -H "Authorization: Bearer $GTM_TOOLS_API_KEY" \
> -H "Content-Type: application/json" \
> -d '{"domain": "siena.cx"}'
1{
2 "url": "https://www.linkedin.com/company/siena-cx",
3 "domain": "siena.cx"
4}

Examples

Search employees with title filters

$curl -X POST https://api.gtm-tools.sh/api/v0/list_linkedin_company_employees \
> -H "Authorization: Bearer $GTM_TOOLS_API_KEY" \
> -H "Content-Type: application/json" \
> -d '{
> "domain": "gorgias.com",
> "title_filters": "(CEO OR CTO OR Founder) NOT intern",
> "limit": 10,
> "page": 1
> }'

Find a professional email

$curl -X POST https://api.gtm-tools.sh/api/v0/get_email \
> -H "Authorization: Bearer $GTM_TOOLS_API_KEY" \
> -H "Content-Type: application/json" \
> -d '{
> "name": "Justin Mares",
> "domain": "kettleandfire.com",
> "input_parameters": {"source": "linkedin"}
> }'

Run all signal detectors

$curl -X POST https://api.gtm-tools.sh/api/v0/detect_signal \
> -H "Authorization: Bearer $GTM_TOOLS_API_KEY" \
> -H "Content-Type: application/json" \
> -d '{"domain": "gymshark.com", "techs": ["zendesk.com", "intercom.com"]}'

Check token balance

$curl https://api.gtm-tools.sh/api/v0/get_token_balance \
> -H "Authorization: Bearer $GTM_TOOLS_API_KEY"

Error codes

StatusMeaningRecovery
400Missing or malformed parametersFix the body and retry
401Invalid or missing bearer tokenRe-issue with get_api_key
402Insufficient token balanceTop up with buy_tokens
404Tool name not found on this serverCheck the URL — wrong subdomain?
429Rate limit hitBack off; honor Retry-After header
5xxUpstream provider issueRetry with exponential backoff

Token charges are reserved at request time and refunded on 5xx failures.

Rate limits

Limits are per-org and depend on plan. Hit a limit and you’ll get 429 Too Many Requests with a Retry-After header. The CLI and SDKs (when available) will honor it automatically.

TypeScript helper

1const KEY = process.env.GTM_TOOLS_API_KEY!;
2
3
4async function call<T>(tool: string, body: unknown = {}): Promise<T> {
5 const res = await fetch(`https://api.gtm-tools.sh/api/v0/${tool}`, {
6 method: "POST",
7 headers: {
8 "Authorization": `Bearer ${KEY}`,
9 "Content-Type": "application/json",
10 },
11 body: JSON.stringify(body),
12 });
13 if (!res.ok) {
14 throw new Error(`${tool} failed: ${res.status} ${await res.text()}`);
15 }
16 return res.json();
17}
18
19const url = await call<{ url: string }>("get_linkedin_company_url", {
20 domain: "siena.cx",
21});

Next steps