---
title: "Open a discussion anchored to this document"
---

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

# Open a discussion anchored to this document

Path: CloudRaker Workspace API › Documents

`POST /workspace/sessions/{sessionId}/artifacts/{artifactId}/discussion`

## Authentication

- `bearerAuth`, http, header `Authorization`

## Path parameters

- `sessionId` (`openWorkspaceDocumentDiscussion.path.sessionId`; string, required)
- `artifactId` (`openWorkspaceDocumentDiscussion.path.artifactId`; string, required)

## Request body

_Required._

- `requestId` (`openWorkspaceDocumentDiscussion.requestId`; string, required)
  - minLength 1; maxLength 128
- `anchor` (`openWorkspaceDocumentDiscussion.anchor`; object, optional)
  - `from` (`openWorkspaceDocumentDiscussion.anchor.from`; integer, required)
    - min 0; max 9007199254740991
  - `to` (`openWorkspaceDocumentDiscussion.anchor.to`; integer, required)
    - min 0; max 9007199254740991
  - `quote` (`openWorkspaceDocumentDiscussion.anchor.quote`; string, optional)
    - minLength 1; maxLength 2000

## Example request

```json
{
  "requestId": "string",
  "anchor": {
    "from": 9007199254740991,
    "to": 9007199254740991,
    "quote": "string"
  }
}
```

## Code samples

### cURL

```bash
curl --request POST \
  --url 'https://api.cloudraker.com/workspace/sessions/<sessionId>/artifacts/<artifactId>/discussion' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "requestId": "string",
  "anchor": {
    "from": 9007199254740991,
    "to": 9007199254740991,
    "quote": "string"
  }
}
'
```

### TypeScript

```typescript
const url = 'https://api.cloudraker.com/workspace/sessions/<sessionId>/artifacts/<artifactId>/discussion';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json', Authorization: 'Bearer <token>'},
  body: JSON.stringify({
    requestId: 'string',
    anchor: {from: 9007199254740991, to: 9007199254740991, quote: 'string'}
  })
};

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

### Python

```python
import requests

url = "https://api.cloudraker.com/workspace/sessions/<sessionId>/artifacts/<artifactId>/discussion"

payload = {
    "requestId": "string",
    "anchor": {
        "from": 9007199254740991,
        "to": 9007199254740991,
        "quote": "string"
    }
}
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer <token>"
}

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

print(response.text)
```

## Responses

### 200

The document discussion thread id. Retrying the same request reuses it.

### 400

Invalid request id or anchor range.

### 403

The caller must be a human participant.

### 404

The session or document is unavailable to this caller.

### 409

The anchor no longer matches the document.


Source: https://docs.cloudraker.com/workspace/api/documents/open-workspace-document-discussion/index.md
