# Content

## GET /api/v1/workspaces/{workspace}/articles

List articles (sidebar tree)

**Auth:** bearerAuth

:::codesamples Code examples

```bash:curl
curl -X GET "https://contextowl.co/api/v1/api/v1/workspaces/string/articles" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <token>"
```

```java:Java
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class Example {
  public static void main(String[] args) throws Exception {
    var client = HttpClient.newHttpClient();
    var request = HttpRequest.newBuilder()
        .uri(URI.create("https://contextowl.co/api/v1/api/v1/workspaces/string/articles"))
        .header("Accept", "application/json")
        .header("Authorization", "Bearer <token>")
        .method("GET", HttpRequest.BodyPublishers.noBody())
        .build();

    var response = client.send(request, HttpResponse.BodyHandlers.ofString());
    System.out.println(response.statusCode());
    System.out.println(response.body());
  }
}
```

```python:Python
import urllib.request

url = "https://contextowl.co/api/v1/api/v1/workspaces/string/articles"
headers = {
    "Accept": "application/json",
    "Authorization": "Bearer <token>",
}
data = None
req = urllib.request.Request(url, data=data, headers=headers, method="GET")
with urllib.request.urlopen(req) as res:
    print(res.status)
    print(res.read().decode())
```

```typescript:TypeScript
const response = await fetch("https://contextowl.co/api/v1/api/v1/workspaces/string/articles", {
  method: "GET",
  headers: {
    "Accept": "application/json",
    "Authorization": "Bearer <token>",
  }
});

console.log(response.status);
console.log(await response.json());
```

```go:Go
package main

import (
	"fmt"
	"io"
	"net/http"
	"time"
)

func main() {
	req, err := http.NewRequest("GET", "https://contextowl.co/api/v1/api/v1/workspaces/string/articles", nil)
	if err != nil {
		panic(err)
	}
	req.Header.Set("Accept", "application/json")
	req.Header.Set("Authorization", "Bearer <token>")
	client := &http.Client{Timeout: 30 * time.Second}
	res, err := client.Do(req)
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()
	bodyBytes, err := io.ReadAll(io.LimitReader(res.Body, 10<<20))
	if err != nil {
		panic(err)
	}
	fmt.Println(res.StatusCode)
	fmt.Println(string(bodyBytes))
}
```

```rust:Rust
// cargo add reqwest --features blocking
fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = reqwest::blocking::Client::new();
    let response = client.request(reqwest::Method::GET, "https://contextowl.co/api/v1/api/v1/workspaces/string/articles")
        .header("Accept", "application/json")
        .header("Authorization", "Bearer <token>")
        .send()?;

    println!("{}", response.status());
    println!("{}", response.text()?);
    Ok(())
}
```

:::

:::details open Parameters

| NAME | IN | TYPE | REQUIRED | DESCRIPTION |
| --- | --- | --- | --- | --- |
| `workspace` | path | string | yes | Workspace id, or - for the key's bound workspace |

:::

:::details open Responses

#### 200

Success

**Content-Type:** `application/json`

| FIELD | TYPE | REQUIRED | DESCRIPTION |
| --- | --- | --- | --- |
| `[]encrypted` | boolean | yes | - |
| `[]nav` | string | yes | - |
| `[]section` | string | yes | - |
| `[]slug` | string | yes | - |
| `[]status` | string | yes | - |
| `[]title` | string | yes | - |

```json
[
  {
    "encrypted": true,
    "nav": "string",
    "section": "string",
    "slug": "string",
    "status": "string",
    "title": "string"
  }
]
```

#### 400

Bad request

**Content-Type:** `application/json`

| FIELD | TYPE | REQUIRED | DESCRIPTION |
| --- | --- | --- | --- |
| `error` | object | yes | - |

```json
{
  "error": {
    "code": "string",
    "details": null,
    "message": "string",
    "status": 0
  }
}
```

#### 401

Unauthorized

**Content-Type:** `application/json`

| FIELD | TYPE | REQUIRED | DESCRIPTION |
| --- | --- | --- | --- |
| `error` | object | yes | - |

```json
{
  "error": {
    "code": "string",
    "details": null,
    "message": "string",
    "status": 0
  }
}
```

#### 403

Forbidden

**Content-Type:** `application/json`

| FIELD | TYPE | REQUIRED | DESCRIPTION |
| --- | --- | --- | --- |
| `error` | object | yes | - |

```json
{
  "error": {
    "code": "string",
    "details": null,
    "message": "string",
    "status": 0
  }
}
```

#### 404

Not found

**Content-Type:** `application/json`

| FIELD | TYPE | REQUIRED | DESCRIPTION |
| --- | --- | --- | --- |
| `error` | object | yes | - |

```json
{
  "error": {
    "code": "string",
    "details": null,
    "message": "string",
    "status": 0
  }
}
```

#### 429

Rate limited

**Content-Type:** `application/json`

| FIELD | TYPE | REQUIRED | DESCRIPTION |
| --- | --- | --- | --- |
| `error` | object | yes | - |

```json
{
  "error": {
    "code": "string",
    "details": null,
    "message": "string",
    "status": 0
  }
}
```

:::

## POST /api/v1/workspaces/{workspace}/articles

Create a draft article

**Auth:** bearerAuth

:::codesamples Code examples

```bash:curl
curl -X POST "https://contextowl.co/api/v1/api/v1/workspaces/string/articles" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  --data '{
  "markdown": "string",
  "section": "string",
  "title": "string"
}'
```

