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

# Get alert counts

> Returns alert counts grouped by hour, day, or week.



## OpenAPI

````yaml /outbound/api-reference/openapi.yaml post /alertcount
openapi: 3.0.3
info:
  contact:
    email: support@mailchannels.com
    name: MailChannels Corporation
  description: >
    Search email delivery logs, retrieve sender profiles, and query alerts with
    the MailChannels Log Search API.


    ## Rate limits


    This API is limited to 100 queries per second, per customer.

    Queries that exceed this rate may be rejected with the `503 Service
    Temporarily Unavailable` HTTP response.
  title: Search Service
  version: 0.7.0
servers:
  - url: https://api.mailchannels.net/outbound/v1/
security:
  - X-API-KEY: []
paths:
  /alertcount:
    post:
      summary: Get alert counts
      description: Returns alert counts grouped by hour, day, or week.
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              properties:
                end_date:
                  description: >-
                    The end of the date range, including the UTC offset, for
                    example 2026-09-02T00:00:00-0700.
                  type: string
                interval:
                  description: >-
                    The time interval used to group alert counts. Defaults to
                    days.
                  enum:
                    - days
                    - hours
                    - weeks
                  type: string
                sender_id:
                  description: The ID of the sender.
                  type: string
                start_date:
                  description: >-
                    The start of the date range, including the UTC offset, for
                    example 2026-09-01T00:00:00-0700.
                  type: string
                sub_account_filter:
                  description: Filter for sub-accounts.
                  type: string
              required:
                - sender_id
                - start_date
                - end_date
              type: object
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                additionalProperties:
                  type: integer
                type: object
          description: A JSON object mapping timestamps to alert counts.
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Bad Request.
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Internal Error.
components:
  schemas:
    ErrorResponse:
      properties:
        code:
          description: HTTP response code.
          type: integer
        errors:
          items:
            description: Response error.
            type: string
          type: array
        message:
          description: Response message.
          type: string
  securitySchemes:
    X-API-KEY:
      in: header
      name: X-API-KEY
      type: apiKey

````