▪ Free plan: 3 websites with daily snapshots, no card required → ▪ ▪ Free plan: 3 websites, no card →

Account & API keys

These endpoints let you check your account details, current plan, and resource usage without leaving your integration. Useful for building dashboards or validating that your application is connected to the right account.

Account info

Returns your account details including name, email, timezone, and the full plan configuration with limits for monitors, retention, frequency, and features.

GET/v1/account
bash
curl "https://api.snapshotarchive.com/v1/account" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"

Response

200 OK
{
  "data": {
    "id": 1,
    "name": "John Doe",
    "email": "[email protected]",
    "timezone": "UTC",
    "created_at": "2026-01-01T00:00:00Z",
    "plan": {
      "name": "Pro",
      "slug": "pro",
      "monitors_limit": 50,
      "retention_days": 365,
      "min_frequency_minutes": 360,
      "api_access": true,
      "diff_enabled": true,
      "snapshot_package": true
    }
  }
}

Usage stats

Shows how much of your plan's resources you've used — monitors, API keys, and today's snapshot count. Use this to monitor your usage programmatically and alert yourself before hitting limits.

GET/v1/account/usage
bash
curl "https://api.snapshotarchive.com/v1/account/usage" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"

Response

200 OK
{
  "data": {
    "monitors": { "used": 12, "limit": 50, "remaining": 38 },
    "api_keys": { "used": 2, "limit": 5, "remaining": 3 },
    "snapshots_today": 47
  }
}

API Keys

Manage your API keys programmatically. You can create keys for different environments or integrations, restrict them to specific IP addresses, set expiration dates, and revoke compromised keys — all through the API. Each plan allows up to 5 API keys.

List API keys

Returns all API keys on your account. For security, the full key is never returned — only a preview (first 8 characters). Each key shows its active status, IP restrictions, expiration, and when it was last used.

GET/v1/api-keys
bash
curl "https://api.snapshotarchive.com/v1/api-keys" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"

Response

200 OK
{
  "data": [
    {
      "id": 1,
      "name": "Production Key",
      "key_preview": "abc12345...",
      "is_active": true,
      "allowed_ips": ["203.0.113.10"],
      "expires_at": "2027-10-01T00:00:00Z",
      "last_used_at": "2026-10-01T12:00:00Z",
      "created_at": "2026-09-15T10:00:00Z"
    }
  ]
}

Create an API key

Creates a new API key. The response includes the full token — copy it immediately, it's only shown once. You can optionally restrict the key to specific IP addresses and set an expiration date.

POST/v1/api-keys

Request body

FieldTypeRequiredDescription
namestringYesKey name (max 255 chars)
expires_atstringNoExpiration date (ISO 8601, must be in the future)
allowed_ipsarrayNoIP whitelist (max 20 IPs)
bash
curl -X POST https://api.snapshotarchive.com/v1/api-keys \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "name": "CI/CD Pipeline",
    "allowed_ips": ["203.0.113.10"],
    "expires_at": "2027-12-31T23:59:59Z"
  }'

Response

201 Created
{
  "data": {
    "api_key": {
      "id": 2,
      "name": "CI/CD Pipeline",
      "key_preview": "xyz98765...",
      "is_active": true,
      "allowed_ips": ["203.0.113.10"],
      "expires_at": "2027-12-31T23:59:59Z"
    },
    "token": "full-api-key-shown-only-once-copy-it-now..."
  }
}
Save the token immediately. The full API key is only returned in this response. Store it in a secrets manager or environment variable — never commit it to version control.

Update and revoke an API key

PUT /v1/api-keys/{id}

Update a key's name, IP restrictions, active status, or expiration date.

bash
# Add IP restriction
curl -X PUT https://api.snapshotarchive.com/v1/api-keys/2 \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{"allowed_ips": ["203.0.113.10", "198.51.100.20"]}'
DELETE /v1/api-keys/{id}

Revoke an API key. It's deactivated immediately and cannot be used again. Returns 204 No Content. You cannot revoke the key you're currently using for authentication (returns 409).

bash
curl -X DELETE https://api.snapshotarchive.com/v1/api-keys/5 \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"