# Copy workspace settings

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /workspaces/copy:
    post:
      summary: Copy workspace settings
      deprecated: false
      description: >
        Duplicates selected settings and configurations from a source workspace
        to a destination workspace.

        This endpoint allows you to copy various resources including tags,
        labels, custom fields, webhooks,

        members, and other workspace-specific settings.


        **Important Notes:**

        - Both source and destination workspaces must belong to the workspace
        owner

        - Please use your Account API key (instead of Workspace API key) as
        access permission to both workspaces is required


        **⚠️ DUPLICATE BEHAVIOR WARNING:**

        Calling this endpoint multiple times with the same destination workspace
        may create duplicates on resources.

        To avoid duplicates, only call this endpoint ONCE per destination
        workspace, or manually clean up duplicate entries (tags, labels,
        blocklist, webhooks) before running the copy operation again.
      operationId: copyWorkspace
      tags:
        - Workspace
        - Workspace Management
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - workspace_id
                - src_ws_id
                - dest_ws_id
                - resources
              properties:
                workspace_id:
                  type: string
                  pattern: ^[0-9a-f]{24}$
                  minLength: 24
                  maxLength: 24
                  description: A workspace ID for (can be same as src_ws_id)
                  examples:
                    - 507f1f77bcf86cd799439011
                src_ws_id:
                  type: string
                  pattern: ^[0-9a-f]{24}$
                  minLength: 24
                  maxLength: 24
                  description: Source workspace ID (workspace to copy settings from)
                  examples:
                    - 507f1f77bcf86cd799439011
                dest_ws_id:
                  type: string
                  pattern: ^[0-9a-f]{24}$
                  minLength: 24
                  maxLength: 24
                  description: Destination workspace ID (workspace to copy settings to)
                  examples:
                    - 507f191e810c19729de860ea
                resources:
                  type: array
                  description: >-
                    Array of resource types to copy from source to destination
                    workspace
                  minItems: 1
                  uniqueItems: true
                  items:
                    type: string
                    enum:
                      - TAGS
                      - LABELS
                      - BLOCKLIST
                      - AI_REPLY_LABELS
                      - POS_REPLY_EMAIL
                      - SELF_CATEGORIZE_PROMPT
                      - WORKSPACE_FIELDS
                      - WEBHOOKS
                      - WORKSPACE_MEMBERS
                      - IS_UNTRACK_REPLY
                      - GOOGLE_SHEET_BLOCKLIST_URL
                      - AUTO_FOLLOW_UP
                      - CAMP_SCHEDULE_PROFILE
                  examples:
                    - - TAGS
                      - LABELS
                      - WORKSPACE_FIELDS
                      - WEBHOOKS
              x-apidog-orders:
                - workspace_id
                - src_ws_id
                - dest_ws_id
                - resources
            examples:
              copyBasicSettings:
                value:
                  workspace_id: 507f1f77bcf86cd799439011
                  src_ws_id: 507f1f77bcf86cd799439011
                  dest_ws_id: 507f191e810c19729de860ea
                  resources:
                    - TAGS
                    - LABELS
                    - WORKSPACE_FIELDS
                summary: Copy basic workspace settings
                description: Copy tags, labels, and custom workspace fields
              copyAllSettings:
                value:
                  api_key: pk_1a2b3c4d5e6f7g8h9i0j
                  workspace_id: 507f1f77bcf86cd799439011
                  src_ws_id: 507f1f77bcf86cd799439011
                  dest_ws_id: 507f191e810c19729de860ea
                  resources:
                    - TAGS
                    - LABELS
                    - BLOCKLIST
                    - AI_REPLY_LABELS
                    - POS_REPLY_EMAIL
                    - SELF_CATEGORIZE_PROMPT
                    - WORKSPACE_FIELDS
                    - WEBHOOKS
                    - WORKSPACE_MEMBERS
                    - IS_UNTRACK_REPLY
                    - GOOGLE_SHEET_BLOCKLIST_URL
                    - AUTO_FOLLOW_UP
                    - CAMP_SCHEDULE_PROFILE
                summary: Copy all available settings
                description: >-
                  Copy all workspace settings including members, webhooks, AI
                  settings, etc.
              copyMembersAndWebhooks:
                value:
                  api_key: pk_1a2b3c4d5e6f7g8h9i0j
                  workspace_id: 507f1f77bcf86cd799439011
                  src_ws_id: 507f1f77bcf86cd799439011
                  dest_ws_id: 507f191e810c19729de860ea
                  resources:
                    - WORKSPACE_MEMBERS
                    - WEBHOOKS
                summary: Copy only members and webhooks
                description: Selective copy of workspace members and webhook configurations
      responses:
        '200':
          description: Workspace settings copied successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: Success message
                    examples:
                      - Success
                  tags_copied:
                    type: integer
                    description: Number of tags copied
                    examples:
                      - 5
                  labels_copied:
                    type: integer
                    description: Number of labels copied
                    examples:
                      - 8
                  ailabels_copied:
                    type: integer
                    description: Number of AI reply labels copied
                    examples:
                      - 3
                  pos_reply_email_copied:
                    type: integer
                    description: >-
                      Flag indicating if positive reply email was copied (1 or
                      0)
                    examples:
                      - 1
                  self_cat_prompt_copied:
                    type: integer
                    description: >-
                      Flag indicating if additional AI prompt was copied (1 or
                      0)
                    examples:
                      - 1
                  wsfields_copied:
                    type: integer
                    description: Number of workspace additional fields copied
                    examples:
                      - 4
                  hooks_copied:
                    type: integer
                    description: Number of webhooks copied
                    examples:
                      - 2
                  members_copied:
                    type: integer
                    description: Number of workspace members copied
                    examples:
                      - 3
                  untrack_replied_copied:
                    type: integer
                    description: >-
                      Flag indicating if 'Other' folder (Unibox) setting was
                      copied
                    examples:
                      - 1
                  googlesheet_blocklist_url:
                    type: integer
                    description: >-
                      Flag indicating if Google Sheet blocklist URL was copied
                      (1 or 0)
                    examples:
                      - 0
                  camp_set_profiles_copied:
                    type: integer
                    description: Number of campaign schedule profiles copied
                    examples:
                      - 2
                x-apidog-orders:
                  - status
                  - tags_copied
                  - labels_copied
                  - ailabels_copied
                  - pos_reply_email_copied
                  - self_cat_prompt_copied
                  - wsfields_copied
                  - hooks_copied
                  - members_copied
                  - untrack_replied_copied
                  - googlesheet_blocklist_url
                  - camp_set_profiles_copied
              examples:
                successfulCopy:
                  summary: Successful copy operation
                  value:
                    status: Success
                    tags_copied: 5
                    labels_copied: 8
                    ailabels_copied: 3
                    pos_reply_email_copied: 1
                    self_cat_prompt_copied: 1
                    wsfields_copied: 4
                    hooks_copied: 2
                    members_copied: 3
                    untrack_replied_copied: 1
                    googlesheet_blocklist_url: 1
                    camp_set_profiles_copied: 2
                partialCopy:
                  summary: Partial copy (only some resources requested)
                  value:
                    status: Success
                    tags_copied: 12
                    labels_copied: 6
                    ailabels_copied: 0
                    pos_reply_email_copied: 0
                    self_cat_prompt_copied: 0
                    wsfields_copied: 0
                    hooks_copied: 0
                    members_copied: 0
                    untrack_replied_copied: 0
                    googlesheet_blocklist_url: 0
                    camp_set_profiles_copied: 0
                noItemsToCopy:
                  summary: No items to copy
                  value:
                    status: Success
                    tags_copied: 0
                    labels_copied: 0
                    ailabels_copied: 0
                    pos_reply_email_copied: 0
                    self_cat_prompt_copied: 0
                    wsfields_copied: 0
                    hooks_copied: 0
                    members_copied: 0
                    untrack_replied_copied: 0
                    googlesheet_blocklist_url: 0
                    camp_set_profiles_copied: 0
                secondCallWithDuplicates:
                  summary: Second call to same destination (shows duplicate behavior)
                  value:
                    status: Success
                    tags_copied: 5
                    labels_copied: 0
                    ailabels_copied: 0
                    pos_reply_email_copied: 0
                    self_cat_prompt_copied: 0
                    wsfields_copied: 4
                    hooks_copied: 2
                    members_copied: 0
                    untrack_replied_copied: 0
                    googlesheet_blocklist_url: 0
                    camp_set_profiles_copied: 0
          headers: {}
          x-apidog-name: ''
        '400':
          description: Bad Request - Invalid input parameters
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                  error:
                    type: string
                    description: Error details
                  errors:
                    type: array
                    description: Validation errors (if applicable)
                    items:
                      type: string
                x-apidog-orders:
                  - message
                  - error
                  - errors
              examples:
                invalidApiKey:
                  summary: Invalid or missing API key
                  value:
                    message: Api not found.
                    error: Api not found.
                sameWorkspaceIds:
                  summary: Source and destination workspace IDs are the same
                  value:
                    message: >-
                      Source Workspace Id / Destination Workspace can not be
                      same.
                    error: >-
                      Source Workspace Id / Destination Workspace can not be
                      same.
                noResourcesSelected:
                  summary: No resources selected to copy
                  value:
                    message: Please select settings to copy.
                    error: Please select settings to copy.
                missingWorkspaceIds:
                  summary: Missing required workspace IDs
                  value:
                    message: Source / Destination Workspace ID required.
                    error: Source / Destination Workspace ID required.
                unauthorizedWorkspace:
                  summary: Workspace does not belong to owner
                  value:
                    message: >-
                      Source Workspace ID and Destination Workspace ID must
                      belong to the owner's workspace.
                    error: >-
                      Source Workspace ID and Destination Workspace ID must
                      belong to the owner's workspace.
                validationError:
                  summary: Validation errors
                  value:
                    message: Validation error
                    error: Validation error
                    errors:
                      - '"workspace_id" length must be 24 characters long'
                      - '"resources" must contain at least 1 items'
          headers: {}
          x-apidog-name: ''
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                  error:
                    type: string
                    description: Error details
                x-apidog-orders:
                  - message
                  - error
              examples:
                serverError:
                  summary: Internal server error
                  value:
                    message: An unexpected error occurred
                    error: An unexpected error occurred
          headers: {}
          x-apidog-name: ''
      security:
        - ApiKeyAuth: []
          x-apidog:
            schemeGroups:
              - id: uS5KiuC4wfZHK42AzOfA_
                schemeIds:
                  - ApiKeyAuth
            required: true
            use:
              id: uS5KiuC4wfZHK42AzOfA_
            scopes:
              uS5KiuC4wfZHK42AzOfA_:
                ApiKeyAuth: []
      x-apidog-folder: Workspace
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/929054/apis/api-33221646-run
components:
  schemas: {}
  securitySchemes:
    ApiKeyAuth:
      type: apikey
      in: header
      name: x-api-key
      description: |
        API key issued in the PlusVibe dashboard. The server reads it
        from the `x-api-key` header and injects it into the request as
        the `api_key` query parameter, which is why you will see
        `api_key` referenced in validation errors.
    apiKey:
      type: apikey
      in: body
      name: api_key
      description: API key passed in request body
servers:
  - url: https://api.plusvibe.ai/api/v1
    description: Prod Env
security:
  - ApiKeyAuth: []
    x-apidog:
      schemeGroups:
        - id: uS5KiuC4wfZHK42AzOfA_
          schemeIds:
            - ApiKeyAuth
      required: true
      use:
        id: uS5KiuC4wfZHK42AzOfA_
      scopes:
        uS5KiuC4wfZHK42AzOfA_:
          ApiKeyAuth: []

```
