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

# Get per-date SMS usage and campaign breakdown

> Returns SMS usage (sent + reserved) and the list of scheduled/sent campaigns per organization-local date within the requested range. Used by the Campaigns overview calendar.



## OpenAPI

````yaml /api-reference/openapi.yaml get /api/campaigns/usage-calendar
openapi: 3.0.3
info:
  title: Tether Relay and Tether API
  version: 1.0.0
  description: >-
    Route-derived OpenAPI contract generated from tether-relay backend sources.
    Regenerate with scripts/sync-openapi-from-backend.mjs.
servers:
  - url: https://your-instance.example.com
    description: Production
  - url: http://localhost:2212
    description: Local API service
security: []
tags:
  - name: AI
  - name: Applications
  - name: Approval
  - name: Auth
  - name: Automations
  - name: Calls
  - name: Campaigns
  - name: Contact Analytics
  - name: Contact Metrics
  - name: Contact Notes
  - name: Contacts
  - name: Conversation Monitor
  - name: Conversations
  - name: Departments
  - name: Email
  - name: Escalation Dashboard
  - name: Event Logs
  - name: Google Sheets
  - name: Marketplace
  - name: Messages
  - name: Notification Sounds
  - name: Notifications
  - name: Org Snapshots
  - name: Organizations
  - name: Outreach
  - name: Outreach Metrics
  - name: Outreach Sources
  - name: Pipelines
  - name: Processes
  - name: Prompts
  - name: Reminders
  - name: Sms
  - name: Templates
  - name: Traces
  - name: Training
  - name: Upload
  - name: User Snapshots
  - name: Users
  - name: Vertical
  - name: Webchats
  - name: Webhook
paths:
  /api/campaigns/usage-calendar:
    get:
      tags:
        - Campaigns
      summary: Get per-date SMS usage and campaign breakdown
      description: >-
        Returns SMS usage (sent + reserved) and the list of scheduled/sent
        campaigns per organization-local date within the requested range. Used
        by the Campaigns overview calendar.
      operationId: get_campaigns_usage_calendar
      parameters:
        - in: query
          name: from
          required: true
          schema:
            type: string
            format: date
          description: Inclusive start date (YYYY-MM-DD, org-local timezone).
        - in: query
          name: to
          required: true
          schema:
            type: string
            format: date
          description: Inclusive end date (YYYY-MM-DD, org-local timezone).
      responses:
        '200':
          description: Usage calendar returned
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsageCalendarResponse'
        '400':
          description: from and to query params are required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    UsageCalendarResponse:
      type: object
      properties:
        success:
          type: boolean
        data:
          type: object
          properties:
            timezone:
              type: string
            dailyLimit:
              type: integer
            isUnlimited:
              type: boolean
            plan:
              type: string
            dates:
              type: object
              description: Map of org-local YYYY-MM-DD to that date's usage entry.
              additionalProperties:
                $ref: '#/components/schemas/UsageCalendarDateEntry'
          required:
            - timezone
            - dailyLimit
            - isUnlimited
            - dates
          additionalProperties: true
      required:
        - success
        - data
      additionalProperties: true
      example:
        success: true
        data:
          timezone: America/Toronto
          dailyLimit: 500
          isUnlimited: false
          plan: growth
          dates:
            '2026-05-20':
              sent: 0
              reserved: 100
              total: 100
              availableQuota: 400
              campaigns:
                - campaignId: 665f1a0c0e0a4b001a2c9f10
                  campaignName: Q2 Lead Gen
                  contactCount: 100
                  status: scheduled
    ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - false
        message:
          type: string
        error:
          type: string
      additionalProperties: true
      example:
        success: false
        message: Validation error
        error: name is required
    UsageCalendarDateEntry:
      type: object
      properties:
        sent:
          type: integer
        reserved:
          type: integer
        total:
          type: integer
        availableQuota:
          type: integer
        campaigns:
          type: array
          items:
            $ref: '#/components/schemas/UsageCalendarCampaignEntry'
      required:
        - sent
        - reserved
        - total
        - availableQuota
        - campaigns
      additionalProperties: true
      example:
        sent: 0
        reserved: 100
        total: 100
        availableQuota: 400
        campaigns:
          - campaignId: 665f1a0c0e0a4b001a2c9f10
            campaignName: Q2 Lead Gen
            contactCount: 100
            status: scheduled
            isSegmented: true
            segmentNumber: 1
    UsageCalendarCampaignEntry:
      type: object
      properties:
        campaignId:
          type: string
        campaignName:
          type: string
        contactCount:
          type: integer
        status:
          type: string
        isSegmented:
          type: boolean
        segmentNumber:
          type: integer
        failedDetails:
          type: array
          items:
            type: object
            properties:
              phoneNumber:
                type: string
              reason:
                type: string
            additionalProperties: true
      additionalProperties: true
      example:
        campaignId: 665f1a0c0e0a4b001a2c9f10
        campaignName: Q2 Lead Gen
        contactCount: 100
        status: scheduled
        isSegmented: true
        segmentNumber: 1
        failedDetails: []
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````