ABMeter Metrics API
The Metrics API from ABMeter — 2 operation(s) for metrics.
The Metrics API from ABMeter — 2 operation(s) for metrics.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/abmeter-ai:abmeter-ai-metrics-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Abmeter Ai Metrics API
version: 1.0.0
contact:
name: ABMeter Support
email: info@abmeter.com
license:
name: Commercial
url: https://abmeter.ai/terms
description: 'Operations tagged Metrics across 2 of this provider''s published API definitions: spec.yaml, abmeter-ai-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://abmeter.ai/api/v1
description: ABMeter API
security:
- bearerAuth: []
tags:
- name: Metrics
paths:
/metrics:
get:
summary: List metrics
description: 'Retrieve all customer-defined business KPI metrics.
Metrics are formulas over measures that define how to calculate business outcomes.'
security:
- bearerAuth: []
parameters:
- name: query
in: query
required: false
schema:
type: string
description: Search in metric slugs, descriptions, or formulas
responses:
'200':
description: List of metrics
content:
application/json:
example:
- based_on_events:
- purchase
created_at: '2026-01-30T12:00:00Z'
description: Total number of purchases
formula: count(purchase)
slug: purchase-count
updated_at: '2026-01-30T12:00:00Z'
- based_on_events:
- purchase
created_at: '2026-01-30T12:00:00Z'
description: Sum of all purchase amounts
formula: sum(purchase.amount)
slug: total-revenue
updated_at: '2026-01-30T12:00:00Z'
schema:
type: array
items:
$ref: '#/components/schemas/Metric'
tags:
- Metrics
operationId: getMetrics
x-operation-id-source: derived
post:
summary: Create metric
description: 'Create a new customer-defined business KPI metric.
The formula should reference existing event types using measure functions like count(), sum(), avg().'
security:
- bearerAuth: []
parameters: []
responses:
'201':
description: Metric created successfully
'400':
description: Bad request - validation failed
content:
application/json:
example:
error: Bad request
status: 400
details:
slug:
- has already been taken
formula:
- Event type 'something' does not exist
schema:
$ref: '#/components/schemas/Error'
requestBody:
content:
application/json:
schema:
type: object
properties:
slug:
$ref: '#/components/schemas/Slug'
description:
type:
- string
- 'null'
formula:
type: string
required:
- slug
- formula
example:
slug: purchase-count
description: Total number of purchases
formula: count(purchase)
tags:
- Metrics
operationId: postMetrics
x-operation-id-source: derived
servers:
- url: https://abmeter.ai/api/v1
description: ABMeter API
/metrics/{metric_slug}:
parameters:
- name: metric_slug
in: path
schema:
$ref: '#/components/schemas/Slug'
description: The metric slug
required: true
get:
summary: Get metric details
description: Retrieve a specific metric by its slug
security:
- bearerAuth: []
responses:
'200':
description: Metric details
content:
application/json:
example:
based_on_events:
- purchase
created_at: '2026-01-30T12:00:00Z'
description: Total number of purchases
formula: count(purchase)
slug: purchase-count
updated_at: '2026-01-30T12:00:00Z'
schema:
$ref: '#/components/schemas/Metric'
'404':
description: Metric not found
content:
application/json:
example:
error: Metric 'non-existent' not found
status: 404
schema:
$ref: '#/components/schemas/Error'
tags:
- Metrics
operationId: getMetricsByMetricSlug
x-operation-id-source: derived
put:
summary: Update metric
description: Update a metric's description and formula.
security:
- bearerAuth: []
parameters: []
responses:
'200':
description: Metric updated successfully
content:
application/json:
example:
based_on_events:
- purchase
created_at: '2026-01-30T12:00:00Z'
description: Sum of all purchase amounts
formula: sum(purchase.amount)
slug: total-revenue
updated_at: '2026-01-30T12:00:00Z'
schema:
$ref: '#/components/schemas/Metric'
'404':
description: Metric not found
content:
application/json:
example:
error: Metric 'non-existent' not found
status: 404
schema:
$ref: '#/components/schemas/Error'
requestBody:
content:
application/json:
schema:
type: object
properties:
description:
type:
- string
- 'null'
formula:
type: string
required:
- formula
tags:
- Metrics
operationId: putMetricsByMetricSlug
x-operation-id-source: derived
delete:
summary: Delete metric
description: Delete a metric
security:
- bearerAuth: []
responses:
'204':
description: Metric deleted successfully
'404':
description: Metric not found
content:
application/json:
example:
error: Metric 'non-existent' not found
status: 404
tags:
- Metrics
operationId: deleteMetricsByMetricSlug
x-operation-id-source: derived
servers:
- url: https://abmeter.ai/api/v1
description: ABMeter API
components:
schemas:
Error:
type: object
description: 'Standard error response format for all API endpoints
**Important:** The response is ALWAYS an object/hash, never null or any other type.
The `details` field, when present, is ALWAYS an object/hash (e.g., `{}` not `null` or `[]`).
The `details` field may be omitted when there are no additional details to provide.'
properties:
error:
type: string
description: Human-readable error message
code:
type: string
description: Machine-readable error code (optional)
details:
type: object
description: 'Additional error details. When present, ALWAYS an object/hash.
May contain field-specific errors or other structured information.
Examples: `{"name": ["can''t be blank"]}` for validation errors, `{"message": "Invalid state"}` for other errors'
additionalProperties: true
required:
- error
Slug:
type: string
description: 'Standardized identifier for entities used across the API. Recommended format: each entity type has its own prefix pattern followed by a short alphanumeric identifier (e.g., parameter-ab4c, space-main, audience-control).'
Metric:
type: object
description: Customer-defined business KPI with a formula over measures. Metrics combine measures using mathematical expressions.
properties:
slug:
$ref: '#/components/schemas/Slug'
description:
type:
- string
- 'null'
description: Human-readable description of what this metric measures
formula:
type: string
description: Formula expression using measures (e.g., "count(purchase)", "sum(purchase.amount)")
based_on_events:
type: array
items:
type: string
readOnly: true
description: Event type slugs referenced in the formula (derived automatically)
created_at:
type: string
format: date-time
readOnly: true
updated_at:
type: string
format: date-time
readOnly: true
required:
- slug
- formula
securitySchemes:
bearerAuth:
type: http
scheme: bearer
description: API key from the ABMeter dashboard. Pass it in the Authorization header with 'Bearer' prefix.
x-refined-from:
- spec.yaml
- abmeter-ai-openapi.yml