> ## Documentation Index
> Fetch the complete documentation index at: https://developer.instantly.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get metrics for multiple broadcasts

> Returns totals for up to 50 broadcasts with a shared time range. A custom range is at most 365 days. An unknown or mistyped broadcast ID returns zeros; `errors` names an ID only when it belongs to another workspace and has data (`not_found`) or could not be read (`fetch_failed`).


Requires one of the following scopes: `email_marketing_metrics:read`, `email_marketing_metrics:all`, `all:read`, `all:all`



## OpenAPI

````yaml https://api.instantly.ai/openapi/api_v2.json post /api/v2/email-marketing/metrics/batch
openapi: 3.1.0
info:
  title: API Explorer
  description: >-
    The entire API V2 documentation is interactive and can be tested here. To
    the right side of every endpoint you will see a box with an example request.
    You can click on the "Try it" button to send a request to the server right
    from the docs. You will need to provide an API key by clicking the
    `ApiKeyAuth_token` blue text.
  version: 2.0.0
servers:
  - url: https://api.instantly.ai
    description: Instantly API Server
security:
  - ApiKeyAuth: []
tags:
  - name: Analytics
    description: Endpoints related to analytics
    x-group: Analytics
  - name: OAuth
    description: >-
      OAuth authentication endpoints for connecting Google and Microsoft email
      accounts
    x-group: OAuth
  - name: Account
    description: An email account that can be used to send campaigns
    x-group: Account
  - name: Campaign
    description: A campaign that can be sent to a list of recipients
    x-group: Campaign
  - name: Email
    description: >-
      A campaign email, a reply, a manually sent email, or any other email
      that's visible in the Unibox
    x-group: Email
  - name: EmailVerification
    description: A single email verification
    x-group: Email Verification
  - name: LeadList
    description: A list used to store leads
    x-group: Lead List
  - name: InboxPlacementTest
    description: An inbox placement test
    x-group: Inbox Placement Test
  - name: InboxPlacementAnalytics
    description: Analytics data for individual emails in inbox placement tests
    x-group: Inbox Placement Analytics
  - name: InboxPlacementBlacklistAndSpamAssassinReport
    description: Report data for an inbox placement test
    x-group: Inbox Placement Blacklist And SpamAssassin Report
  - name: AIInboxManager
    description: An AI Inbox Manager agent
    x-group: AI Inbox Manager
  - name: AIDeliverabilityAgent
    description: An AI Deliverability Agent
    x-group: AI Deliverability Agent
  - name: AILeadFinderAgent
    description: An AI Lead Finder Agent
    x-group: AI Lead Finder Agent
  - name: LocalBusiness
    description: >-
      A local business found by the Local businesses search. Search businesses
      by category and location, then convert them into leads with a verified
      email in a lead list or a campaign.
    x-group: Local Business
  - name: Creator
    description: >-
      A social media creator found by the Creators search. Search creators by
      platform, niche, audience and location, then convert them into leads with
      their email.
    x-group: Creator
  - name: APIKey
    description: API Key
    x-group: API Key
  - name: AccountCampaignMapping
    description: Account Campaign Mapping
    x-group: Account Campaign Mapping
  - name: Lead
    description: A lead entity representing an individual lead
    x-group: Lead
  - name: BackgroundJob
    description: A background job that can be used to perform long-running tasks
    x-group: Background Job
  - name: CustomTag
    description: >-
      A custom tag for organizing and categorizing accounts and campaigns. You
      can use them as filters in apis that list accounts and campaigns.
    x-group: Custom Tag
  - name: CustomTagMapping
    description: >-
      This entity represents a tag being assigned to a specific campaign or
      email account. When an email account is assigned a tag, a new custom tag
      mapping entry is created, which connects the tag (`tag_id` field) with the
      email account (`resource_id` field). You can use it to see which tag si
      connected to which resource.
    x-group: Custom Tag Mapping
  - name: BlockListEntry
    description: A blocked email or domain
    x-group: Block List Entry
  - name: LeadLabel
    description: A custom label for categorizing and managing leads
    x-group: Lead Label
  - name: Workspace
    description: A workspace entity representing a workspace
    x-group: Workspace
  - name: Workflow
    description: >-
      Defines an automation workflow with its configuration, status, and
      associated meta data.
    x-group: Workflow
  - name: SuperSearchEnrichment
    description: >-
      An enrichment can take different forms, such as email enrichment or
      LinkedIn enrichment. Leads may be imported from SuperSearch using the
      dedicated endpoint, or enriched directly within a list or campaign by
      attaching an enrichment to it.
    x-group: SuperSearch Enrichment
  - name: WorkspaceGroupMember
    description: >-
      A member of a workspace group. You can use the endpoints within this
      entity to manage the members of a workspace group.
    x-group: Workspace Group Member
  - name: WorkspaceMember
    description: A member of a workspace with associated user details
    x-group: Workspace Member
  - name: CampaignSubsequence
    description: A subsequence entity representing a follow-up sequence
    x-group: Campaign Subsequence
  - name: AuditLog
    description: Audit log records for tracking system activities
    x-group: Audit Log
  - name: AISalesAgent
    description: >-
      An AI Sales Development Representative that autonomously manages outreach
      campaigns
    x-group: AI Sales Agent
  - name: Webhook
    description: A webhook subscription for receiving event notifications
    x-group: Webhook
  - name: WebhookEvent
    description: A webhook event that was sent or attempted to be sent
    x-group: Webhook Event
  - name: DFYEmailAccountOrder
    description: A Done-For-You email account order
    x-group: DFY Email Account Order
  - name: DomainForwarding
    description: Web forwarding configuration for a domain ordered through Instantly
    x-group: Domain Forwarding
  - name: CustomPromptTemplate
    description: Custom prompt templates for creating custom prompts
    x-group: Custom Prompt Template
  - name: SalesFlow
    description: >-
      Manages how sales users view and interact with campaign and lead lists
      within the sales flow.
    x-group: Sales Flow
  - name: EmailTemplate
    description: A campaign email template
    x-group: Email Template
  - name: WorkspaceBilling
    description: Workspace Billing
    x-group: Workspace Billing
  - name: CRMActions
    description: CRM related actions
    x-group: CRM Actions
  - name: SubscriberGroup
    description: >-
      A group of email marketing subscribers. Optional fields with no value are
      left out of responses. Lists page with `starting_after`: pass the previous
      page's `next_starting_after` until there is none.
    x-group: 'Inbound & Lifecycle: Subscriber Group'
  - name: SubscriberGroupImport
    description: >-
      A CSV import into a subscriber group. Emails already in the group are
      skipped, not updated. Optional fields with no value are left out of
      responses. Lists page with `starting_after`: pass the previous page's
      `next_starting_after` until there is none.
    x-group: 'Inbound & Lifecycle: Subscriber Group Import'
  - name: Subscriber
    description: >-
      An individual contact within a subscriber group. Optional fields with no
      value are left out of responses. Lists page with `starting_after`: pass
      the previous page's `next_starting_after` until there is none.
    x-group: 'Inbound & Lifecycle: Subscriber'
  - name: Segment
    description: >-
      A saved set of rules that selects contacts. Membership is worked out each
      time the segment is used. Optional fields with no value are left out of
      responses. Lists page with `cursor`: pass the previous page's
      `next_cursor` until there is none.
    x-group: 'Inbound & Lifecycle: Segment'
  - name: Broadcast
    description: >-
      An email marketing broadcast campaign. Optional fields with no value are
      left out of responses. Lists page with `starting_after`: pass the previous
      page's `next_starting_after` until there is none.
    x-group: 'Inbound & Lifecycle: Broadcast'
  - name: Domain
    description: >-
      An email sending domain. Optional fields with no value are left out of
      responses. Lists page with `starting_after`: pass the previous page's
      `next_starting_after` until there is none.
    x-group: 'Inbound & Lifecycle: Domain'
  - name: Journey
    description: >-
      A customer journey, triggered by an event or by membership of a segment.
      Optional fields with no value are left out of responses. Lists page with
      `starting_after`: pass the previous page's `next_starting_after` until
      there is none. Step contacts page with `cursor` and `next_cursor` instead.
    x-group: 'Inbound & Lifecycle: Journey'
  - name: EventCatalogEntry
    description: >-
      An event type seen in this workspace, which journey triggers and
      conversions can use. Optional fields with no value are left out of
      responses. Lists page with `starting_after`: pass the previous page's
      `next_starting_after` until there is none.
    x-group: 'Inbound & Lifecycle: Event Catalog Entry'
  - name: Template
    description: >-
      An email marketing template. Optional fields with no value are left out of
      responses. Lists page with `starting_after`: pass the previous page's
      `next_starting_after` until there is none.
    x-group: 'Inbound & Lifecycle: Template'
  - name: TemplateAsset
    description: >-
      An image or file uploaded for use in email templates. Optional fields with
      no value are left out of responses. Lists page with `starting_after`: pass
      the previous page's `next_starting_after` until there is none.
    x-group: 'Inbound & Lifecycle: Template Asset'
  - name: EmailMetrics
    description: >-
      Aggregated email marketing metrics including totals, time-series data, and
      metadata.
    x-group: 'Inbound & Lifecycle: Email Metrics'
  - name: Conversion
    description: >-
      A conversion event received for a person, credited to the emails they got
      before it.
    x-group: 'Inbound & Lifecycle: Conversion'
  - name: EngageItem
    description: >-
      A unified Engage item representing a campaign, AI agent, automation
      workflow, broadcast, or journey.
    x-group: Engage Item
