> For the complete documentation index, see [llms.txt](https://publer.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://publer.com/docs/api-reference/workspaces.md).

# Workspaces

Manage organizational units (“workspaces”) that group social accounts, members, and content. Workspaces help agencies, brands, and departments keep clients and campaigns separate under a single Publer login.

### Requirements

* **Authentication**: Bearer API token
* **Scope**: `workspaces`
* **Headers**:
  * `Authorization: Bearer-API YOUR_API_KEY`

### Endpoint

#### List Workspaces

Retrieve all workspaces accessible by the authenticated user.

```http
GET /api/v1/workspaces
```

## List Workspaces

> Retrieves a list of all workspaces that the authenticated user has access to.

```json
{"openapi":"3.1.1","info":{"title":"Publer API","version":"1.0.0"},"tags":[{"name":"Workspaces","description":"Endpoints for managing workspaces and teams"}],"servers":[{"url":"https://app.publer.com/api/v1"}],"security":[{"BearerApiAuth":[]}],"components":{"securitySchemes":{"BearerApiAuth":{"type":"apiKey","name":"Authorization","in":"header","description":"API key authentication. Format: \"Bearer-API YOUR_API_KEY\""}},"schemas":{"Workspace":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the workspace"},"owner":{"type":"object","description":"Information about the workspace owner","properties":{"id":{"type":"string","description":"Unique identifier for the owner"},"email":{"type":"string","description":"Email address of the owner"},"name":{"type":"string","description":"Username of the owner"},"first_name":{"type":"string","description":"First name of the owner"},"picture":{"type":"string","description":"URL to the owner's profile picture"}}},"name":{"type":"string","description":"The workspace's display name"},"members":{"type":"array","description":"List of users with access to the workspace","items":{"type":"object"}},"plan":{"type":"string","description":"Subscription plan of the workspace"},"picture":{"type":"string","description":"URL to the workspace's logo"}}},"401ErrorResponse":{"type":"object","properties":{"errors":{"type":"array","description":"List of error messages","items":{"type":"string"}}}},"403ErrorResponse":{"type":"object","properties":{"errors":{"type":"array","description":"List of error messages","items":{"type":"string"}}}}}},"paths":{"/workspaces":{"get":{"summary":"List Workspaces","description":"Retrieves a list of all workspaces that the authenticated user has access to.","tags":["Workspaces"],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Workspace"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/401ErrorResponse"}}}},"403":{"description":"Permission denied or missing required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/403ErrorResponse"}}}}}}}}}
```

### Working with Workspaces

* A user can belong to multiple workspaces.
* Each workspace has its own accounts, posts, and settings.
* Use the workspace context (`Publer-Workspace-Id` header) to target API calls at the correct workspace.

### Workspace Context for Other Endpoints

Many endpoints require you to specify which workspace you’re operating in. Include the `Publer-Workspace-Id` header:

```bash
curl -X GET https://app.publer.com/api/v1/accounts \
  -H "Authorization: Bearer-API YOUR_API_KEY" \
  -H "Publer-Workspace-Id: 61a7c2e4f9e8c3b2d1e0f9a8"
```

### Related Resources

* [Users API](/docs/api-reference/users.md) - Access user profile information
* [Accounts API](/docs/api-reference/accounts.md) - Access social accounts within workspaces
* [Posts API](/docs/posting/create-posts.md) — Create, schedule, and manage content


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://publer.com/docs/api-reference/workspaces.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