```java:Java
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class Example {
  public static void main(String[] args) throws Exception {
    var client = HttpClient.newHttpClient();
    var request = HttpRequest.newBuilder()
        .uri(URI.create("https://contextowl.co/api/v1/api/v1/workspaces/string/articles"))
        .header("Accept", "application/json")
        .header("Authorization", "Bearer <token>")
        .header("Content-Type", "application/json")
        .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"markdown\": \"string\",\n  \"section\": \"string\",\n  \"title\": \"string\"\n}"))
        .build();

    var response = client.send(request, HttpResponse.BodyHandlers.ofString());
    System.out.println(response.statusCode());
    System.out.println(response.body());
  }
}
```

```python:Python
import urllib.request

url = "https://contextowl.co/api/v1/api/v1/workspaces/string/articles"
headers = {
    "Accept": "application/json",
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json",
}
data = "{\n  \"markdown\": \"string\",\n  \"section\": \"string\",\n  \"title\": \"string\"\n}".encode("utf-8")
req = urllib.request.Request(url, data=data, headers=headers, method="POST")
with urllib.request.urlopen(req) as res:
    print(res.status)
    print(res.read().decode())
```

```typescript:TypeScript
const response = await fetch("https://contextowl.co/api/v1/api/v1/workspaces/string/articles", {
  method: "POST",
  headers: {
    "Accept": "application/json",
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "markdown": "string",
    "section": "string",
    "title": "string"
  })
});

console.log(response.status);
console.log(await response.json());
```

```go:Go
package main

import (
	"fmt"
	"io"
	"net/http"
	"strings"
	"time"
)

func main() {
	body := strings.NewReader(`{
  "markdown": "string",
  "section": "string",
  "title": "string"
}`)
	req, err := http.NewRequest("POST", "https://contextowl.co/api/v1/api/v1/workspaces/string/articles", body)
	if err != nil {
		panic(err)
	}
	req.Header.Set("Accept", "application/json")
	req.Header.Set("Authorization", "Bearer <token>")
	req.Header.Set("Content-Type", "application/json")
	client := &http.Client{Timeout: 30 * time.Second}
	res, err := client.Do(req)
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()
	bodyBytes, err := io.ReadAll(io.LimitReader(res.Body, 10<<20))
	if err != nil {
		panic(err)
	}
	fmt.Println(res.StatusCode)
	fmt.Println(string(bodyBytes))
}
```

```rust:Rust
// cargo add reqwest --features blocking
fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = reqwest::blocking::Client::new();
    let response = client.request(reqwest::Method::POST, "https://contextowl.co/api/v1/api/v1/workspaces/string/articles")
        .header("Accept", "application/json")
        .header("Authorization", "Bearer <token>")
        .header("Content-Type", "application/json")
        .body("{\n  \"markdown\": \"string\",\n  \"section\": \"string\",\n  \"title\": \"string\"\n}")
        .send()?;

    println!("{}", response.status());
    println!("{}", response.text()?);
    Ok(())
}
```

:::

:::details open Parameters

| NAME | IN | TYPE | REQUIRED | DESCRIPTION |
| --- | --- | --- | --- | --- |
| `workspace` | path | string | yes | Workspace id, or - for the key's bound workspace |

:::

:::details open Request Body

Required: yes

#### application/json

| FIELD | TYPE | REQUIRED | DESCRIPTION |
| --- | --- | --- | --- |
| `markdown` | string | yes | - |
| `section` | string | yes | - |
| `title` | string | yes | - |

```json
{
  "markdown": "string",
  "section": "string",
  "title": "string"
}
```

:::

:::details open Responses

#### 201

Success

**Content-Type:** `application/json`

| FIELD | TYPE | REQUIRED | DESCRIPTION |
| --- | --- | --- | --- |
| `slug` | string | yes | - |

```json
{
  "slug": "string"
}
```

#### 400

Bad request

**Content-Type:** `application/json`

| FIELD | TYPE | REQUIRED | DESCRIPTION |
| --- | --- | --- | --- |
| `error` | object | yes | - |

```json
{
  "error": {
    "code": "string",
    "details": null,
    "message": "string",
    "status": 0
  }
}
```

#### 401

Unauthorized

**Content-Type:** `application/json`

| FIELD | TYPE | REQUIRED | DESCRIPTION |
| --- | --- | --- | --- |
| `error` | object | yes | - |

```json
{
  "error": {
    "code": "string",
    "details": null,
    "message": "string",
    "status": 0
  }
}
```

#### 403

Forbidden

**Content-Type:** `application/json`

| FIELD | TYPE | REQUIRED | DESCRIPTION |
| --- | --- | --- | --- |
| `error` | object | yes | - |

```json
{
  "error": {
    "code": "string",
    "details": null,
    "message": "string",
    "status": 0
  }
}
```

#### 404

Not found

**Content-Type:** `application/json`

| FIELD | TYPE | REQUIRED | DESCRIPTION |
| --- | --- | --- | --- |
| `error` | object | yes | - |

```json
{
  "error": {
    "code": "string",
    "details": null,
    "message": "string",
    "status": 0
  }
}
```

#### 429

Rate limited

**Content-Type:** `application/json`

| FIELD | TYPE | REQUIRED | DESCRIPTION |
| --- | --- | --- | --- |
| `error` | object | yes | - |

```json
{
  "error": {
    "code": "string",
    "details": null,
    "message": "string",
    "status": 0
  }
}
```

:::

## GET /api/v1/workspaces/{workspace}/articles/{slug}

Get one article

**Auth:** bearerAuth

:::codesamples Code examples

```bash:curl
curl -X GET "https://contextowl.co/api/v1/api/v1/workspaces/string/articles/string" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <token>"
```

```java:Java
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class Example {
  public static void main(String[] args) throws Exception {
    var client = HttpClient.newHttpClient();
    var request = HttpRequest.newBuilder()
        .uri(URI.create("https://contextowl.co/api/v1/api/v1/workspaces/string/articles/string"))
        .header("Accept", "application/json")
        .header("Authorization", "Bearer <token>")
        .method("GET", HttpRequest.BodyPublishers.noBody())
        .build();

    var response = client.send(request, HttpResponse.BodyHandlers.ofString());
    System.out.println(response.statusCode());
    System.out.println(response.body());
  }
}
```

