Get organization metrics
Organization Metrics
Get Organization Metrics
Get metrics for your organization with optional date range and brand filtering. Organization is determined from your API key.
GET
Get organization metrics
Documentation Index
Fetch the complete documentation index at: https://chainpatrol-knowledge-update-chainpatrol-vs-blockaid-comple.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Retrieve security metrics for your organization, including threat detections, blocked assets, takedowns, and more. This endpoint provides comprehensive analytics about your organization’s security posture. The organization is automatically inferred from your API key.Quick Start
Authentication
Include your API key in theX-API-KEY header:
Example Request
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| brandSlug | string | No | Filter metrics by specific brand. Requires brands-metrics feature flag. |
| startDate | string | No | Start date for metrics (ISO 8601 format). Defaults to beginning of time if not provided. |
| endDate | string | No | End date for metrics (ISO 8601 format). Defaults to current date if not provided. |
Response
Success Response
Response Fields
| Field | Type | Description |
|---|---|---|
| metrics | object | Metrics object containing all security statistics |
| metrics.reports | number | Total number of reports filed |
| metrics.newThreats | number | Number of new threats blocked |
| metrics.threatsWatchlisted | number | Number of threats watchlisted (0 for brand-filtered queries) |
| metrics.takedownsFiled | number | Total number of takedown requests filed |
| metrics.takedownsCompleted | number | Total number of takedowns successfully completed |
| metrics.domainThreats | number | Number of URL/domain threats blocked |
| metrics.twitterThreats | number | Number of Twitter threats blocked |
| metrics.telegramThreats | number | Number of Telegram threats blocked |
| metrics.otherThreats | number | Number of other asset type threats blocked |
| blockedByType | array | Breakdown of blocked threats by asset type |
| blockedByType[].type | string | Type of asset (URL, ADDRESS, TWITTER, etc.) |
| blockedByType[].count | number | Number of threats blocked for this asset type |
| blockedByDay | array | Time series data showing threats blocked per day |
| blockedByDay[].date | string | Date in YYYY-MM-DD format |
| blockedByDay[].count | number | Number of threats blocked on this date |
Metric Types
Organization-Level Metrics (Default)
When nobrandSlug is provided, returns organization-wide metrics:
- Aggregates all proposals, reports, and takedowns for the organization
- Includes threats with status BLOCKED, APPROVED, and AUTO_APPROVED
- Date filtering applies to
createdAttimestamps - Includes all brands under the organization
Brand-Level Metrics (Optional)
WhenbrandSlug is provided (requires brands-metrics feature flag):
- Filters metrics to specific brand via review history
- Queries asset status history to find brand-specific blocked threats
- Uses status history table with brand reviews
- Date filtering for takedowns uses
updatedAttimestamps - Note:
threatsWatchlistedalways returns 0 for brand-scoped queries
Use Cases
Get All-Time Metrics
Retrieve metrics for your organization’s entire history:Get Brand-Specific Metrics
Retrieve metrics filtered to a specific brand:Get Monthly Metrics
Compare Time Periods
Analyze Threat Distribution
Visualize Threats Over Time
Generate Security Dashboard
Export Metrics Report
Error Responses
401 Unauthorized
Returned when the API key is missing, invalid, or doesn’t have organization access:400 Bad Request
Returned when query parameters are invalid:404 Not Found
Returned when brand slug is not found or doesn’t belong to your organization:Best Practices
Date Ranges
- Always use ISO 8601 format for dates:
YYYY-MM-DDTHH:mm:ss.sssZ - Include timezone information (typically UTC with
Zsuffix) - Omit both dates to get all-time metrics
- Use consistent date ranges when comparing periods
Performance
- Cache metrics data with appropriate TTL (e.g., 1 hour for dashboards)
- Use date filters to query specific time periods rather than filtering client-side
- Consider scheduling periodic metric snapshots for historical tracking
Analysis
- Compare metrics across different time periods to identify trends
- Monitor the takedown success rate to assess enforcement effectiveness
- Track threats by asset type to understand attack patterns
Notes
- Organization is automatically determined from your API key
- All timestamps are in ISO 8601 format with UTC timezone
- If no date range is provided, all-time metrics are returned
- Metrics are calculated in real-time based on the specified date range
- The
blockedByTypearray includes all asset types that have blocked threats - The
blockedByDayarray provides time series data for visualization - Brand filtering requires the brands-metrics feature flag
- All queries exclude soft-deleted records
- Date ranges are inclusive
- For brand-filtered queries,
threatsWatchlistedalways returns 0 - Date filtering for takedowns uses different timestamps for brand vs organization queries
Authorizations
Your API key. This is required by most endpoints to access our API programatically. Reach out to us at support@chainpatrol.io to get an API key for your use.