API Access
The Revenue Shield API is available on the Agency plan. It provides programmatic access to your test data, results, and configuration, enabling integration with your existing monitoring and reporting workflows.
Authentication
API requests are authenticated using API keys. You can generate and manage keys in Settings → API within the Revenue Shield dashboard.
Include your API key in the Authorization header of every request:
Authorization: Bearer rs_your_api_key_here
API keys are scoped to your store. Each key has full read access to your test data and results. You can revoke a key at any time from the settings page.
Base URL
https://api.revenueshield.xyz/v1
Available Endpoints
List Tests
GET /tests
Returns all tests configured for your store, including OOTB and custom tests. Each test object includes the test name, slug, status of the most recent run, and schedule configuration.
Get Test Details
GET /tests/{test_id}
Returns detailed information about a specific test, including its configuration, last run result, and links to the most recent artifacts.
List Test Results
GET /tests/{test_id}/results
Returns the run history for a specific test. Supports pagination via page and per_page query parameters. Each result includes status, timestamp, duration, and artifact URLs.
Optional query parameters:
status— Filter bypassorfailfrom/to— ISO 8601 date range filterpage— Page number (default: 1)per_page— Results per page (default: 25, max: 100)
Get Summary
GET /summary
Returns an aggregate summary of your store's monitoring status, including total tests, pass rate over the last 24 hours, 7 days, and 30 days, and the count of recent failures.
Export Results
GET /export
Returns test results in CSV format for the specified date range. Use the from and to query parameters to define the range. The response is a downloadable CSV file.
Trigger Run
POST /runs
Triggers an immediate test run for all active tests. Returns a run ID that can be used to poll for results. Manual runs triggered via API count toward your monthly allocation.
Webhooks
Growth and Agency plans include webhook support. Configure a webhook URL in Alerts → Webhook to receive HTTP POST requests when events occur.
Supported events:
alert.test— Sent when you click the Test button for your webhook endpoint.test.failed— A test has failed. Payload includes failure details and artifact URLs.test.investigating— Self-healing has started investigating the failure.test.healed— Self-healing resolved the issue.test.failed_to_heal— Self-healing could not resolve the issue.
Webhook payloads are sent as JSON with Content-Type: application/json and User-Agent: RevenueShield-Webhook/1.0. Revenue Shield does not currently send a signature header.
{
"source": "revenue_shield",
"event": "alert.test",
"status": "connected",
"message": "Revenue Shield webhook alerts are working.",
"sent_at": "2026-03-21T11:35:11Z"
}
Rate Limits
API requests are rate-limited to ensure fair usage:
- Agency — 300 requests per minute
Rate limit headers are included in every response:
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 97
X-RateLimit-Reset: 1707235200
If you exceed the rate limit, the API returns a 429 Too Many Requests response. Retry after the number of seconds indicated in the Retry-After header.
Error Handling
The API uses standard HTTP status codes:
200— Success400— Bad request (invalid parameters)401— Unauthorized (missing or invalid API key)403— Forbidden (feature not available on your plan)404— Resource not found429— Rate limit exceeded500— Internal server error
Error responses include a JSON body with a message field describing the issue.