```python:Python
import urllib.request

url = "https://contextowl.co/api/v1/api/v1/workspaces/string/articles/string"
headers = {
    "Accept": "application/json",
    "Authorization": "Bearer <token>",
}
data = None
req = urllib.request.Request(url, data=data, headers=headers, method="GET")
with urllib.request.urlopen(req) as res:
    print(res.status)
    print(res.read().decode())
```

```typescript:TypeScript
const response = await fetch("https://contextowl.co/api/v1/api/v1/workspaces/string/articles/string", {
  method: "GET",
  headers: {
    "Accept": "application/json",
    "Authorization": "Bearer <token>",
  }
});

console.log(response.status);
console.log(await response.json());
```

```go:Go
package main

import (
	"fmt"
	"io"
	"net/http"
	"time"
)

func main() {
	req, err := http.NewRequest("GET", "https://contextowl.co/api/v1/api/v1/workspaces/string/articles/string", nil)
	if err != nil {
		panic(err)
	}
	req.Header.Set("Accept", "application/json")
	req.Header.Set("Authorization", "Bearer <token>")
	client := &http.Client{Timeout: 30 * time.Second}
	res, err := client.Do(req)
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()
	bodyBytes, err := io.ReadAll(io.LimitReader(res.Body, 10<<20))
	if err != nil {
		panic(err)
	}
	fmt.Println(res.StatusCode)
	fmt.Println(string(bodyBytes))
}
```

```rust:Rust
// cargo add reqwest --features blocking
fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = reqwest::blocking::Client::new();
    let response = client.request(reqwest::Method::GET, "https://contextowl.co/api/v1/api/v1/workspaces/string/articles/string")
        .header("Accept", "application/json")
        .header("Authorization", "Bearer <token>")
        .send()?;

    println!("{}", response.status());
    println!("{}", response.text()?);
    Ok(())
}
```

:::

:::details open Parameters

| NAME | IN | TYPE | REQUIRED | DESCRIPTION |
| --- | --- | --- | --- | --- |
| `workspace` | path | string | yes | Workspace id, or - for the key's bound workspace |
| `slug` | path | string | yes | - |

:::

:::details open Responses

#### 200

Success

**Content-Type:** `application/json`

| FIELD | TYPE | REQUIRED | DESCRIPTION |
| --- | --- | --- | --- |
| `archived` | boolean | yes | - |
| `author` | string | yes | - |
| `createdAt` | string (date-time) | yes | - |
| `encrypted` | boolean | yes | - |
| `isFolder` | boolean | yes | - |
| `kicker` | string | yes | - |
| `level` | integer | yes | - |
| `locked` | boolean | yes | - |
| `markdown` | string | yes | - |
| `method` | string | no | - |
| `nav` | string | yes | - |
| `navLabel` | string | yes | - |
| `section` | string | yes | - |
| `slug` | string | yes | - |
| `sort` | integer | yes | - |
| `source` | string | no | - |
| `sourceRef` | string | no | - |
| `status` | string | yes | - |
| `title` | string | yes | - |
| `updatedAt` | string (date-time) | yes | - |
| `updatedLabel` | string | yes | - |
| `views` | integer | yes | - |
| `visibility` | string | yes | - |

```json
{
  "archived": true,
  "author": "string",
  "createdAt": "string",
  "encrypted": true,
  "isFolder": true,
  "kicker": "string",
  "level": 0,
  "locked": true,
  "markdown": "string",
  "method": "string",
  "nav": "string",
  "navLabel": "string",
  "section": "string",
  "slug": "string",
  "sort": 0,
  "source": "string",
  "sourceRef": "string",
  "status": "string",
  "title": "string",
  "updatedAt": "string",
  "updatedLabel": "string",
  "views": 0,
  "visibility": "string"
}
```

#### 400

Bad request

**Content-Type:** `application/json`

| FIELD | TYPE | REQUIRED | DESCRIPTION |
| --- | --- | --- | --- |
| `error` | object | yes | - |

```json
{
  "error": {
    "code": "string",
    "details": null,
    "message": "string",
    "status": 0
  }
}
```

#### 401

Unauthorized

**Content-Type:** `application/json`

| FIELD | TYPE | REQUIRED | DESCRIPTION |
| --- | --- | --- | --- |
| `error` | object | yes | - |

```json
{
  "error": {
    "code": "string",
    "details": null,
    "message": "string",
    "status": 0
  }
}
```

#### 403

Forbidden

**Content-Type:** `application/json`

| FIELD | TYPE | REQUIRED | DESCRIPTION |
| --- | --- | --- | --- |
| `error` | object | yes | - |

```json
{
  "error": {
    "code": "string",
    "details": null,
    "message": "string",
    "status": 0
  }
}
```

#### 404

Not found

**Content-Type:** `application/json`

| FIELD | TYPE | REQUIRED | DESCRIPTION |
| --- | --- | --- | --- |
| `error` | object | yes | - |

```json
{
  "error": {
    "code": "string",
    "details": null,
    "message": "string",
    "status": 0
  }
}
```

#### 429

Rate limited

**Content-Type:** `application/json`

| FIELD | TYPE | REQUIRED | DESCRIPTION |
| --- | --- | --- | --- |
| `error` | object | yes | - |

```json
{
  "error": {
    "code": "string",
    "details": null,
    "message": "string",
    "status": 0
  }
}
```

:::

## PATCH /api/v1/workspaces/{workspace}/articles/{slug}

Update an article (status change needs article.publish)

**Auth:** bearerAuth

:::codesamples Code examples

