API Reference

Base URL: https://api.datacork.com/v1. All endpoints require Authorization: Bearer <token>. Full OpenAPI spec: openapi.json.

POST/vpn/connect

Connect to a WireGuard exit node. Returns WireGuard config and session metadata.

ParameterTypeDescription
countryrequiredstringISO 3166-1 alpha-2 country code (e.g. "DE", "US", "SG")
regionstringSpecific region within country (e.g. "us-east", "eu-central")
duration_secondsintegerSession max duration. Default: 3600. Max: 604800 (7d, Pro+)
curl -sX POST https://api.datacork.com/v1/vpn/connect \
  -H "Authorization: Bearer $DATACORK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"country":"DE"}' | jq

# Response:
{
  "session_id": "sess_01hx...",
  "exit_ip": "188.42.x.x",
  "exit_node": "de-fra-01",
  "wireguard_config": "[Interface]\n...",
  "expires_at": "2026-04-27T19:30:00Z",
  "payment_receipt": "rcpt_01hx..."
}

POST/vpn/disconnect

Gracefully terminate a session. Emits a final x402 receipt with egress byte count.

ParameterTypeDescription
session_idrequiredstringSession ID from connect response
curl -sX POST https://api.datacork.com/v1/vpn/disconnect \
  -H "Authorization: Bearer $DATACORK_API_KEY" \
  -d '{"session_id":"sess_01hx..."}'

GET/vpn/nodes

List available exit nodes with latency, load, and PQ support status.

curl -s https://api.datacork.com/v1/vpn/nodes \
  -H "Authorization: Bearer $DATACORK_API_KEY" | jq '.nodes[] | {id,country,latency_ms,pq_enabled}'

GET/sessions

List sessions. Supports cursor-based pagination via ?after=sess_xxx.

curl -s "https://api.datacork.com/v1/sessions?limit=20" \
  -H "Authorization: Bearer $DATACORK_API_KEY" | jq

GET/wireguard/config

Download a WireGuard config for a specific node. Returns application/text (the .conf file content).

POST/waitlist

Submit a waitlist entry. No auth required. Rate limited: 5 requests/IP/hour.

ParameterTypeDescription
emailrequiredstringEmail address
github_usernamestringGitHub handle (optional)
agent_frameworkstringOne of: claude-code, cursor, langchain, crewai, codex, other, none
referral_sourcestringOne of: hn, twitter, direct, other
interested_tierstringOne of: free, pro, team, business
phone_numberstringHoneypot field — must be empty for real submissions
curl -sX POST https://api.datacork.com/waitlist \
  -H "Content-Type: application/json" \
  -d '{"email":"you@example.com","agent_framework":"claude-code"}' | jq

# Response:
{ "message": "You're on the list!", "position": 42 }

GET/receipts

List x402 payment receipts. Filterable by date range and session ID.

curl -s "https://api.datacork.com/v1/receipts?limit=10" \
  -H "Authorization: Bearer $DATACORK_API_KEY" | jq

GET/audit/events

Export signed audit events. Available on Pro+ tiers. Response includes X-Audit-Signature header with Ed25519 signature over the response body.

curl -s "https://api.datacork.com/v1/audit/events?from=2026-04-01&to=2026-04-30" \
  -H "Authorization: Bearer $DATACORK_API_KEY" \
  -o audit-april.jsonl