leadmagic-io Analytics API
Monitor your API usage with comprehensive analytics endpoints (FREE - no credits consumed)
Monitor your API usage with comprehensive analytics endpoints (FREE - no credits consumed)
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/leadmagic-io:leadmagic-io-analytics-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: Leadmagic Io Analytics API
version: 1.4.35
contact:
name: LeadMagic Support
email: support@leadmagic.io
url: https://leadmagic.io
termsOfService: https://leadmagic.io/legal/terms
description: 'Operations tagged Analytics across 2 of this provider''s published API definitions: leadmagic-io-leadmagic-openapi-3-1-openapi.json, leadmagic-io-openapi.json. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.leadmagic.io
description: Production API Server
security:
- ApiKeyAuth: []
tags:
- name: Analytics
description: Monitor your API usage with comprehensive analytics endpoints (FREE - no credits consumed)
paths:
/v1/analytics/dashboard:
get:
summary: Dashboard Overview
description: Get a real-time snapshot of your account including credits, rate limits, and usage statistics.
operationId: analytics-dashboard
tags:
- Analytics
responses:
'200':
description: Dashboard data retrieved successfully
content:
application/json:
schema:
type: object
properties:
user:
type: object
properties:
id:
type: string
email:
type: string
credits:
type: object
properties:
current:
type: number
formatted:
type: string
rate_limit:
type: object
properties:
minute:
type: object
properties:
limit:
type: integer
used:
type: integer
remaining:
type: integer
utilization:
type: number
daily:
type: object
properties:
limit:
type: integer
used:
type: integer
remaining:
type: integer
utilization:
type: number
concurrency:
type: object
properties:
current:
type: integer
peak:
type: integer
active_reservations:
type: integer
stats:
type: object
properties:
today:
type: object
properties:
requests:
type: integer
credits:
type: number
chargeable_requests:
type: integer
chargeable_rate:
type: number
unique_products:
type: integer
this_week:
type: object
properties:
requests:
type: integer
credits:
type: number
chargeable_requests:
type: integer
chargeable_rate:
type: number
unique_products:
type: integer
this_month:
type: object
properties:
requests:
type: integer
credits:
type: number
chargeable_requests:
type: integer
chargeable_rate:
type: number
unique_products:
type: integer
'401':
$ref: '#/components/responses/Unauthorized'
servers:
- url: https://api.leadmagic.io
description: Production API Server
/v1/analytics/usage:
get:
summary: Usage Summary
description: Get daily usage summary with requests, credits consumed, and chargeable rates.
operationId: analytics-usage
tags:
- Analytics
parameters:
- name: days
in: query
description: Number of days to include (1-90)
schema:
type: integer
minimum: 1
maximum: 90
default: 30
responses:
'200':
description: Usage summary retrieved successfully
content:
application/json:
schema:
type: object
properties:
period:
type: object
properties:
start:
type: string
format: date
end:
type: string
format: date
days:
type: integer
summary:
type: object
properties:
total_requests:
type: integer
chargeable_requests:
type: integer
total_credits:
type: number
avg_credits_per_request:
type: number
chargeable_rate:
type: number
unique_products:
type: integer
daily:
type: array
items:
type: object
properties:
date:
type: string
format: date
total_requests:
type: integer
chargeable_requests:
type: integer
total_credits:
type: number
unique_products_used:
type: integer
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
servers:
- url: https://api.leadmagic.io
description: Production API Server
/v1/analytics/products:
get:
summary: Products Breakdown
description: Get per-product usage with requests, credits, and success rates.
operationId: analytics-products
tags:
- Analytics
parameters:
- name: days
in: query
description: Number of days to include (1-90)
schema:
type: integer
minimum: 1
maximum: 90
default: 30
responses:
'200':
description: Products breakdown retrieved successfully
content:
application/json:
schema:
type: object
properties:
period:
type: object
properties:
start:
type: string
format: date
end:
type: string
format: date
days:
type: integer
products:
type: object
additionalProperties:
type: object
properties:
total_requests:
type: integer
total_credits:
type: number
successful_requests:
type: integer
failed_requests:
type: integer
success_rate:
type: number
avg_credits_per_request:
type: number
daily:
type: array
items:
type: object
'401':
$ref: '#/components/responses/Unauthorized'
servers:
- url: https://api.leadmagic.io
description: Production API Server
/v1/analytics/credits:
get:
summary: Credit History
description: Get credit consumption history with daily breakdown.
operationId: analytics-credits
tags:
- Analytics
parameters:
- name: days
in: query
description: Number of days to include (1-90)
schema:
type: integer
minimum: 1
maximum: 90
default: 30
responses:
'200':
description: Credit history retrieved successfully
content:
application/json:
schema:
type: object
properties:
period:
type: object
properties:
start:
type: string
format: date
end:
type: string
format: date
days:
type: integer
summary:
type: object
properties:
total_credits:
type: number
total_requests:
type: integer
chargeable_requests:
type: integer
avg_credits_per_request:
type: number
chargeable_rate:
type: number
daily:
type: array
items:
type: object
properties:
date:
type: string
format: date
total_credits:
type: number
total_requests:
type: integer
chargeable_requests:
type: integer
'401':
$ref: '#/components/responses/Unauthorized'
servers:
- url: https://api.leadmagic.io
description: Production API Server
/v1/analytics/summary:
get:
summary: All-Time Summary
description: Get lifetime statistics for your account.
operationId: analytics-summary
tags:
- Analytics
parameters:
- name: start_date
in: query
description: Start date (YYYY-MM-DD)
schema:
type: string
format: date
- name: end_date
in: query
description: End date (YYYY-MM-DD)
schema:
type: string
format: date
responses:
'200':
description: Summary statistics retrieved successfully
content:
application/json:
schema:
type: object
properties:
total_api_requests:
type: integer
total_credits_consumed:
type: number
unique_products_used:
type: integer
successful_requests:
type: integer
failed_requests:
type: integer
success_rate:
type: number
avg_response_time_ms:
type: number
first_request:
type: string
format: date-time
nullable: true
last_request:
type: string
format: date-time
nullable: true
'401':
$ref: '#/components/responses/Unauthorized'
servers:
- url: https://api.leadmagic.io
description: Production API Server
/v1/analytics/daily:
get:
summary: Daily Metrics
description: Get detailed daily metrics with performance data.
operationId: analytics-daily
tags:
- Analytics
parameters:
- name: days
in: query
description: Number of days to include (1-90)
schema:
type: integer
minimum: 1
maximum: 90
default: 30
responses:
'200':
description: Daily metrics retrieved successfully
content:
application/json:
schema:
type: object
properties:
period:
type: object
properties:
start:
type: string
format: date
end:
type: string
format: date
days:
type: integer
data:
type: array
items:
type: object
properties:
date:
type: string
format: date
total_requests:
type: integer
successful_requests:
type: integer
failed_requests:
type: integer
total_credits:
type: number
p50_latency_ms:
type: number
p95_latency_ms:
type: number
p99_latency_ms:
type: number
error_rate:
type: number
'401':
$ref: '#/components/responses/Unauthorized'
servers:
- url: https://api.leadmagic.io
description: Production API Server
/v1/analytics/day/{date}:
get:
summary: Day Breakdown
description: Get per-product breakdown for a specific day.
operationId: analytics-day
tags:
- Analytics
parameters:
- name: date
in: path
required: true
description: Date in YYYY-MM-DD format
schema:
type: string
format: date
responses:
'200':
description: Day breakdown retrieved successfully
content:
application/json:
schema:
type: object
properties:
date:
type: string
format: date
summary:
type: object
properties:
total_credits:
type: number
total_requests:
type: integer
products_count:
type: integer
products:
type: array
items:
type: object
properties:
product_id:
type: string
requests:
type: integer
credits:
type: number
credits_percentage:
type: number
avg_credits_per_request:
type: number
max_credits:
type: number
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
servers:
- url: https://api.leadmagic.io
description: Production API Server
components:
schemas:
ErrorResponse:
type: object
description: RFC 9457 Problem Details error response
required:
- success
- errors
properties:
success:
type: boolean
description: Always false for error responses
errors:
type: array
description: Array of error details (typically one, but can be multiple)
items:
$ref: '#/components/schemas/ErrorDetail'
meta:
$ref: '#/components/schemas/ResponseMeta'
ValidationError:
allOf:
- $ref: '#/components/schemas/ErrorResponse'
ErrorDetail:
type: object
description: RFC 9457 compliant error detail
required:
- type
- title
- status
properties:
type:
type: string
format: uri
description: RFC 9457 - URI reference identifying the error type
title:
type: string
description: RFC 9457 - Short human-readable summary
status:
type: integer
description: RFC 9457 - HTTP status code
detail:
type: string
description: RFC 9457 - Human-readable explanation specific to this occurrence
instance:
type: string
format: uri-reference
description: RFC 9457 - URI reference for this specific occurrence
code:
type: string
description: Machine-readable error code for programmatic handling
param:
type: array
description: Parameters that caused the error
items:
type: string
action:
type: string
description: Suggested action to resolve the error
docs:
type: string
format: uri
description: Link to relevant documentation
context:
type: object
description: Additional context specific to this error type. 404 route_not_found errors include suggested_endpoint (canonical path to use instead) in this object; validation errors include the offending field and received value.
additionalProperties: true
ResponseMeta:
type: object
description: Metadata included in all responses
properties:
request_id:
type: string
format: uuid
description: Unique identifier for this request (use for debugging/support)
timestamp:
type: string
format: date-time
description: ISO 8601 timestamp when the response was generated
environment:
type: string
description: API environment (production, staging)
MissingAuthenticationError:
allOf:
- $ref: '#/components/schemas/ErrorResponse'
InvalidApiKeyError:
allOf:
- $ref: '#/components/schemas/ErrorResponse'
ErrorResponse_2:
type: object
description: RFC 9457 Problem Details error response
required:
- success
- errors
properties:
success:
type: boolean
example: false
description: Always false for error responses
errors:
type: array
description: Array of error details (typically one, but can be multiple)
items:
$ref: '#/components/schemas/ErrorDetail_2'
meta:
$ref: '#/components/schemas/ResponseMeta_2'
ValidationError_2:
allOf:
- $ref: '#/components/schemas/ErrorResponse_2'
example:
success: false
errors:
- type: https://api.leadmagic.io/errors/validation_error
title: Request validation failed. Check your input parameters.
status: 400
code: validation_error
param:
- email
detail: 'Email format is invalid. Expected format: user@domain.com'
action: Provide a valid email address in the 'email' field.
docs: https://leadmagic.io/docs/v1/making-api-calls#error-handling
meta:
request_id: ea6e3248-f4d2-437d-bca3-20881b529129
timestamp: '2024-02-01T12:00:00.000Z'
ErrorDetail_2:
type: object
description: RFC 9457 compliant error detail
required:
- type
- title
- status
properties:
type:
type: string
format: uri
description: RFC 9457 - URI reference identifying the error type
example: https://api.leadmagic.io/errors/validation_error
title:
type: string
description: RFC 9457 - Short human-readable summary
example: Request validation failed. Check your input parameters.
status:
type: integer
description: RFC 9457 - HTTP status code
example: 400
detail:
type: string
description: RFC 9457 - Human-readable explanation specific to this occurrence
example: The email field is required but was not provided.
instance:
type: string
format: uri-reference
description: RFC 9457 - URI reference for this specific occurrence
example: /v1/people/email-validation#req_abc123
code:
type: string
description: Machine-readable error code for programmatic handling
example: validation_error
param:
type: array
description: Parameters that caused the error
items:
type: string
example:
- email
action:
type: string
description: Suggested action to resolve the error
example: Provide a valid email address in the 'email' field.
docs:
type: string
format: uri
description: Link to relevant documentation
example: https://leadmagic.io/docs/v1/making-api-calls#error-handling
context:
type: object
description: Additional context specific to this error type. 404 route_not_found errors include suggested_endpoint (canonical path to use instead) in this object; validation errors include the offending field and received value.
additionalProperties: true
ResponseMeta_2:
type: object
description: Metadata included in all responses
properties:
request_id:
type: string
format: uuid
description: Unique identifier for this request (use for debugging/support)
example: ea6e3248-f4d2-437d-bca3-20881b529129
timestamp:
type: string
format: date-time
description: ISO 8601 timestamp when the response was generated
example: '2024-02-01T12:00:00.000Z'
environment:
type: string
description: API environment (production, staging)
example: production
MissingAuthenticationError_2:
allOf:
- $ref: '#/components/schemas/ErrorResponse_2'
example:
success: false
errors:
- type: https://api.leadmagic.io/errors/missing_authentication
title: Authentication required. Provide a valid API key in the X-API-Key header (case-insensitive).
status: 401
code: missing_authentication
docs: https://leadmagic.io/docs/v1/authentication
meta:
request_id: ea6e3248-f4d2-437d-bca3-20881b529129
timestamp: '2024-02-01T12:00:00.000Z'
InvalidApiKeyError_2:
allOf:
- $ref: '#/components/schemas/ErrorResponse_2'
example:
success: false
errors:
- type: https://api.leadmagic.io/errors/invalid_api_key
title: Invalid API key. The key does not exist or is incorrect.
status: 401
code: invalid_api_key
docs: https://leadmagic.io/docs/v1/authentication
meta:
request_id: ea6e3248-f4d2-437d-bca3-20881b529129
timestamp: '2024-02-01T12:00:00.000Z'
responses:
BadRequest:
description: 'Bad Request - The request was malformed or contains invalid parameters.
**Common causes:**
- Missing required fields
- Invalid field format (e.g., malformed email)
- Invalid JSON syntax
- Invalid parameter values
'
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ValidationError'
Unauthorized:
description: 'Unauthorized - Authentication failed.
**Common causes:**
- Missing X-API-Key header
- Invalid or expired API key
- Malformed API key
'
content:
application/problem+json:
schema:
oneOf:
- $ref: '#/components/schemas/MissingAuthenticationError'
- $ref: '#/components/schemas/InvalidApiKeyError'
securitySchemes:
ApiKeyAuth:
type: apiKey
in: header
name: X-API-Key
description: Your LeadMagic API key. Header name is case-insensitive (X-API-Key, X-API-KEY, x-api-key all work).
x-refined-from:
- leadmagic-io-leadmagic-openapi-3-1-openapi.json
- leadmagic-io-openapi.json