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

# Update snapshot assignment / global flag

> Updates which organizations a snapshot is assigned to and whether it is globally visible. Superadmins may set both assignedOrgIds and isGlobal; admins may only toggle isGlobal on snapshots they created.



## OpenAPI

````yaml /api-reference/openapi.yaml patch /api/user-snapshots/{id}/assign
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/user-snapshots/{id}/assign:
    patch:
      tags:
        - User Snapshots
      summary: Update snapshot assignment / global flag
      description: >-
        Updates which organizations a snapshot is assigned to and whether it is
        globally visible. Superadmins may set both assignedOrgIds and isGlobal;
        admins may only toggle isGlobal on snapshots they created.
      operationId: patch_user_snapshot_assign
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AssignUserSnapshotRequest'
      responses:
        '200':
          description: Snapshot access updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssignUserSnapshotResponse'
        '400':
          description: Validation error or no valid fields to update
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserSnapshotErrorResponse'
        '403':
          description: Forbidden – admins may only manage their own snapshots
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserSnapshotErrorResponse'
        '404':
          description: Snapshot not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserSnapshotErrorResponse'
        '500':
          description: Failed to update snapshot access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserSnapshotErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    AssignUserSnapshotRequest:
      type: object
      properties:
        assignedOrgIds:
          type: array
          items:
            type: string
          description: Superadmin only. Replace the snapshot assigned organization list.
        isGlobal:
          type: boolean
          description: When true, makes the snapshot visible to all organizations.
      additionalProperties: false
      example:
        assignedOrgIds:
          - 64ee9a8b1e7f2a0011223344
          - 64ee9a8b1e7f2a0011223345
        isGlobal: false
    AssignUserSnapshotResponse:
      type: object
      properties:
        message:
          type: string
        snapshot:
          type: object
          properties:
            _id:
              type: string
            assignedOrgIds:
              type: array
              items:
                type: string
            isGlobal:
              type: boolean
          additionalProperties: true
      additionalProperties: true
      example:
        message: Snapshot access updated
        snapshot:
          _id: 665f1a0c0e0a4b001a2c9f80
          assignedOrgIds:
            - 64ee9a8b1e7f2a0011223344
          isGlobal: false
    UserSnapshotErrorResponse:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
        details: {}
      additionalProperties: true
      example:
        error: Snapshot not found
        message: No snapshot exists with the given id
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````