CloudFetch
For Developers

API Reference

Complete API documentation for integrating with CloudFetch.

Base URL

https://cloudfetch.app/api/v1

Authentication

All API requests require authentication via Bearer token or API key:

Authorization: Bearer <access_token>
// or
X-API-Key: <your_api_key>

Endpoints

Identity

GET/whoami

Get the authenticated user's profile

Response:
{
  "id": "usr_123",
  "email": "user@example.com",
  "name": "John Doe",
  "avatar_url": "https://..."
}

Entitlements

GET/entitlements

Check user's subscription and feature access

Response:
{
  "user_id": "usr_123",
  "app_id": "app_456",
  "plan": "pro",
  "status": "active",
  "features": ["feature_a", "feature_b"],
  "usage": {
    "api_calls": 1500,
    "limit": 10000
  },
  "expires_at": "2024-12-31T23:59:59Z"
}

OAuth

POST/oauth/token

Exchange authorization code for access token

Request:
{
  "grant_type": "authorization_code",
  "code": "abc123",
  "client_id": "your_client_id",
  "client_secret": "your_client_secret",
  "redirect_uri": "https://your-app.com/callback"
}

Response:
{
  "access_token": "at_...",
  "token_type": "Bearer",
  "expires_in": 3600,
  "refresh_token": "rt_..."
}

Rate Limits

API requests are rate limited to ensure fair usage:

  • Test keys: 100 requests/minute
  • Live keys: 1,000 requests/minute