SparkPost Metrics API

The Metrics API from SparkPost — 17 operation(s) for metrics.

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).

Operations 17

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /metrics/ List the metrics API's endpoints · Metrics API Root #
Ask an LLM
“What child endpoints does the SparkPost Metrics API offer?”
“Can I discover the metrics API's structure through its root?”
Tell an agent
List the metrics API endpoints.
Show me the discoverable metrics endpoints.
GET /metrics/deliverability Get deliverability metrics across dimensions · Metrics Summary #
Ask an LLM
“How many emails bounced across all my sending domains last week?”
“Can I see deliverability metrics for a single sending IP?”
Tell an agent
Show deliverability metrics {metrics} from {from} to {to} across all dimensions.
Get {metrics} for campaigns {campaigns} on sending domains {sending_domains} from {from}.
GET /metrics/deliverability/query-filters-schema Get the query filter JSON schema · Advanced Query JSON Schema #
Ask an LLM
“What does the query_filters parameter accept for advanced filtering?”
“Where do I find the JSON Schema for complex metrics filters?”
Tell an agent
Get the query filters JSON Schema.
Show me how to validate the query_filters parameter.
GET /metrics/deliverability/domain Get deliverability metrics by recipient domain · Metrics by Recipient Domain #
Ask an LLM
“How did my emails perform for each recipient domain?”
“Can I see bounce and delivery totals per recipient domain?”
Tell an agent
Show deliverability metrics {metrics} by recipient domain from {from}.
Rank recipient domains by {order_by} for {metrics} between {from} and {to}.
GET /metrics/deliverability/sending-ip Get deliverability metrics by sending IP · Metrics by Sending IP #
Ask an LLM
“Which sending IP had the best deliverability?”
“Can I compare bounce rates across my sending IPs?”
Tell an agent
Show deliverability metrics {metrics} by sending IP from {from}.
Rank sending IPs by {order_by} for {metrics} between {from} and {to}.
GET /metrics/deliverability/ip-pool Get deliverability metrics by IP pool · Metrics by IP Pool #
Ask an LLM
“How is deliverability trending for each IP pool?”
“Can I see metrics grouped by IP pool?”
Tell an agent
Show deliverability metrics {metrics} by IP pool from {from}.
Rank IP pools by {order_by} for {metrics} between {from} and {to}.
GET /metrics/deliverability/sending-domain Get deliverability metrics by sending domain · Metrics by Sending Domain #
Ask an LLM
“How are my sending domains performing in deliverability?”
“Can I see metrics grouped by sending domain?”
Tell an agent
Show deliverability metrics {metrics} by sending domain from {from}.
Rank sending domains by {order_by} for {metrics} between {from} and {to}.
GET /metrics/deliverability/subaccount Get deliverability metrics by subaccount · Metrics by Subaccount #
Ask an LLM
“How is deliverability looking for each subaccount?”
“Can I see metrics grouped by subaccount?”
Tell an agent
Show deliverability metrics {metrics} by subaccount from {from}.
Rank subaccounts by {order_by} for {metrics} between {from} and {to}.
GET /metrics/deliverability/campaign Get deliverability metrics by campaign · Metrics by Campaign #
Ask an LLM
“Which campaign had the highest bounce rate?”
“Can I see metrics grouped by campaign?”
Tell an agent
Show deliverability metrics {metrics} by campaign from {from}.
Rank campaigns by {order_by} for {metrics} between {from} and {to}.
GET /metrics/deliverability/template Get deliverability metrics by template · Metrics by Template #
Ask an LLM
“How did each email template perform?”
“Can I see metrics grouped by template?”
Tell an agent
Show deliverability metrics {metrics} by template from {from}.
Rank templates by {order_by} for {metrics} between {from} and {to}.
GET /metrics/deliverability/watched-domain Get deliverability metrics by watched domain · Metrics by Watched Domain #
Ask an LLM
“How are my watched domains performing?”
“Can I see metrics grouped by watched domain?”
Tell an agent
Show deliverability metrics {metrics} by watched domain from {from}.
Rank watched domains by {order_by} for {metrics} between {from} and {to}.
GET /metrics/deliverability/mailbox-provider Get deliverability metrics by mailbox provider · Metrics by Mailbox Provider #
Ask an LLM
“How are my emails doing in Gmail versus Yahoo?”
“Can I see metrics grouped by mailbox provider?”
Tell an agent
Show deliverability metrics {metrics} by mailbox provider from {from}.
Rank mailbox providers by {order_by} for {metrics} between {from} and {to}.
GET /metrics/deliverability/mailbox-provider-region Get deliverability metrics by region · Metrics by Mailbox Provider Region #
Ask an LLM
“How did my emails perform in each email provider region?”
“Can I compare inbox placement by region over a time range?”
Tell an agent
Show {metrics} by mailbox provider region from {from} to {to}.
List deliverability metrics by region sorted by {order_by}.
GET /metrics/deliverability/time-series Get deliverability metrics over time · Time-Series Metrics #
Ask an LLM
“How has my bounce rate trended day by day?”
“Can I get deliverability metrics as a time series?”
Tell an agent
Show deliverability metrics {metrics} as a time series from {from} to {to}.
Chart {metrics} over time at {precision} precision from {from}.
GET /metrics/deliverability/bounce-reason Get bounce metrics grouped by reason · Bounce Reason Metrics #
Ask an LLM
“What are the most common bounce reasons?”
“Can I see bounce counts broken down by reason?”
Tell an agent
Show bounce metrics grouped by reason from {from}.
List the top {limit} bounce reasons between {from} and {to}.
GET /metrics/deliverability/bounce-reason/domain Get bounce metrics by reason and domain · Bounce Reason Metrics by Domain #
Ask an LLM
“Which domains are bouncing most for each reason?”
“Can I see bounce reasons broken down by recipient domain?”
Tell an agent
Show bounce metrics by reason and domain from {from}.
List the top {limit} bounce reason-domain pairs between {from} and {to}.
GET /metrics/deliverability/subject-campaign Get deliverability metrics by subject campaign · Metrics by Subject Campaign #
Ask an LLM
“Which subject lines send best by campaign?”
“Can I compare deliverability across campaigns subject by subject?”
Tell an agent
Show {metrics} by subject campaign from {from} to {to}.
Compare deliverability of subject campaigns sorted by {order_by}.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • 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.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/sparkpost:sparkpost-metrics-api"
All apis
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.