```bash:curl
curl -X PATCH "https://contextowl.co/api/v1/api/v1/workspaces/string/articles/string" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  --data '{
  "markdown": "string",
  "section": "string",
  "status": "string",
  "title": "string"
}'
```

```java:Java
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class Example {
  public static void main(String[] args) throws Exception {
    var client = HttpClient.newHttpClient();
    var request = HttpRequest.newBuilder()
        .uri(URI.create("https://contextowl.co/api/v1/api/v1/workspaces/string/articles/string"))
        .header("Accept", "application/json")
        .header("Authorization", "Bearer <token>")
        .header("Content-Type", "application/json")
        .method("PATCH", HttpRequest.BodyPublishers.ofString("{\n  \"markdown\": \"string\",\n  \"section\": \"string\",\n  \"status\": \"string\",\n  \"title\": \"string\"\n}"))
        .build();

    var response = client.send(request, HttpResponse.BodyHandlers.ofString());
    System.out.println(response.statusCode());
    System.out.println(response.body());
  }
}
```

```python:Python
import urllib.request

url = "https://contextowl.co/api/v1/api/v1/workspaces/string/articles/string"
headers = {
    "Accept": "application/json",
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json",
}
data = "{\n  \"markdown\": \"string\",\n  \"section\": \"string\",\n  \"status\": \"string\",\n  \"title\": \"string\"\n}".encode("utf-8")
req = urllib.request.Request(url, data=data, headers=headers, method="PATCH")
with urllib.request.urlopen(req) as res:
    print(res.status)
    print(res.read().decode())
```

```typescript:TypeScript
const response = await fetch("https://contextowl.co/api/v1/api/v1/workspaces/string/articles/string", {
  method: "PATCH",
  headers: {
    "Accept": "application/json",
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "markdown": "string",
    "section": "string",
    "status": "string",
    "title": "string"
  })
});

console.log(response.status);
console.log(await response.json());
```

```go:Go
package main

import (
	"fmt"
	"io"
	"net/http"
	"strings"
	"time"
)

func main() {
	body := strings.NewReader(`{
  "markdown": "string",
  "section": "string",
  "status": "string",
  "title": "string"
}`)
	req, err := http.NewRequest("PATCH", "https://contextowl.co/api/v1/api/v1/workspaces/string/articles/string", body)
	if err != nil {
		panic(err)
	}
	req.Header.Set("Accept", "application/json")
	req.Header.Set("Authorization", "Bearer <token>")
	req.Header.Set("Content-Type", "application/json")
	client := &http.Client{Timeout: 30 * time.Second}
	res, err := client.Do(req)
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()
	bodyBytes, err := io.ReadAll(io.LimitReader(res.Body, 10<<20))
	if err != nil {
		panic(err)
	}
	fmt.Println(res.StatusCode)
	fmt.Println(string(bodyBytes))
}
```

```rust:Rust
// cargo add reqwest --features blocking
fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = reqwest::blocking::Client::new();
    let response = client.request(reqwest::Method::PATCH, "https://contextowl.co/api/v1/api/v1/workspaces/string/articles/string")
        .header("Accept", "application/json")
        .header("Authorization", "Bearer <token>")
        .header("Content-Type", "application/json")
        .body("{\n  \"markdown\": \"string\",\n  \"section\": \"string\",\n  \"status\": \"string\",\n  \"title\": \"string\"\n}")
        .send()?;

    println!("{}", response.status());
    println!("{}", response.text()?);
    Ok(())
}
```

:::

:::details open Parameters

| NAME | IN | TYPE | REQUIRED | DESCRIPTION |
| --- | --- | --- | --- | --- |
| `workspace` | path | string | yes | Workspace id, or - for the key's bound workspace |
| `slug` | path | string | yes | - |

:::

:::details open Request Body

Required: yes

#### application/json

| FIELD | TYPE | REQUIRED | DESCRIPTION |
| --- | --- | --- | --- |
| `markdown` | string | no | - |
| `section` | string | no | - |
| `status` | string | no | - |
| `title` | string | no | - |

```json
{
  "markdown": "string",
  "section": "string",
  "status": "string",
  "title": "string"
}
```

:::

:::details open Responses

#### 200

Success

**Content-Type:** `application/json`

| FIELD | TYPE | REQUIRED | DESCRIPTION |
| --- | --- | --- | --- |
| `slug` | string | yes | - |

```json
{
  "slug": "string"
}
```

#### 400

Bad request

**Content-Type:** `application/json`

| FIELD | TYPE | REQUIRED | DESCRIPTION |
| --- | --- | --- | --- |
| `error` | object | yes | - |

```json
{
  "error": {
    "code": "string",
    "details": null,
    "message": "string",
    "status": 0
  }
}
```

#### 401

Unauthorized

**Content-Type:** `application/json`

| FIELD | TYPE | REQUIRED | DESCRIPTION |
| --- | --- | --- | --- |
| `error` | object | yes | - |

```json
{
  "error": {
    "code": "string",
    "details": null,
    "message": "string",
    "status": 0
  }
}
```

#### 403

Forbidden

**Content-Type:** `application/json`

| FIELD | TYPE | REQUIRED | DESCRIPTION |
| --- | --- | --- | --- |
| `error` | object | yes | - |

```json
{
  "error": {
    "code": "string",
    "details": null,
    "message": "string",
    "status": 0
  }
}
```

#### 404

Not found

**Content-Type:** `application/json`

| FIELD | TYPE | REQUIRED | DESCRIPTION |
| --- | --- | --- | --- |
| `error` | object | yes | - |

```json
{
  "error": {
    "code": "string",
    "details": null,
    "message": "string",
    "status": 0
  }
}
```

#### 429

Rate limited

**Content-Type:** `application/json`

| FIELD | TYPE | REQUIRED | DESCRIPTION |
| --- | --- | --- | --- |
| `error` | object | yes | - |

