---
title: "Dry-run — given a contact (or contact id), return which team would match"
---

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

Path: Channel Automation API › AgentTeams

`POST /api/agent-teams/workspace/{workspaceId}/preview`

## Request body

- `contact_id` (`post/api/agent-teams/workspace/workspaceId/preview.contact_id`; string, optional)
- `contact` (`post/api/agent-teams/workspace/workspaceId/preview.contact`; object, optional) — Inline contact for preview without persisting

## Example request

```json
{
  "contact_id": "string",
  "contact": {}
}
```

## Code samples

### cURL

```bash
curl --request POST \
  --url https://api.channelautomation.com/api/agent-teams/workspace/%7BworkspaceId%7D/preview \
  --header 'Content-Type: application/json' \
  --data '
{
  "contact_id": "string",
  "contact": {}
}
'
```

### TypeScript

```typescript
const url = 'https://api.channelautomation.com/api/agent-teams/workspace/%7BworkspaceId%7D/preview';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: JSON.stringify({contact_id: 'string', contact: {}})
};

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

### Python

```python
import requests

url = "https://api.channelautomation.com/api/agent-teams/workspace/%7BworkspaceId%7D/preview"

payload = {
    "contact_id": "string",
    "contact": {}
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```


Source: https://developer.channelautomations.com/api/post-api-agent-teams-workspace-workspace-id-preview/index.md