paths:
  /api/v2/email-marketing/metrics/batch:
    post:
      tags:
        - EmailMetrics
      summary: Get metrics for multiple broadcasts
      description: >-
        Returns totals for up to 50 broadcasts with a shared time range. A
        custom range is at most 365 days. An unknown or mistyped broadcast ID
        returns zeros; `errors` names an ID only when it belongs to another
        workspace and has data (`not_found`) or could not be read
        (`fetch_failed`).



        Requires one of the following scopes: `email_marketing_metrics:read`,
        `email_marketing_metrics:all`, `all:read`, `all:all`
      operationId: batchGetEmailMarketingMetrics
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - broadcast_ids
              properties:
                broadcast_ids:
                  type: array
                  description: >-
                    Broadcast IDs to fetch metrics for (1-50, duplicates
                    removed).
                  minItems: 1
                  maxItems: 50
                  items:
                    type: string
                    format: uuid
                    minLength: 1
                    example: 01234567-89ab-cdef-0123-456789abcdef
                  example:
                    - 01234567-89ab-cdef-0123-456789abcdef
                time_range:
                  type: string
                  enum:
                    - today
                    - yesterday
                    - 7d
                    - 30d
                    - 90d
                    - 12m
                    - custom
                  description: >-
                    Time range preset or "custom" for a custom date range.
                    Defaults to "12m" if omitted.
                  default: 12m
                  example: 7d
                start_date:
                  type: string
                  pattern: ^\d{4}-\d{2}-\d{2}$
                  description: >-
                    Start date (YYYY-MM-DD). Required when time_range is
                    "custom".
                  example: '2026-04-09'
                end_date:
                  type: string
                  pattern: ^\d{4}-\d{2}-\d{2}$
                  description: >-
                    End date (YYYY-MM-DD). Required when time_range is "custom".
                    At most 365 days after `start_date`.
                  example: '2026-04-10'
                tz_offset:
                  type: integer
                  description: >-
                    Time zone offset in minutes from UTC, -720 to 840. Default 0
                    (UTC). An offset that is not a whole hour, such as 330 for
                    UTC+5:30, is rounded to the hour, so counts shift by up to
                    30 minutes. `goal_reached` is summed over whole UTC days:
                    with any offset other than 0 it can include most of a day
                    outside the range.
                  minimum: -720
                  maximum: 840
                  default: 0
                  example: -300
        required: true
      responses:
        '200':
          description: Batch metrics results keyed by broadcast ID
          content:
            application/json:
              schema:
                type: object
                properties:
                  results:
                    type: object
                    description: Metrics keyed by broadcast ID
                    additionalProperties:
                      type: object
                      properties:
                        totals:
                          type: object
                          description: Totals for the broadcast in the time range
                          properties:
                            sent:
                              type: number
                              examples:
                                - 5000
                              description: Emails sent
                              example: 5000
                            delivered:
                              type: number
                              examples:
                                - 4900
                              description: Emails delivered
                              example: 4900
                            bounced:
                              type: number
                              examples:
                                - 75
                              description: Emails bounced
                              example: 75
                            complained:
                              type: number
                              examples:
                                - 5
                              description: Spam complaints
                              example: 5
                            opened:
                              type: number
                              examples:
                                - 2200
                              description: Opens
                              example: 2200
                            clicked:
                              type: number
                              examples:
                                - 600
                              description: Link clicks
                              example: 600
                            rejected:
                              type: number
                              examples:
                                - 20
                              description: Emails rejected before sending
                              example: 20
                            skipped:
                              type: number
                              examples:
                                - 25
                              description: >-
                                Recipients skipped before sending (invalid or
                                suppressed addresses)
                              example: 25
                            unique_clicked:
                              type: number
                              examples:
                                - 480
                              description: Distinct recipients who clicked
                              example: 480
                            opened_proxy:
                              type: number
                              examples:
                                - 700
                              description: >-
                                Opens by mail privacy proxies rather than
                                people, a subset of `opened`
                              example: 700
                            goal_reached:
                              type: number
                              examples:
                                - 120
                              description: >-
                                Recipients who reached the broadcast goal; zero
                                without a goal
                              example: 120
                            delivery_rate:
                              type: number
                              examples:
                                - 0.98
                              description: delivered / sent
                              example: 0.98
                            open_rate:
                              type: number
                              examples:
                                - 0.449
                              description: opened / delivered
                              example: 0.449
                            click_rate:
                              type: number
                              examples:
                                - 0.122
                              description: clicked / delivered
                              example: 0.122
                            bounce_rate:
                              type: number
                              examples:
                                - 0.015
                              description: bounced / sent
                              example: 0.015
                            complaint_rate:
                              type: number
                              examples:
                                - 0.001
                              description: complained / delivered
                              example: 0.001
                        has_goal:
                          type: boolean
                          examples:
                            - true
                          description: True when the broadcast has a goal
                          example: true
                  errors:
                    type: object
                    description: >-
                      Errors keyed by broadcast ID. Values are error codes:
                      "not_found" or "fetch_failed".
                    additionalProperties:
                      type: string
                      examples:
                        - not_found
                      example: not_found
                  meta:
                    type: object
                    description: The time range the totals cover
                    properties:
                      time_range:
                        type: string
                        enum:
                          - today
                          - yesterday
                          - 7d
                          - 30d
                          - 90d
                          - 12m
                          - custom
                        examples:
                          - 7d
                        description: The requested time range
                        example: 7d
                      granularity:
                        type: string
                        enum:
                          - hourly
                          - daily
                          - weekly
                          - monthly
                        examples:
                          - daily
                        description: Bucket size for the range
                        example: daily
                      start_date:
                        type: string
                        examples:
                          - '2026-01-29'
                        description: First day of the range (YYYY-MM-DD)
                        example: '2026-01-29'
                      end_date:
                        type: string
                        examples:
                          - '2026-02-04'
                        description: Last day of the range (YYYY-MM-DD)
                        example: '2026-02-04'
                      tz_offset:
                        type: integer
                        examples:
                          - 0
                        description: Applied time zone offset in minutes from UTC
                        example: 0
                required:
                  - results
                  - errors
                  - meta
        '400':
          description: >-
            The request is invalid. `message` names the field and the problem.
            `code` is `FST_ERR_VALIDATION` when the request does not match this
            schema and `VALIDATION_ERROR` when a value is refused after that. A
            request the resource's current state does not allow, such as pausing
            a broadcast that is not sending, has its own `code` named on that
            operation. `code` is absent on a few request-level checks.
          content:
            application/json:
              schema:
                type: object
                description: >-
                  The request is invalid. `message` names the field and the
                  problem. `code` is `FST_ERR_VALIDATION` when the request does
                  not match this schema and `VALIDATION_ERROR` when a value is
                  refused after that. A request the resource's current state
                  does not allow, such as pausing a broadcast that is not
                  sending, has its own `code` named on that operation. `code` is
                  absent on a few request-level checks.
                properties:
                  statusCode:
                    type: number
                    example: 400
                  error:
                    type: string
                    example: Bad Request
                  message:
                    type: string
                    example: 'limit: must be at most 50'
                  code:
                    type: string
                    description: >-
                      Machine-readable error code. Branch on this, not on the
                      message.
                    example: VALIDATION_ERROR
        '401':
          description: >-
            This request is unauthorized (either the Authorization header is
            missing or invalid, or the API key has been revoked)
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    enum:
                      - 401
                    examples:
                      - 401
                    example: 401
                  error:
                    type: string
                    enum:
                      - Unauthorized
                    examples:
                      - Unauthorized
                    example: Unauthorized
                  message:
                    type: string
                    examples:
                      - Missing Authorization header
                    example: Missing Authorization header
                required:
                  - statusCode
                  - error
                  - message
        '402':
          description: >-
            This request cannot be fulfilled because the workspace does not have
            an active paid plan
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    enum:
                      - 402
                    examples:
                      - 402
                    example: 402
                  error:
                    type: string
                    enum:
                      - Payment Required
                    examples:
                      - Payment Required
                    example: Payment Required
                  message:
                    type: string
                    examples:
                      - Workspace does not have an active paid plan
                    example: Workspace does not have an active paid plan
                required:
                  - statusCode
                  - error
                  - message
        '403':
          description: >-
            The workspace may not perform this action, for example while it is
            suspended. A key without the required scope gets a 401.
          content:
            application/json:
              schema:
                type: object
                description: >-
                  The workspace may not perform this action, for example while
                  it is suspended. A key without the required scope gets a 401.
                properties:
                  statusCode:
                    type: number
                    example: 403
                  error:
                    type: string
                    example: Forbidden
                  message:
                    type: string
                    example: >-
                      Workspace suspended due to a high bounce or spam complaint
                      rate. Please contact support.
                  code:
                    type: string
                    description: >-
                      Machine-readable error code. Branch on this, not on the
                      message.
                    example: WORKSPACE_SUSPENDED
        '404':
          description: The resource does not exist in this workspace.
          content:
            application/json:
              schema:
                type: object
                description: The resource does not exist in this workspace.
                properties:
                  statusCode:
                    type: number
                    example: 404
                  error:
                    type: string
                    example: Not Found
                  message:
                    type: string
                    example: Not found
                  code:
                    type: string
                    description: >-
                      Machine-readable error code. Branch on this, not on the
                      message.
                    example: NOT_FOUND
        '408':
          description: >-
            The request timed out. The outcome is unknown: a write may or may
            not have been applied. Read the resource back before retrying.
          content:
            application/json:
              schema:
                type: object
                description: >-
                  The request timed out. The outcome is unknown: a write may or
                  may not have been applied. Read the resource back before
                  retrying.
                properties:
                  statusCode:
                    type: number
                    example: 408
                  error:
                    type: string
                    example: Request Timeout
                  message:
                    type: string
                    example: An internal error occurred
        '409':
          description: The request conflicts with the current state of the resource.
          content:
            application/json:
              schema:
                type: object
                description: The request conflicts with the current state of the resource.
                properties:
                  statusCode:
                    type: number
                    example: 409
                  error:
                    type: string
                    example: Conflict
                  message:
                    type: string
                    example: The resource has changed. Reload it and try again.
                  code:
                    type: string
                    description: >-
                      Machine-readable error code. Branch on this, not on the
                      message.
                    example: CONFLICT
        '429':
          description: >-
            You have exceeded the rate limit. Please check the rate limit docs
            for more information.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    enum:
                      - 429
                    examples:
                      - 429
                    example: 429
                  error:
                    type: string
                    enum:
                      - Too Many Requests
                    examples:
                      - Too Many Requests
                    example: Too Many Requests
                  message:
                    type: string
                    examples:
                      - Rate limit exceeded
                    example: Rate limit exceeded
                required:
                  - statusCode
                  - error
                  - message
        '500':
          description: >-
            An internal error occurred. The outcome is unknown: a write may or
            may not have been applied. Read the resource back before retrying.
          content:
            application/json:
              schema:
                type: object
                description: >-
                  An internal error occurred. The outcome is unknown: a write
                  may or may not have been applied. Read the resource back
                  before retrying.
                properties:
                  statusCode:
                    type: number
                    example: 500
                  error:
                    type: string
                    example: Internal Server Error
                  message:
                    type: string
                    example: An internal error occurred
components:
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.