```json
{
  "error": {
    "code": "string",
    "details": null,
    "message": "string",
    "status": 0
  }
}
```

:::

## POST /api/v1/workspaces/{workspace}/articles/{slug}/placement

Move an article into a section

**Auth:** bearerAuth

:::codesamples Code examples

```bash:curl
curl -X POST "https://contextowl.co/api/v1/api/v1/workspaces/string/articles/string/placement" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  --data '{
  "section": "string"
}'
```

```java:Java
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class Example {
  public static void main(String[] args) throws Exception {
    var client = HttpClient.newHttpClient();
    var request = HttpRequest.newBuilder()
        .uri(URI.create("https://contextowl.co/api/v1/api/v1/workspaces/string/articles/string/placement"))
        .header("Accept", "application/json")
        .header("Authorization", "Bearer <token>")
        .header("Content-Type", "application/json")
        .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"section\": \"string\"\n}"))
        .build();

    var response = client.send(request, HttpResponse.BodyHandlers.ofString());
    System.out.println(response.statusCode());
    System.out.println(response.body());
  }
}
```

```python:Python
import urllib.request

url = "https://contextowl.co/api/v1/api/v1/workspaces/string/articles/string/placement"
headers = {
    "Accept": "application/json",
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json",
}
data = "{\n  \"section\": \"string\"\n}".encode("utf-8")
req = urllib.request.Request(url, data=data, headers=headers, method="POST")
with urllib.request.urlopen(req) as res:
    print(res.status)
    print(res.read().decode())
```

```typescript:TypeScript
const response = await fetch("https://contextowl.co/api/v1/api/v1/workspaces/string/articles/string/placement", {
  method: "POST",
  headers: {
    "Accept": "application/json",
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "section": "string"
  })
});

console.log(response.status);
console.log(await response.json());
```

```go:Go
package main

import (
	"fmt"
	"io"
	"net/http"
	"strings"
	"time"
)

func main() {
	body := strings.NewReader(`{
  "section": "string"
}`)
	req, err := http.NewRequest("POST", "https://contextowl.co/api/v1/api/v1/workspaces/string/articles/string/placement", body)
	if err != nil {
		panic(err)
	}
	req.Header.Set("Accept", "application/json")
	req.Header.Set("Authorization", "Bearer <token>")
	req.Header.Set("Content-Type", "application/json")
	client := &http.Client{Timeout: 30 * time.Second}
	res, err := client.Do(req)
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()
	bodyBytes, err := io.ReadAll(io.LimitReader(res.Body, 10<<20))
	if err != nil {
		panic(err)
	}
	fmt.Println(res.StatusCode)
	fmt.Println(string(bodyBytes))
}
```

```rust:Rust
// cargo add reqwest --features blocking
fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = reqwest::blocking::Client::new();
    let response = client.request(reqwest::Method::POST, "https://contextowl.co/api/v1/api/v1/workspaces/string/articles/string/placement")
        .header("Accept", "application/json")
        .header("Authorization", "Bearer <token>")
        .header("Content-Type", "application/json")
        .body("{\n  \"section\": \"string\"\n}")
        .send()?;

    println!("{}", response.status());
    println!("{}", response.text()?);
    Ok(())
}
```

:::

:::details open Parameters

| NAME | IN | TYPE | REQUIRED | DESCRIPTION |
| --- | --- | --- | --- | --- |
| `workspace` | path | string | yes | Workspace id, or - for the key's bound workspace |
| `slug` | path | string | yes | - |

:::

:::details open Request Body

Required: yes

#### application/json

| FIELD | TYPE | REQUIRED | DESCRIPTION |
| --- | --- | --- | --- |
| `section` | string | yes | - |

```json
{
  "section": "string"
}
```

:::

:::details open Responses

#### 200

Success

**Content-Type:** `application/json`

| FIELD | TYPE | REQUIRED | DESCRIPTION |
| --- | --- | --- | --- |
| `section` | string | yes | - |
| `slug` | string | yes | - |

```json
{
  "section": "string",
  "slug": "string"
}
```

#### 400

Bad request

**Content-Type:** `application/json`

| FIELD | TYPE | REQUIRED | DESCRIPTION |
| --- | --- | --- | --- |
| `error` | object | yes | - |

```json
{
  "error": {
    "code": "string",
    "details": null,
    "message": "string",
    "status": 0
  }
}
```

#### 401

Unauthorized

**Content-Type:** `application/json`

| FIELD | TYPE | REQUIRED | DESCRIPTION |
| --- | --- | --- | --- |
| `error` | object | yes | - |

```json
{
  "error": {
    "code": "string",
    "details": null,
    "message": "string",
    "status": 0
  }
}
```

#### 403

Forbidden

**Content-Type:** `application/json`

| FIELD | TYPE | REQUIRED | DESCRIPTION |
| --- | --- | --- | --- |
| `error` | object | yes | - |

```json
{
  "error": {
    "code": "string",
    "details": null,
    "message": "string",
    "status": 0
  }
}
```

#### 404

Not found

**Content-Type:** `application/json`

| FIELD | TYPE | REQUIRED | DESCRIPTION |
| --- | --- | --- | --- |
| `error` | object | yes | - |

```json
{
  "error": {
    "code": "string",
    "details": null,
    "message": "string",
    "status": 0
  }
}
```

#### 429

Rate limited

**Content-Type:** `application/json`

| FIELD | TYPE | REQUIRED | DESCRIPTION |
| --- | --- | --- | --- |
| `error` | object | yes | - |

```json
{
  "error": {
    "code": "string",
    "details": null,
    "message": "string",
    "status": 0
  }
}
```

:::

## GET /api/v1/workspaces/{workspace}/proposals

List edit proposals

**Auth:** bearerAuth