Get an API 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 Specification

sparkpost-metrics-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: SparkPost Metrics API
  description: Query aggregate email performance metrics including deliveries, bounces, opens, clicks, and spam complaints. Supports filtering by campaign, template, sending domain, and time range.
  version: 1.0.0
  contact:
    name: SparkPost Developer Support
    url: https://developers.sparkpost.com/api/metrics/
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
servers:
- url: https://api.sparkpost.com/api/v1
  description: SparkPost Production API
security:
- ApiKeyAuth: []
tags:
- name: Metrics
paths:
  /metrics/:
    get:
      operationId: getMetricsRoot
      summary: Metrics API Root
      description: Lists available child endpoints for discoverability.
      tags:
      - Metrics
      responses:
        '200':
          description: Available metrics endpoints
  /metrics/deliverability:
    get:
      operationId: getMetricsSummary
      summary: Metrics Summary
      description: Query aggregate deliverability metrics across all sending dimensions.
      tags:
      - Metrics
      parameters:
      - $ref: '#/components/parameters/from'
      - $ref: '#/components/parameters/to'
      - $ref: '#/components/parameters/delimiter'
      - $ref: '#/components/parameters/timezone'
      - $ref: '#/components/parameters/metrics'
      - $ref: '#/components/parameters/domains'
      - $ref: '#/components/parameters/campaigns'
      - $ref: '#/components/parameters/templates'
      - $ref: '#/components/parameters/sending_ips'
      - $ref: '#/components/parameters/ip_pools'
      - $ref: '#/components/parameters/sending_domains'
      - $ref: '#/components/parameters/subaccounts'
      - $ref: '#/components/parameters/mailbox_providers'
      - $ref: '#/components/parameters/mailbox_provider_regions'
      - $ref: '#/components/parameters/subject_campaigns'
      - $ref: '#/components/parameters/precision'
      - $ref: '#/components/parameters/query_filters'
      responses:
        '200':
          description: Aggregate deliverability metrics
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetricsResponse'
  /metrics/deliverability/query-filters-schema:
    get:
      operationId: getQueryFiltersSchema
      summary: Advanced Query JSON Schema
      description: Retrieves the JSON Schema for validating the query_filters parameter.
      tags:
      - Metrics
      responses:
        '200':
          description: JSON Schema for query_filters
  /metrics/deliverability/domain:
    get:
      operationId: getMetricsByDomain
      summary: Metrics by Recipient Domain
      description: Query deliverability metrics grouped by recipient domain.
      tags:
      - Metrics
      parameters:
      - $ref: '#/components/parameters/from'
      - $ref: '#/components/parameters/to'
      - $ref: '#/components/parameters/metrics'
      - $ref: '#/components/parameters/timezone'
      - $ref: '#/components/parameters/limit'
      - $ref: '#/components/parameters/order_by'
      responses:
        '200':
          description: Metrics by recipient domain
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetricsResponse'
  /metrics/deliverability/sending-ip:
    get:
      operationId: getMetricsBySendingIP
      summary: Metrics by Sending IP
      description: Query deliverability metrics grouped by sending IP address.
      tags:
      - Metrics
      parameters:
      - $ref: '#/components/parameters/from'
      - $ref: '#/components/parameters/to'
      - $ref: '#/components/parameters/metrics'
      - $ref: '#/components/parameters/timezone'
      - $ref: '#/components/parameters/limit'
      - $ref: '#/components/parameters/order_by'
      responses:
        '200':
          description: Metrics by sending IP
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetricsResponse'
  /metrics/deliverability/ip-pool:
    get:
      operationId: getMetricsByIPPool
      summary: Metrics by IP Pool
      description: Query deliverability metrics grouped by IP pool.
      tags:
      - Metrics
      parameters:
      - $ref: '#/components/parameters/from'
      - $ref: '#/components/parameters/to'
      - $ref: '#/components/parameters/metrics'
      - $ref: '#/components/parameters/timezone'
      - $ref: '#/components/parameters/limit'
      - $ref: '#/components/parameters/order_by'
      responses:
        '200':
          description: Metrics by IP pool
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetricsResponse'
  /metrics/deliverability/sending-domain:
    get:
      operationId: getMetricsBySendingDomain
      summary: Metrics by Sending Domain
      description: Query deliverability metrics grouped by sending domain.
      tags:
      - Metrics
      parameters:
      - $ref: '#/components/parameters/from'
      - $ref: '#/components/parameters/to'
      - $ref: '#/components/parameters/metrics'
      - $ref: '#/components/parameters/timezone'
      - $ref: '#/components/parameters/limit'
      - $ref: '#/components/parameters/order_by'
      responses:
        '200':
          description: Metrics by sending domain
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetricsResponse'
  /metrics/deliverability/subaccount:
    get:
      operationId: getMetricsBySubaccount
      summary: Metrics by Subaccount
      description: Query deliverability metrics grouped by subaccount.
      tags:
      - Metrics
      parameters:
      - $ref: '#/components/parameters/from'
      - $ref: '#/components/parameters/to'
      - $ref: '#/components/parameters/metrics'
      - $ref: '#/components/parameters/timezone'
      - $ref: '#/components/parameters/limit'
      - $ref: '#/components/parameters/order_by'
      responses:
        '200':
          description: Metrics by subaccount
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetricsResponse'
  /metrics/deliverability/campaign:
    get:
      operationId: getMetricsByCampaign
      summary: Metrics by Campaign
      description: Query deliverability metrics grouped by campaign.
      tags:
      - Metrics
      parameters:
      - $ref: '#/components/parameters/from'
      - $ref: '#/components/parameters/to'
      - $ref: '#/components/parameters/metrics'
      - $ref: '#/components/parameters/timezone'
      - $ref: '#/components/parameters/limit'
      - $ref: '#/components/parameters/order_by'
      responses:
        '200':
          description: Metrics by campaign
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetricsResponse'
  /metrics/deliverability/template:
    get:
      operationId: getMetricsByTemplate
      summary: Metrics by Template
      description: Query deliverability metrics grouped by template.
      tags:
      - Metrics
      parameters:
      - $ref: '#/components/parameters/from'
      - $ref: '#/components/parameters/to'
      - $ref: '#/components/parameters/metrics'
      - $ref: '#/components/parameters/timezone'
      - $ref: '#/components/parameters/limit'
      - $ref: '#/components/parameters/order_by'
      responses:
        '200':
          description: Metrics by template
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetricsResponse'
  /metrics/deliverability/watched-domain:
    get:
      operationId: getMetricsByWatchedDomain
      summary: Metrics by Watched Domain
      description: Query deliverability metrics grouped by watched domain.
      tags:
      - Metrics
      parameters:
      - $ref: '#/components/parameters/from'
      - $ref: '#/components/parameters/to'
      - $ref: '#/components/parameters/metrics'
      - $ref: '#/components/parameters/timezone'
      - $ref: '#/components/parameters/limit'
      - $ref: '#/components/parameters/order_by'
      responses:
        '200':
          description: Metrics by watched domain
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetricsResponse'
  /metrics/deliverability/mailbox-provider:
    get:
      operationId: getMetricsByMailboxProvider
      summary: Metrics by Mailbox Provider
      description: Query deliverability metrics grouped by mailbox provider (e.g., Gmail, Yahoo).
      tags:
      - Metrics
      parameters:
      - $ref: '#/components/parameters/from'
      - $ref: '#/components/parameters/to'
      - $ref: '#/components/parameters/metrics'
      - $ref: '#/components/parameters/timezone'
      - $ref: '#/components/parameters/limit'
      - $ref: '#/components/parameters/order_by'
      responses:
        '200':
          description: Metrics by mailbox provider
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetricsResponse'
  /metrics/deliverability/mailbox-provider-region:
    get:
      operationId: getMetricsByMailboxProviderRegion
      summary: Metrics by Mailbox Provider Region
      description: Query deliverability metrics grouped by mailbox provider region.
      tags:
      - Metrics
      parameters:
      - $ref: '#/components/parameters/from'
      - $ref: '#/components/parameters/to'
      - $ref: '#/components/parameters/metrics'
      - $ref: '#/components/parameters/timezone'
      - $ref: '#/components/parameters/limit'
      - $ref: '#/components/parameters/order_by'
      responses:
        '200':
          description: Metrics by mailbox provider region
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetricsResponse'
  /metrics/deliverability/time-series:
    get:
      operationId: getMetricsTimeSeries
      summary: Time-Series Metrics
      description: Query deliverability metrics over time at specified precision intervals.
      tags:
      - Metrics
      parameters:
      - $ref: '#/components/parameters/from'
      - $ref: '#/components/parameters/to'
      - $ref: '#/components/parameters/metrics'
      - $ref: '#/components/parameters/timezone'
      - name: precision
        in: query
        required: false
        description: Time series precision
        schema:
          type: string
          enum:
          - 1min
          - 5min
          - 15min
          - hour
          - 12hr
          - day
          - week
          - month
      responses:
        '200':
          description: Time-series metrics data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetricsResponse'
  /metrics/deliverability/bounce-reason:
    get:
      operationId: getMetricsByBounceReason
      summary: Bounce Reason Metrics
      description: Query bounce metrics grouped by bounce reason.
      tags:
      - Metrics
      parameters:
      - $ref: '#/components/parameters/from'
      - $ref: '#/components/parameters/to'
      - $ref: '#/components/parameters/timezone'
      - $ref: '#/components/parameters/limit'
      - name: metrics
        in: query
        required: false
        description: Bounce-specific metrics to return
        schema:
          type: string
          example: count_bounce,count_inband_bounce,count_outofband_bounce,count_admin_bounce
      responses:
        '200':
          description: Bounce metrics by reason
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetricsResponse'
  /metrics/deliverability/bounce-reason/domain:
    get:
      operationId: getMetricsByBounceReasonDomain
      summary: Bounce Reason Metrics by Domain
      description: Query bounce metrics grouped by bounce reason and recipient domain.
      tags:
      - Metrics
      parameters:
      - $ref: '#/components/parameters/from'
      - $ref: '#/components/parameters/to'
      - $ref: '#/components/parameters/timezone'
      - $ref: '#/components/parameters/limit'
      responses:
        '200':
          description: Bounce metrics by reason and domain
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetricsResponse'
  /metrics/deliverability/subject-campaign:
    get:
      operationId: getMetricsBySubjectCampaign
      summary: Metrics by Subject Campaign
      description: Query deliverability metrics grouped by subject campaign. Requires deliverability add-on.
      tags:
      - Metrics
      parameters:
      - $ref: '#/components/parameters/from'
      - $ref: '#/components/parameters/to'
      - $ref: '#/components/parameters/metrics'
      - $ref: '#/components/parameters/timezone'
      - $ref: '#/components/parameters/limit'
      - $ref: '#/components/parameters/order_by'
      responses:
        '200':
          description: Metrics by subject campaign
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetricsResponse'
components:
  parameters:
    subaccounts:
      name: subaccounts
      in: query
      required: false
      description: Filter by subaccount IDs
      schema:
        type: string
    subject_campaigns:
      name: subject_campaigns
      in: query
      required: false
      description: Filter by subject campaigns
      schema:
        type: string
    timezone:
      name: timezone
      in: query
      required: false
      description: Timezone for date bucketing (default UTC)
      schema:
        type: string
        default: UTC
    ip_pools:
      name: ip_pools
      in: query
      required: false
      description: Filter by IP pool IDs
      schema:
        type: string
    mailbox_providers:
      name: mailbox_providers
      in: query
      required: false
      description: Filter by mailbox providers
      schema:
        type: string
    mailbox_provider_regions:
      name: mailbox_provider_regions
      in: query
      required: false
      description: Filter by mailbox provider regions
      schema:
        type: string
    delimiter:
      name: delimiter
      in: query
      required: false
      description: List parameter separator (default comma)
      schema:
        type: string
        default: ','
    query_filters:
      name: query_filters
      in: query
      required: false
      description: Advanced filter structure (see /metrics/deliverability/query-filters-schema)
      schema:
        type: string
    order_by:
      name: order_by
      in: query
      required: false
      description: Metric name to sort results by
      schema:
        type: string
    metrics:
      name: metrics
      in: query
      required: true
      description: Comma-delimited list of metrics to return
      schema:
        type: string
    sending_domains:
      name: sending_domains
      in: query
      required: false
      description: Filter by sending domains
      schema:
        type: string
    to:
      name: to
      in: query
      required: false
      description: End datetime (defaults to now)
      schema:
        type: string
        format: date-time
    templates:
      name: templates
      in: query
      required: false
      description: Filter by template IDs
      schema:
        type: string
    limit:
      name: limit
      in: query
      required: false
      description: Maximum number of results (1-10000, default 1000)
      schema:
        type: integer
        minimum: 1
        maximum: 10000
        default: 1000
    from:
      name: from
      in: query
      required: true
      description: Start datetime in YYYY-MM-DDTHH:MM format
      schema:
        type: string
        format: date-time
    campaigns:
      name: campaigns
      in: query
      required: false
      description: Filter by campaign IDs
      schema:
        type: string
    precision:
      name: precision
      in: query
      required: false
      description: Time precision for bucketing results
      schema:
        type: string
        enum:
        - 1min
        - 5min
        - 15min
        - hour
        - day
    sending_ips:
      name: sending_ips
      in: query
      required: false
      description: Filter by sending IP addresses
      schema:
        type: string
    domains:
      name: domains
      in: query
      required: false
      description: Filter by recipient domains
      schema:
        type: string
  schemas:
    MetricsResponse:
      type: object
      properties:
        results:
          type: array
          items:
            type: object
            additionalProperties: true
        total_count:
          type: integer
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization