Skip to main content
POST
Get public metrics for organizations
This endpoint is deprecated. Please use the new RESTful endpoint GET /organization/metrics instead. This endpoint will be removed in a future version.

Quick Start

Authentication

Include your API key in the Authorization header:

Example Request

Access Control

The API enforces strict access control based on your API key type:
  1. Organization API Keys:
    • Can only access metrics for their associated organization
    • Must match the organizationSlug exactly
    • Example: An API key for “acme-org” can only query metrics for “acme-org”
  2. User API Keys:
    • Can access metrics for any organization where the user is a member
    • Requires the user to be an active member of the queried organization
    • Example: A user who is a member of both “acme-org” and “beta-org” can query metrics for both organizations
If you attempt to query an organization without proper permissions, you will receive a 403 Forbidden error with the message: “You do not have permission to access metrics for this organization”

Example Implementation

API Details

Request Parameters

Response Format

Error Handling

Notes

  • If no date range is provided, metrics will be returned for all time
  • The API only returns metrics for a single organization per request
  • Organization API keys can only access metrics for their associated organization
  • User API keys can access metrics for any organization where the user is a member
  • To query multiple organizations, you must use a user API key and ensure the user is a member of all organizations you wish to query

Authorizations

X-API-KEY
string
header
required

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.

Body

application/json
organizationSlug
string
required
brandSlug
string
startDate
string
endDate
string

Response

Successful response

metrics
object
required
blockedByType
object[]
required
blockedByDay
object[]
required