:::codesamples Code examples

```bash:curl
curl -X GET "https://contextowl.co/api/v1/api/v1/workspaces/string/proposals?status=pending" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <token>"
```

```java:Java
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class Example {
  public static void main(String[] args) throws Exception {
    var client = HttpClient.newHttpClient();
    var request = HttpRequest.newBuilder()
        .uri(URI.create("https://contextowl.co/api/v1/api/v1/workspaces/string/proposals?status=pending"))
        .header("Accept", "application/json")
        .header("Authorization", "Bearer <token>")
        .method("GET", HttpRequest.BodyPublishers.noBody())
        .build();

    var response = client.send(request, HttpResponse.BodyHandlers.ofString());
    System.out.println(response.statusCode());
    System.out.println(response.body());
  }
}
```

```python:Python
import urllib.request

url = "https://contextowl.co/api/v1/api/v1/workspaces/string/proposals?status=pending"
headers = {
    "Accept": "application/json",
    "Authorization": "Bearer <token>",
}
data = None
req = urllib.request.Request(url, data=data, headers=headers, method="GET")
with urllib.request.urlopen(req) as res:
    print(res.status)
    print(res.read().decode())
```

```typescript:TypeScript
const response = await fetch("https://contextowl.co/api/v1/api/v1/workspaces/string/proposals?status=pending", {
  method: "GET",
  headers: {
    "Accept": "application/json",
    "Authorization": "Bearer <token>",
  }
});

console.log(response.status);
console.log(await response.json());
```

```go:Go
package main

import (
	"fmt"
	"io"
	"net/http"
	"time"
)

func main() {
	req, err := http.NewRequest("GET", "https://contextowl.co/api/v1/api/v1/workspaces/string/proposals?status=pending", nil)
	if err != nil {
		panic(err)
	}
	req.Header.Set("Accept", "application/json")
	req.Header.Set("Authorization", "Bearer <token>")
	client := &http.Client{Timeout: 30 * time.Second}
	res, err := client.Do(req)
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()
	bodyBytes, err := io.ReadAll(io.LimitReader(res.Body, 10<<20))
	if err != nil {
		panic(err)
	}
	fmt.Println(res.StatusCode)
	fmt.Println(string(bodyBytes))
}
```

```rust:Rust
// cargo add reqwest --features blocking
fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = reqwest::blocking::Client::new();
    let response = client.request(reqwest::Method::GET, "https://contextowl.co/api/v1/api/v1/workspaces/string/proposals?status=pending")
        .header("Accept", "application/json")
        .header("Authorization", "Bearer <token>")
        .send()?;

    println!("{}", response.status());
    println!("{}", response.text()?);
    Ok(())
}
```

:::

:::details open Parameters

| NAME | IN | TYPE | REQUIRED | DESCRIPTION |
| --- | --- | --- | --- | --- |
| `workspace` | path | string | yes | Workspace id, or - for the key's bound workspace |
| `status` | query | string enum: pending, approved, rejected, all | no | pending (default), approved, rejected, or all |

:::

:::details open Responses

#### 200

Success

**Content-Type:** `application/json`

| FIELD | TYPE | REQUIRED | DESCRIPTION |
| --- | --- | --- | --- |
| `[]author` | string | yes | - |
| `[]authorId` | integer | no | - |
| `[]createdAt` | string (date-time) | yes | - |
| `[]createdLabel` | string | yes | - |
| `[]id` | integer | yes | - |
| `[]note` | string | yes | - |
| `[]objectType` | string | yes | - |
| `[]payload` | string (byte) | yes | - |
| `[]reviewNote` | string | yes | - |
| `[]reviewedAt` | string (date-time) | no | - |
| `[]reviewedBy` | integer | no | - |
| `[]reviewer` | string | yes | - |
| `[]status` | string | yes | - |
| `[]via` | string | yes | - |
| `[]workspaceId` | string | yes | - |

```json
[
  {
    "author": "string",
    "authorId": 0,
    "createdAt": "string",
    "createdLabel": "string",
    "id": 0,
    "note": "string",
    "objectType": "string",
    "payload": "string",
    "reviewNote": "string",
    "reviewedAt": "string",
    "reviewedBy": 0,
    "reviewer": "string",
    "status": "string",
    "via": "string",
    "workspaceId": "string"
  }
]
```

#### 400

Bad request

**Content-Type:** `application/json`

| FIELD | TYPE | REQUIRED | DESCRIPTION |
| --- | --- | --- | --- |
| `error` | object | yes | - |

```json
{
  "error": {
    "code": "string",
    "details": null,
    "message": "string",
    "status": 0
  }
}
```

#### 401

Unauthorized

**Content-Type:** `application/json`

| FIELD | TYPE | REQUIRED | DESCRIPTION |
| --- | --- | --- | --- |
| `error` | object | yes | - |

```json
{
  "error": {
    "code": "string",
    "details": null,
    "message": "string",
    "status": 0
  }
}
```

#### 403

Forbidden

**Content-Type:** `application/json`

| FIELD | TYPE | REQUIRED | DESCRIPTION |
| --- | --- | --- | --- |
| `error` | object | yes | - |

```json
{
  "error": {
    "code": "string",
    "details": null,
    "message": "string",
    "status": 0
  }
}
```

#### 404

Not found

**Content-Type:** `application/json`

| FIELD | TYPE | REQUIRED | DESCRIPTION |
| --- | --- | --- | --- |
| `error` | object | yes | - |

```json
{
  "error": {
    "code": "string",
    "details": null,
    "message": "string",
    "status": 0
  }
}
```

#### 429

Rate limited

**Content-Type:** `application/json`

| FIELD | TYPE | REQUIRED | DESCRIPTION |
| --- | --- | --- | --- |
| `error` | object | yes | - |

