Skip to main content

Overview

The Anyway REST API allows you to programmatically access your telemetry data, manage projects, and configure your account. Base URL:
https://api.anyway.sh/v1

Authentication

All API requests require authentication using a Bearer token.

Getting an API Key

  1. Log in to your Dashboard
  2. Go to Settings > API Keys
  3. Click Create New Key
  4. Copy your key (it won’t be shown again)

Using the API Key

Include your API key in the Authorization header:
curl https://api.anyway.sh/v1/traces \
  -H "Authorization: Bearer YOUR_API_KEY"
Keep your API keys secure. Never expose them in client-side code or public repositories.

Request Format

  • All requests should use HTTPS
  • Request bodies should be JSON with Content-Type: application/json
  • Timestamps are in ISO 8601 format (UTC)

Response Format

All responses are JSON with the following structure:

Success Response

{
  "data": {
    // Response data here
  },
  "meta": {
    "request_id": "req_abc123",
    "timestamp": "2024-01-15T10:30:00Z"
  }
}

Error Response

{
  "error": {
    "code": "invalid_request",
    "message": "The request body is malformed",
    "details": {}
  },
  "meta": {
    "request_id": "req_abc123",
    "timestamp": "2024-01-15T10:30:00Z"
  }
}

Rate Limits

API requests are rate limited based on your plan:
PlanRate Limit
Free100 requests/minute
Pro1,000 requests/minute
EnterpriseCustom
Rate limit headers are included in all responses:
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 999
X-RateLimit-Reset: 1705315800
When you exceed the rate limit, you’ll receive a 429 Too Many Requests response.

Pagination

List endpoints return paginated results:
curl "https://api.anyway.sh/v1/traces?limit=50&cursor=abc123" \
  -H "Authorization: Bearer YOUR_API_KEY"
Response includes pagination info:
{
  "data": [...],
  "pagination": {
    "limit": 50,
    "has_more": true,
    "next_cursor": "xyz789"
  }
}

SDKs

For most use cases, we recommend using the Python SDK instead of the REST API directly:
pip install anyway-sdk
The SDK handles authentication, retries, and error handling automatically.

API Endpoints

Telemetry

Ingest and query traces and metrics

Projects

Manage projects and settings

API Keys

Create and manage API keys

Webhooks

Configure webhook notifications