API Keys & Settings
API keys authenticate your services to the ScryWatch ingest API. Manage them, rotate them, and view usage stats from the Settings page.
What you’ll need
- An account with at least Member role
Step 1: Open Settings
Click Settings in the left sidebar.
The settings page has sections:
- API Keys — create, list, and revoke keys for this project
- Instance Info — worker URL, storage usage, daily event count
- Danger Zone — purge all hot logs (irreversible)
- Profile — change your name and password
Step 2: Create an API key
Click Create API Key.
Enter a label for the key — something descriptive like production-api-worker or github-actions.
Click Create. The key is displayed once — copy it now and store it securely (e.g. in your CI/CD secrets manager).
Warning: The key is only shown at creation time. If you lose it, you’ll need to create a new one and revoke the old one.
Each API key is scoped to the current project. A key from Project A cannot send events to Project B.
Step 3: Use the API key
Pass the key as a Bearer token in the Authorization header:
curl -X POST https://api.scrywatch.com/api/ingest \
-H "Authorization: Bearer <your-api-key>" \
-H "Content-Type: application/json" \
-d '{"events": [{"level": "info", "message": "test", "timestamp": 1700000000000}]}'
The same key works for all ingest endpoints: events, metrics, traces, and deploys.
Step 4: Revoke a key
Find the key in the API Keys list and click Revoke.
Revoked keys stop working immediately. Any service using the revoked key will start receiving 401 Unauthorized responses.
After revoking, create a new key and update your service configuration.
Tip: Rotate API keys periodically as a security best practice. Create the new key first, update your services, then revoke the old key — this avoids any downtime during rotation.
Step 5: View instance info
Scroll to Instance Info to see:
- Worker URL — the API endpoint for your project
- Storage — approximate bytes used in hot storage
- Daily events — events ingested in the last 24 hours
Use the daily events count to track usage against your plan limit.
Step 6: Change your password
In the Profile section, enter your current password and a new password.
Click Update. Your session remains active — you don’t need to log in again.
Step 7: Purge hot logs (danger zone)
Warning: This permanently deletes all events in hot storage for this project. This cannot be undone.
In the Danger Zone, click Purge Logs.
Type the project name to confirm, then click Purge. All events in the hot D1 database for this project are deleted immediately.
Use this only if you need to completely clear a test project or start fresh.
You’re done
You now know how to:
- Create API keys for your services
- Use keys in the Authorization header
- Revoke keys and rotate them safely
- View storage and event count stats
- Change your account password
Related docs
API key management and authentication reference — all authentication methods and scoping rules.