```json
{
  "error": {
    "code": "string",
    "details": null,
    "message": "string",
    "status": 0
  }
}
```

:::

## POST /api/v1/workspaces/{workspace}/proposals

Propose an article edit or new draft for editor review

**Auth:** bearerAuth

:::codesamples Code examples

```bash:curl
curl -X POST "https://contextowl.co/api/v1/api/v1/workspaces/string/proposals" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  --data '{
  "markdown": "string",
  "note": "string",
  "slug": "string",
  "title": "string"
}'
```

```java:Java
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class Example {
  public static void main(String[] args) throws Exception {
    var client = HttpClient.newHttpClient();
    var request = HttpRequest.newBuilder()
        .uri(URI.create("https://contextowl.co/api/v1/api/v1/workspaces/string/proposals"))
        .header("Accept", "application/json")
        .header("Authorization", "Bearer <token>")
        .header("Content-Type", "application/json")
        .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"markdown\": \"string\",\n  \"note\": \"string\",\n  \"slug\": \"string\",\n  \"title\": \"string\"\n}"))
        .build();

    var response = client.send(request, HttpResponse.BodyHandlers.ofString());
    System.out.println(response.statusCode());
    System.out.println(response.body());
  }
}
```

```python:Python
import urllib.request

url = "https://contextowl.co/api/v1/api/v1/workspaces/string/proposals"
headers = {
    "Accept": "application/json",
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json",
}
data = "{\n  \"markdown\": \"string\",\n  \"note\": \"string\",\n  \"slug\": \"string\",\n  \"title\": \"string\"\n}".encode("utf-8")
req = urllib.request.Request(url, data=data, headers=headers, method="POST")
with urllib.request.urlopen(req) as res:
    print(res.status)
    print(res.read().decode())
```

```typescript:TypeScript
const response = await fetch("https://contextowl.co/api/v1/api/v1/workspaces/string/proposals", {
  method: "POST",
  headers: {
    "Accept": "application/json",
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "markdown": "string",
    "note": "string",
    "slug": "string",
    "title": "string"
  })
});

console.log(response.status);
console.log(await response.json());
```

```go:Go
package main

import (
	"fmt"
	"io"
	"net/http"
	"strings"
	"time"
)

func main() {
	body := strings.NewReader(`{
  "markdown": "string",
  "note": "string",
  "slug": "string",
  "title": "string"
}`)
	req, err := http.NewRequest("POST", "https://contextowl.co/api/v1/api/v1/workspaces/string/proposals", body)
	if err != nil {
		panic(err)
	}
	req.Header.Set("Accept", "application/json")
	req.Header.Set("Authorization", "Bearer <token>")
	req.Header.Set("Content-Type", "application/json")
	client := &http.Client{Timeout: 30 * time.Second}
	res, err := client.Do(req)
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()
	bodyBytes, err := io.ReadAll(io.LimitReader(res.Body, 10<<20))
	if err != nil {
		panic(err)
	}
	fmt.Println(res.StatusCode)
	fmt.Println(string(bodyBytes))
}
```

```rust:Rust
// cargo add reqwest --features blocking
fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = reqwest::blocking::Client::new();
    let response = client.request(reqwest::Method::POST, "https://contextowl.co/api/v1/api/v1/workspaces/string/proposals")
        .header("Accept", "application/json")
        .header("Authorization", "Bearer <token>")
        .header("Content-Type", "application/json")
        .body("{\n  \"markdown\": \"string\",\n  \"note\": \"string\",\n  \"slug\": \"string\",\n  \"title\": \"string\"\n}")
        .send()?;

    println!("{}", response.status());
    println!("{}", response.text()?);
    Ok(())
}
```

:::

:::details open Parameters

| NAME | IN | TYPE | REQUIRED | DESCRIPTION |
| --- | --- | --- | --- | --- |
| `workspace` | path | string | yes | Workspace id, or - for the key's bound workspace |

:::

:::details open Request Body

Required: yes

#### application/json

| FIELD | TYPE | REQUIRED | DESCRIPTION |
| --- | --- | --- | --- |
| `markdown` | string | yes | - |
| `note` | string | yes | - |
| `slug` | string | yes | - |
| `title` | string | yes | - |

```json
{
  "markdown": "string",
  "note": "string",
  "slug": "string",
  "title": "string"
}
```

:::

:::details open Responses

#### 201

Success

**Content-Type:** `application/json`

| FIELD | TYPE | REQUIRED | DESCRIPTION |
| --- | --- | --- | --- |
| `id` | integer | yes | - |
| `status` | string | yes | - |

```json
{
  "id": 0,
  "status": "string"
}
```

#### 400

Bad request

**Content-Type:** `application/json`

| FIELD | TYPE | REQUIRED | DESCRIPTION |
| --- | --- | --- | --- |
| `error` | object | yes | - |

```json
{
  "error": {
    "code": "string",
    "details": null,
    "message": "string",
    "status": 0
  }
}
```

#### 401

Unauthorized

**Content-Type:** `application/json`

| FIELD | TYPE | REQUIRED | DESCRIPTION |
| --- | --- | --- | --- |
| `error` | object | yes | - |

```json
{
  "error": {
    "code": "string",
    "details": null,
    "message": "string",
    "status": 0
  }
}
```

#### 403

Forbidden

**Content-Type:** `application/json`

| FIELD | TYPE | REQUIRED | DESCRIPTION |
| --- | --- | --- | --- |
| `error` | object | yes | - |

```json
{
  "error": {
    "code": "string",
    "details": null,
    "message": "string",
    "status": 0
  }
}
```

#### 404

Not found

**Content-Type:** `application/json`

| FIELD | TYPE | REQUIRED | DESCRIPTION |
| --- | --- | --- | --- |
| `error` | object | yes | - |

