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

# Scan a cross-organization user transfer for warnings and conflicts (SuperAdmin only)

> Performs the deeper scan that produces a scanVersion (required by /transfer/execute): warnings, owned-resource counts, agent usage breakdowns, reassignee agents, and role hints. Does not mutate state.



## OpenAPI

````yaml /api-reference/openapi.yaml post /api/organizations/transfer/scan
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/organizations/transfer/scan:
    post:
      tags:
        - Organizations
      summary: >-
        Scan a cross-organization user transfer for warnings and conflicts
        (SuperAdmin only)
      description: >-
        Performs the deeper scan that produces a scanVersion (required by
        /transfer/execute): warnings, owned-resource counts, agent usage
        breakdowns, reassignee agents, and role hints. Does not mutate state.
      operationId: post_organizations_transfer_scan
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrgTransferScanRequest'
      responses:
        '200':
          description: Scan result returned
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrgTransferScanResponse'
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationErrorResponse'
        '403':
          description: 'Forbidden: Only Superadmin can transfer users between organizations'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    OrgTransferScanRequest:
      type: object
      properties:
        userId:
          type: string
          description: User being transferred out of the source organization.
        targetOrganizationId:
          type: string
          description: Destination organization the user will move into.
        reassigneeUserId:
          type: string
          description: >-
            User in the source org who will inherit the transferring user's
            contacts, conversations, automations, workflows, and prompts; used
            to compute the scan version and surface their existing agents.
      required:
        - userId
        - targetOrganizationId
        - reassigneeUserId
      additionalProperties: true
      example:
        userId: 5f7b1c2e8a1d4e0012c3b4a6
        targetOrganizationId: 5f7b1c2e8a1d4e0012c3b401
        reassigneeUserId: 5f7b1c2e8a1d4e0012c3b4a8
    OrgTransferScanResponse:
      type: object
      properties:
        scanVersion:
          type: string
        scannedAt:
          type: string
          format: date-time
        userId:
          type: string
        fromOrganizationId:
          type: string
        toOrganizationId:
          type: string
        warnings:
          type: array
          items:
            $ref: '#/components/schemas/OrgTransferScanWarning'
        ownedCounts:
          type: object
          properties:
            contacts:
              type: integer
            conversations:
              type: integer
            assigneeConversations:
              type: integer
            emailAccounts:
              type: integer
            calendarConnections:
              type: integer
            calendarToolConfigurations:
              type: integer
            googleSheetsTokens:
              type: integer
            unfiredReminders:
              type: integer
            automations:
              type: integer
            workflows:
              type: integer
            webchatConfigurations:
              type: integer
            acquiredItems:
              type: integer
            promptCount:
              type: integer
            voicePhoneNumbers:
              type: integer
            automationKeys:
              type: integer
          additionalProperties: true
        agentUsage:
          type: array
          items:
            $ref: '#/components/schemas/OrgTransferAgentUsage'
        reassigneeAgents:
          type: array
          items:
            $ref: '#/components/schemas/OrgTransferReassigneeAgent'
        isSourceDepartmentManager:
          type: boolean
        isSuperadmin:
          type: boolean
      additionalProperties: true
      example:
        scanVersion: scan-2026-05-18T14:30:00Z-abc123
        scannedAt: '2026-05-18T14:30:00.000Z'
        userId: 5f7b1c2e8a1d4e0012c3b4a6
        fromOrganizationId: 5f7b1c2e8a1d4e0012c3b400
        toOrganizationId: 5f7b1c2e8a1d4e0012c3b401
        warnings: []
        ownedCounts:
          contacts: 1240
          conversations: 3580
          assigneeConversations: 412
          automations: 7
          workflows: 3
        agentUsage:
          - agentId: 5f7b1c2e8a1d4e0012c3b610
            agentName: Sales Outbound Agent
            total: 124
            autopilot: 80
            isDeleted: false
        reassigneeAgents: []
        isSourceDepartmentManager: false
        isSuperadmin: true
    OrganizationErrorResponse:
      type: object
      properties:
        error:
          type: string
        details:
          type: string
      additionalProperties: true
      example:
        error: Organization not found
        details: No organization exists with the provided id
    OrgTransferScanWarning:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
        meta:
          type: object
          additionalProperties: true
      required:
        - code
        - message
      additionalProperties: true
      example:
        code: AGENT_NOT_IN_TARGET_ORG
        message: >-
          User owns automations referencing an agent not present in the target
          org
        meta:
          agentId: 5f7b1c2e8a1d4e0012c3b610
          count: 3
    OrgTransferAgentUsage:
      type: object
      properties:
        agentId:
          type: string
        agentName:
          type: string
        total:
          type: integer
        autopilot:
          type: integer
        isDeleted:
          type: boolean
      required:
        - agentId
        - agentName
        - total
        - autopilot
        - isDeleted
      additionalProperties: true
      example:
        agentId: 5f7b1c2e8a1d4e0012c3b610
        agentName: Sales Outbound Agent
        total: 124
        autopilot: 80
        isDeleted: false
    OrgTransferReassigneeAgent:
      type: object
      properties:
        agentId:
          type: string
        agentName:
          type: string
      required:
        - agentId
        - agentName
      additionalProperties: true
      example:
        agentId: 5f7b1c2e8a1d4e0012c3b611
        agentName: Reassignee Default Agent
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````