# Fetch Workspaces by App

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v2/exports/fetch-workspaces:
    get:
      summary: Fetch Workspaces by App
      deprecated: false
      description: >+
        ## Fetch Workspaces (Exports)


        Fetches the list of workspaces associated with a specified application
        in the exports module.


        This endpoint allows clients to retrieve all available workspaces linked
        to a supported third-party app integration. It is typically used when
        initiating export workflows that require selecting a workspace within a
        specific platform.


        ### Supported Applications


        The following apps are supported:


        - `INSTANTLY`

        - `QUICKMAIL`

        - `SUPERAGI`

        - `REACHINBOX`

        - `MANYREACH`

        - `MASTER_INBOX`

        - `SAILE`

        - `COLDSTATS`

        - `PIPL`

        - `HOTHAWK`

        - `EMAILGUARD`

      tags:
        - export
      parameters:
        - name: app
          in: query
          description: ''
          required: true
          example: ''
          schema:
            type: string
        - name: accountId
          in: query
          description: Scope workspace fetch to a specific third-party account.
          required: false
          schema:
            type: string
        - name: x-auth-zapmail
          in: header
          description: ''
          required: true
          example: ''
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                  message:
                    type: string
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        name:
                          type: string
                      required:
                        - id
                        - name
                      x-apidog-orders:
                        - id
                        - name
                required:
                  - status
                  - message
                  - data
                x-apidog-orders:
                  - status
                  - message
                  - data
              example:
                status: 200
                message: Workspaces fetched successfully
                data:
                  - id: 123e4567-e89b-xxxx-a456-426614174000
                    name: My Workspace
                  - id: 491da19d-xxxx-4d29-8723-xxxxxxxxxxxx
                    name: Sales Team Workspace
                  - id: 8d90bfb6-a28e-43c1-xxxx-398e02fe52b4
                    name: Marketing Workspace
          headers: {}
          x-apidog-name: Success
        '400':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                  message:
                    type: string
                  errorId:
                    type: string
                required:
                  - status
                  - message
                  - errorId
                x-apidog-orders:
                  - status
                  - message
                  - errorId
              example:
                status: 400
                message: >-
                  Invalid app parameter. Supported apps: INSTANTLY, QUICKMAIL,
                  SUPERAGI, REACHINBOX, MANYREACH, MASTER_INBOX, SAILE,
                  COLDSTATS, PIPL, HOTHAWK
                errorId: c5ea30e9-b9f1-456c-ab31-0dc943632f67
          headers: {}
          x-apidog-name: Invalid App Query
        '404':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                  message:
                    type: string
                  errorId:
                    type: string
                required:
                  - status
                  - message
                  - errorId
                x-apidog-orders:
                  - status
                  - message
                  - errorId
              example:
                status: 404
                message: Manyreach account not found
                errorId: 2b5fa691-691a-4c97-932e-32002d943d16
          headers: {}
          x-apidog-name: Account Not Found
        '422':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                  message:
                    type: string
                  data:
                    type: 'null'
                required:
                  - status
                  - message
                  - data
                x-apidog-orders:
                  - status
                  - message
                  - data
              example:
                status: 422
                message: >-
                  Multiple <APP> accounts exist for this workspace —
                  <accountId|thirdPartyAccountId> is required.
                data: null
          headers: {}
          x-apidog-name: Unprocessable Entity
      security: []
      x-apidog-folder: export
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/797058/apis/api-28045428-run
components:
  schemas: {}
  securitySchemes: {}
servers:
  - url: https://api.zapmail.ai/api
    description: Prod Env
security: []

```
