Source: https://manu-pageloop-kb.docs-staging.pageloop.ai/api-reference/endpoints/createarticle

# Create an article

POST `https://api.pageloop-demo.dev/v2/articles`

## Body

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

#### body (body, string)

## Response

#### 201

The created article.

#### id (string, required)

#### title (string, required)

#### status (enum (string), required)

#### updatedAt (string)

#### 422

Validation failed.

#### Request

```bash cURL
curl -X POST 'https://api.pageloop-demo.dev/v2/articles' \
  -H 'Authorization: Bearer <token>' \
  -H 'Content-Type: application/json' \
  -d '{"title": "string", "body": "string"}'
```

```javascript JavaScript
const res = await fetch('https://api.pageloop-demo.dev/v2/articles', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer <token>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"title": "string", "body": "string"}),
});
const data = await res.json();
```

```python Python
import requests

res = requests.post(
    'https://api.pageloop-demo.dev/v2/articles',
    headers={'Authorization': 'Bearer <token>'},
    json={"title": "string", "body": "string"}
)
data = res.json()
```

#### Response

```json 201
{
  "id": "string",
  "title": "string",
  "status": "draft",
  "updatedAt": "date-time"
}
```