```json
{
  "error": {
    "code": "string",
    "details": null,
    "message": "string",
    "status": 0
  }
}
```

#### 429

Rate limited

**Content-Type:** `application/json`

| FIELD | TYPE | REQUIRED | DESCRIPTION |
| --- | --- | --- | --- |
| `error` | object | yes | - |

```json
{
  "error": {
    "code": "string",
    "details": null,
    "message": "string",
    "status": 0
  }
}
```

:::

## POST /api/v1/workspaces/{workspace}/sections

Create a nav section

**Auth:** bearerAuth

:::codesamples Code examples

```bash:curl
curl -X POST "https://contextowl.co/api/v1/api/v1/workspaces/string/sections" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  --data '{
  "label": "string"
}'
```

```java:Java
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class Example {
  public static void main(String[] args) throws Exception {
    var client = HttpClient.newHttpClient();
    var request = HttpRequest.newBuilder()
        .uri(URI.create("https://contextowl.co/api/v1/api/v1/workspaces/string/sections"))
        .header("Accept", "application/json")
        .header("Authorization", "Bearer <token>")
        .header("Content-Type", "application/json")
        .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"label\": \"string\"\n}"))
        .build();

    var response = client.send(request, HttpResponse.BodyHandlers.ofString());
    System.out.println(response.statusCode());
    System.out.println(response.body());
  }
}
```

```python:Python
import urllib.request

url = "https://contextowl.co/api/v1/api/v1/workspaces/string/sections"
headers = {
    "Accept": "application/json",
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json",
}
data = "{\n  \"label\": \"string\"\n}".encode("utf-8")
req = urllib.request.Request(url, data=data, headers=headers, method="POST")
with urllib.request.urlopen(req) as res:
    print(res.status)
    print(res.read().decode())
```

```typescript:TypeScript
const response = await fetch("https://contextowl.co/api/v1/api/v1/workspaces/string/sections", {
  method: "POST",
  headers: {
    "Accept": "application/json",
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "label": "string"
  })
});

console.log(response.status);
console.log(await response.json());
```

```go:Go
package main

import (
	"fmt"
	"io"
	"net/http"
	"strings"
	"time"
)

func main() {
	body := strings.NewReader(`{
  "label": "string"
}`)
	req, err := http.NewRequest("POST", "https://contextowl.co/api/v1/api/v1/workspaces/string/sections", body)
	if err != nil {
		panic(err)
	}
	req.Header.Set("Accept", "application/json")
	req.Header.Set("Authorization", "Bearer <token>")
	req.Header.Set("Content-Type", "application/json")
	client := &http.Client{Timeout: 30 * time.Second}
	res, err := client.Do(req)
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()
	bodyBytes, err := io.ReadAll(io.LimitReader(res.Body, 10<<20))
	if err != nil {
		panic(err)
	}
	fmt.Println(res.StatusCode)
	fmt.Println(string(bodyBytes))
}
```

```rust:Rust
// cargo add reqwest --features blocking
fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = reqwest::blocking::Client::new();
    let response = client.request(reqwest::Method::POST, "https://contextowl.co/api/v1/api/v1/workspaces/string/sections")
        .header("Accept", "application/json")
        .header("Authorization", "Bearer <token>")
        .header("Content-Type", "application/json")
        .body("{\n  \"label\": \"string\"\n}")
        .send()?;

    println!("{}", response.status());
    println!("{}", response.text()?);
    Ok(())
}
```

:::

:::details open Parameters

| NAME | IN | TYPE | REQUIRED | DESCRIPTION |
| --- | --- | --- | --- | --- |
| `workspace` | path | string | yes | Workspace id, or - for the key's bound workspace |

:::

:::details open Request Body

Required: yes

#### application/json

| FIELD | TYPE | REQUIRED | DESCRIPTION |
| --- | --- | --- | --- |
| `label` | string | yes | - |

```json
{
  "label": "string"
}
```

:::

:::details open Responses

#### 201

Success

**Content-Type:** `application/json`

| FIELD | TYPE | REQUIRED | DESCRIPTION |
| --- | --- | --- | --- |
| `key` | string | yes | - |
| `label` | string | yes | - |

```json
{
  "key": "string",
  "label": "string"
}
```

#### 400

Bad request

**Content-Type:** `application/json`

| FIELD | TYPE | REQUIRED | DESCRIPTION |
| --- | --- | --- | --- |
| `error` | object | yes | - |

```json
{
  "error": {
    "code": "string",
    "details": null,
    "message": "string",
    "status": 0
  }
}
```

#### 401

Unauthorized

**Content-Type:** `application/json`

| FIELD | TYPE | REQUIRED | DESCRIPTION |
| --- | --- | --- | --- |
| `error` | object | yes | - |

```json
{
  "error": {
    "code": "string",
    "details": null,
    "message": "string",
    "status": 0
  }
}
```

#### 403

Forbidden

**Content-Type:** `application/json`

| FIELD | TYPE | REQUIRED | DESCRIPTION |
| --- | --- | --- | --- |
| `error` | object | yes | - |

```json
{
  "error": {
    "code": "string",
    "details": null,
    "message": "string",
    "status": 0
  }
}
```

#### 404

Not found

**Content-Type:** `application/json`

| FIELD | TYPE | REQUIRED | DESCRIPTION |
| --- | --- | --- | --- |
| `error` | object | yes | - |

```json
{
  "error": {
    "code": "string",
    "details": null,
    "message": "string",
    "status": 0
  }
}
```

#### 429

Rate limited

**Content-Type:** `application/json`

| FIELD | TYPE | REQUIRED | DESCRIPTION |
| --- | --- | --- | --- |
| `error` | object | yes | - |

```json
{
  "error": {
    "code": "string",
    "details": null,
    "message": "string",
    "status": 0
  }
}
```

:::
