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

# Classify campaign contacts for the Review step

> Classifies the provided CSV/contact payload into buckets (new, existing, already-messaged inbound/outbound, assigned-to-other-user, protected, etc.) using the organization's contact protection period and the campaign's segmentation/assignment configuration. Returns { success, data: ContactValidationResult }.



## OpenAPI

````yaml /api-reference/openapi.yaml post /api/campaigns/validate-contacts
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-contacts:
    post:
      tags:
        - Campaigns
      summary: Classify campaign contacts for the Review step
      description: >-
        Classifies the provided CSV/contact payload into buckets (new, existing,
        already-messaged inbound/outbound, assigned-to-other-user, protected,
        etc.) using the organization's contact protection period and the
        campaign's segmentation/assignment configuration. Returns { success,
        data: ContactValidationResult }.
      operationId: post_campaigns_validate_contacts
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ValidateContactsRequest'
      responses:
        '200':
          description: Classification result returned
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidateContactsResponse'
        '400':
          description: No contacts provided
          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:
    ValidateContactsRequest:
      type: object
      properties:
        contacts:
          type: array
          items:
            type: object
            additionalProperties: true
          description: CSV-derived contact payloads; each must include a phone number.
        segmentationConfig:
          type: object
          additionalProperties: true
          description: Optional segmentation config (enabled, contactDistribution, etc.).
        assignmentConfig:
          type: object
          additionalProperties: true
          description: >-
            Optional assignment config (isAssignmentEnabled, assignmentType,
            selectedUsers, segmentAssignments).
      required:
        - contacts
      additionalProperties: true
      example:
        contacts:
          - firstName: Jamie
            phoneNumber: '+14155550133'
          - firstName: Casey
            phoneNumber: '+14155550144'
        segmentationConfig:
          enabled: false
        assignmentConfig:
          isAssignmentEnabled: false
    ValidateContactsResponse:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - true
        data:
          $ref: '#/components/schemas/ContactValidationResult'
        message:
          type: string
      required:
        - success
        - data
      additionalProperties: true
      example:
        success: true
        data:
          newContacts:
            - firstName: Jamie
              phoneNumber: '+14155550133'
          existingContacts: []
          assignedToOtherUsers: []
          alreadyMessagedOutbound: []
          alreadyMessagedInbound: []
          assignedToYouNotOwned: []
          protectedContacts: []
    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
    ContactValidationResult:
      type: object
      description: >-
        Buckets each input contact falls into based on phone matching,
        ownership, message history, assignee status, and the org's contact
        protection period.
      properties:
        newContacts:
          type: array
          items:
            type: object
            additionalProperties: true
        existingContacts:
          type: array
          items:
            type: object
            additionalProperties: true
        assignedToOtherUsers:
          type: array
          items:
            type: object
            additionalProperties: true
        alreadyMessagedOutbound:
          type: array
          items:
            type: object
            additionalProperties: true
        alreadyMessagedInbound:
          type: array
          items:
            type: object
            additionalProperties: true
        assignedToYouNotOwned:
          type: array
          items:
            type: object
            additionalProperties: true
        protectedContacts:
          type: array
          items:
            type: object
            additionalProperties: true
      required:
        - newContacts
        - existingContacts
        - assignedToOtherUsers
        - alreadyMessagedOutbound
        - alreadyMessagedInbound
        - assignedToYouNotOwned
        - protectedContacts
      additionalProperties: true
      example:
        newContacts:
          - firstName: Jamie
            phoneNumber: '+14155550133'
        existingContacts:
          - _id: 665f1a0c0e0a4b001a2c9f01
            phoneNumber: '+14155550144'
        assignedToOtherUsers: []
        alreadyMessagedOutbound: []
        alreadyMessagedInbound: []
        assignedToYouNotOwned: []
        protectedContacts: []
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````