---
title: "Get a workspace"
description: "PubNio API workspaces.get: get a workspace. Request fields, examples in five clients, errors, and idempotency."
---

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

# Get a workspace

Get a workspace with [`GET /api/v1/workspaces/{workspaceId}`](https://pubnio.com/api/v1/docs#tag/workspaces/GET/api/v1/workspaces/{workspaceId}). Requires an API key with the `read` scope or a signed-in workspace member.

## Request

| Parameter     | In   | Type | Required |
| ------------- | ---- | ---- | -------- |
| `workspaceId` | path | UUID | Yes      |

## Response

- HTTP 200: an object with `id`, `name`, `defaultTimezone`, `role`.
  - `role`: `owner`, `member`

The [OpenAPI document](https://pubnio.com/api/v1/openapi) has each field's type.

## Examples

### TypeScript

```ts
const found = await client.workspaces.get(workspace.workspaceId);
```

### Python

```python
found = client.workspaces.get(workspace_id)
```

### cURL

```sh
curl "https://pubnio.com/api/v1/workspaces/$WORKSPACE_ID" \
  -H "Authorization: Bearer $PUBNIO_API_KEY"
```

### CLI

```sh
pnio workspaces get "$WORKSPACE_ID"
```

Also: `pnio workspaces use`.

### MCP execute

```js
async () => {
  const response = await codemode.request({
    method: "GET",
    path: `/api/v1/workspaces/${codemode.workspaceId}`,
  });
  return response.data;
};
```

## Errors

It declares no problem of its own.

It declares the problems [most operations](https://pubnio.com/docs/reference/#shared-problems) declare.

## Idempotency

None needed: a read is safe to retry.

## Limits

- Field lengths and ranges are in the [OpenAPI document](https://pubnio.com/api/v1/openapi).

## Related

- [Workspaces operations](https://pubnio.com/docs/reference/#workspaces)
- [Accounts and connections](https://pubnio.com/docs/accounts/)

Source: https://pubnio.com/docs/reference/workspaces-get/index.mdx
