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.
| Parameter | Type | Description |
|---|---|---|
| countryrequired | string | ISO 3166-1 alpha-2 country code (e.g. "DE", "US", "SG") |
| region | string | Specific region within country (e.g. "us-east", "eu-central") |
| duration_seconds | integer | Session 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.
| Parameter | Type | Description |
|---|---|---|
| session_idrequired | string | Session 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.
| Parameter | Type | Description |
|---|---|---|
| emailrequired | string | Email address |
| github_username | string | GitHub handle (optional) |
| agent_framework | string | One of: claude-code, cursor, langchain, crewai, codex, other, none |
| referral_source | string | One of: hn, twitter, direct, other |
| interested_tier | string | One of: free, pro, team, business |
| phone_number | string | Honeypot 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