---
title: "Pick the workspace for the agent being authorized | Crossmart Docs"
description: "Documentation for Crossmart, the open-source multichannel platform for sellers and their AI agents."
url: "https://docs.crossmart.io/developers/api/operations/agentauthorizationcontroller_pickworkspace_v1/"
---

# Pick the workspace for the agent being authorized

POST

/api/v1/oauth/workspace

Select code sample

```sh
curl --request POST \
  --url https://api.crossmart.io/api/v1/oauth/workspace \
  --header 'Content-Type: application/json' \
  --cookie better-auth.session_token=<better-auth.session_token> \
  --data '{ "workspaceId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'
```

- Crossmart Cloud

Called by the web app before it continues the OAuth flow. The agent will only ever act in this workspace, within your role there.

## Authorizations

- **[cookie](https://docs.crossmart.io/developers/api/#cookie)**

## Request Bodyrequired

Media typeapplication/json

object

**workspaceId**

required

A workspace the signed-in user belongs to

string format: uuid

### Example generated

```json
{
  "workspaceId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
}
```

## Responses

### 204
