Source: https://dinakar-planhat.docs-staging.pageloop.ai/api-reference/suggestions/createsuggestion

# Create a suggestion

POST `https://api.pageloop.ai/v1/suggestions`

Submit a documentation update suggestion for review.

## Body

#### articleId (body, string, required)

Article the suggestion applies to.

#### body (body, string, required)

Proposed change, in Markdown.

#### source (body, enum (string)) — allowed: slack, intercom, linear, manual

Where the suggestion originated.

## Response

#### 201

Created suggestion

#### id (string)

Suggestion identifier.

#### state (enum (string)) — allowed: pending, accepted, rejected

Review state.

#### Request

```bash cURL
curl -X POST 'https://api.pageloop.ai/v1/suggestions' \
  -H 'Authorization: Bearer <token>' \
  -H 'Content-Type: application/json' \
  -d '{"articleId": "string", "body": "string", "source": "slack"}'
```

```javascript JavaScript
const res = await fetch('https://api.pageloop.ai/v1/suggestions', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer <token>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"articleId": "string", "body": "string", "source": "slack"}),
});
const data = await res.json();
```

```python Python
import requests

res = requests.post(
    'https://api.pageloop.ai/v1/suggestions',
    headers={'Authorization': 'Bearer <token>'},
    json={"articleId": "string", "body": "string", "source": "slack"}
)
data = res.json()
```

#### Response

```json 201
{
  "id": "string",
  "state": "pending"
}
```
