---
title: "getWorkspace"
---

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

# getWorkspace

Path: agenthold API › workspaces

`GET /workspaces/{workspaceId}`

URL: `/api/v1/workspaces/{workspaceId}`

## Authentication

Requires one of the following:

- `session`, apiKey, in cookie
- `token`, http bearer, header `Authorization`

## Path parameters

- `workspaceId` (`getWorkspace.path.workspaceId`; string, required)

## Code samples

### cURL

```bash
curl --request GET \
  --url '<base-url>/api/v1/workspaces/<workspaceId>' \
  --cookie 'agenthold_session=<agenthold_session>'
```

### TypeScript

```typescript
const url = '<base-url>/api/v1/workspaces/<workspaceId>';
const options = {
  method: 'GET',
  headers: {cookie: 'agenthold_session=<agenthold_session>'}
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "<base-url>/api/v1/workspaces/<workspaceId>"

headers = {"cookie": "agenthold_session=<agenthold_session>"}

response = requests.get(url, headers=headers)

print(response.text)
```

## Responses

### 200

The workspace.

#### Example

```json
{
  "id": "string",
  "name": "string",
  "personal": true,
  "role": "owner",
  "createdAt": "2019-08-24T14:15:22Z"
}
```

- `id` (`getWorkspace.response.200.id`; string, required)
- `name` (`getWorkspace.response.200.name`; string, required)
- `personal` (`getWorkspace.response.200.personal`; boolean, required)
- `role` (`getWorkspace.response.200.role`; string, required)
  - one of `"owner"`, `"admin"`, `"member"`
- `createdAt` (`getWorkspace.response.200.createdAt`; string, required)
  - format: `date-time`

### 404

Error.

#### Example

```json
{
  "error": "string"
}
```

- `error` (`getWorkspace.response.404.error`; string, required)


Source: https://agenthold.dev/api/workspaces/retrieve/index.md
