> ## 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.

# Validate that a date has enough remaining SMS quota

> Returns whether the organization's daily SMS quota for the supplied date (derived from scheduledISO in the org's timezone) has room for contactCount additional messages. When excludeCampaignId is supplied, that campaign's current reservation on the date is excluded from the calculation (used when editing).



## OpenAPI

````yaml /api-reference/openapi.yaml post /api/campaigns/validate-date
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/validate-date:
    post:
      tags:
        - Campaigns
      summary: Validate that a date has enough remaining SMS quota
      description: >-
        Returns whether the organization's daily SMS quota for the supplied date
        (derived from scheduledISO in the org's timezone) has room for
        contactCount additional messages. When excludeCampaignId is supplied,
        that campaign's current reservation on the date is excluded from the
        calculation (used when editing).
      operationId: post_campaigns_validate_date
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ValidateDateRequest'
      responses:
        '200':
          description: Validation result returned
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidateDateResponse'
        '400':
          description: scheduledISO and contactCount 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:
    ValidateDateRequest:
      type: object
      properties:
        scheduledISO:
          type: string
          format: date-time
          description: >-
            UTC ISO timestamp the campaign is scheduled for. The org-local date
            is derived from this.
        contactCount:
          type: integer
          minimum: 0
          description: Number of contacts the campaign will message on the resolved date.
        excludeCampaignId:
          type: string
          description: >-
            When editing an existing campaign, excludes its current reservation
            on this date from the quota check.
      required:
        - scheduledISO
        - contactCount
      additionalProperties: true
      example:
        scheduledISO: '2026-05-20T15:00:00.000Z'
        contactCount: 250
    ValidateDateResponse:
      type: object
      properties:
        success:
          type: boolean
        available:
          type: boolean
          description: >-
            True when remaining quota >= contactCount (or when the org has
            unlimited quota).
        remaining:
          type: integer
          nullable: true
          description: Remaining SMS slots on the resolved date; null for unlimited plans.
        limit:
          type: integer
          nullable: true
          description: Daily SMS cap for the org; null for unlimited plans.
        message:
          type: string
          description: Human-readable explanation populated only when available=false.
      required:
        - success
        - available
      additionalProperties: true
      example:
        success: true
        available: true
        remaining: 250
        limit: 500
    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
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````