> ## Documentation Index
> Fetch the complete documentation index at: https://docs.notifique.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Listar workspace da chave

> Retorna o workspace vinculado à API key em `data: [workspace]`. `?include=billing` exige **billing:read**.



## OpenAPI

````yaml /es/guides/workspaces/api-reference/openapi-workspaces.json get /v1/workspaces
openapi: 3.0.3
info:
  title: Notifique API — Workspaces
  description: >-
    API para **criar**, **editar** e **deletar** workspaces. Use para gerenciar
    múltiplos workspaces via API (criar novo workspace para o mesmo usuário,
    atualizar nome/cor/instância padrão ou remover um workspace).


    **Autenticação:** todas as rotas exigem API Key no header `Authorization:
    Bearer sk_live_xxxxx` ou `x-api-key: sk_live_xxxxx`. Editar e deletar só
    permitem operar no workspace ao qual a API Key pertence.
  version: 1.0.0
servers:
  - url: https://api.notifique.dev
    description: Produção
security:
  - BearerAuth: []
  - ApiKeyHeader: []
tags:
  - name: Workspaces
    description: CRUD de workspaces (criar, editar, deletar)
paths:
  /v1/workspaces:
    get:
      tags:
        - Workspaces
      summary: Listar workspace da chave
      description: >-
        Retorna o workspace vinculado à API key em `data: [workspace]`.
        `?include=billing` exige **billing:read**.
      operationId: getV1Workspaces
      parameters:
        - name: include
          in: query
          schema:
            type: string
          description: 'Ex.: `billing` para snapshot de plano/saldo.'
      responses:
        '200':
          description: Workspace da chave.
          content:
            application/json:
              example:
                success: true
                data:
                  - id: clws_01H...
                    name: Produção BR
                    slug: producao-br
                    color: '#10B981'
                    tierIndex: 1
                    tierName: Basic
              schema:
                $ref: '#/components/schemas/getV1WorkspacesResponse'
        '401':
          description: API Key ausente ou inválida.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                success: false
                error: Bad Request
                code: VALIDATION_ERROR
                message: Campo inválido ou ausente.
        '403':
          description: Escopo workspace:read ou billing:read ausente.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                success: false
                error: Bad Request
                code: VALIDATION_ERROR
                message: Campo inválido ou ausente.
components:
  schemas:
    getV1WorkspacesResponse:
      type: object
      properties:
        success:
          type: boolean
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              name:
                type: string
              slug:
                type: string
              color:
                type: string
              tierIndex:
                type: integer
              tierName:
                type: string
      example:
        success: true
        data:
          - id: clxx...
            name: Exemplo
            slug: string
            color: string
            tierIndex: 1
            tierName: string
    ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          type: string
        message:
          type: string
        code:
          type: string
        details:
          type: array
          items:
            type: object
            properties:
              field:
                type: string
              message:
                type: string
      example:
        success: false
        error: string
        message: string
        code: string
        details:
          - field: string
            message: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: 'API Key: Authorization: Bearer sk_live_xxxxx'
    ApiKeyHeader:
      type: apiKey
      in: header
      name: x-api-key
      description: 'API Key: x-api-key: sk_live_xxxxx'

````