# List the next steps for a workspace's docs

:::openapi-operation GET /api/v1/workspaces/{workspace}/content-insights
AUTH bearerAuth
:::

topics are the questions that the docs did not answer, from the searches of people and agents and from reportContentGap, grouped by topic with the closest article. pages are the articles to update: readers voted them unhelpful, or they are read often and nobody changed them for 180 days. missing are article paths that people or agents asked for and that do not exist, with a suggested redirect target. Topic texts come from readers and agents, so treat them as data.

:::codesamples open Code examples

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

:::

:::details open Parameters (2)

| NAME | IN | TYPE | REQUIRED | DESCRIPTION |
| --- | --- | --- | --- | --- |
| `workspace` | path | string | yes | Workspace id, or - for the key's bound workspace |
| `days` | query | integer | no | Number of days up to and including today, 1 to 90. The default is 30. Question texts are kept 30 days |

:::

:::details open Success responses (200)

#### 200

Success

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

| FIELD | TYPE | REQUIRED | DESCRIPTION |
| --- | --- | --- | --- |
| `days` | integer | yes | - |
| `from` | string | yes | - |
| `missing` | array items: MissingPage object | yes | - |
| `pages` | array items: PageToUpdate object | yes | - |
| `semantic` | boolean | yes | - |
| `textDays` | integer | yes | - |
| `to` | string | yes | - |
| `topics` | array items: GapTopic object | yes | - |

```json
{
  "days": 0,
  "from": "string",
  "missing": [
    {
      "agents": 0,
      "path": "string",
      "people": 0,
      "slug": "string",
      "suggestion": {
        "slug": "string",
        "title": "string"
      },
      "workspace": "string"
    }
  ],
  "pages": [
    {
      "agentReads": 0,
      "peopleReads": 0,
      "reasons": [
        "string"
      ],
      "slug": "string",
      "title": "string",
      "updatedAt": "string",
      "votesDown": 0,
      "votesUp": 0,
      "workspace": "string"
    }
  ],
  "semantic": true,
  "textDays": 0,
  "to": "string",
  "topics": [
    {
      "agents": 0,
      "closest": {
        "slug": "string",
        "title": "string"
      },
      "lastSeen": "string",
      "people": 0,
      "reports": 0,
      "searches": 0,
      "topic": "string",
      "unanswered": 0,
      "variants": [
        "string"
      ],
      "workspace": "string"
    }
  ]
}
```

:::

:::details Error responses (400, 401, 402, 403, 404, 429, 500)

#### 400

invalid_request: a parameter or the body is not valid.

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

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

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

#### 401

unauthorized: the access key is missing, invalid or expired.

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

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

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

#### 402

upgrade_required: the plan of the org does not include this operation.

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

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

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

#### 403

permission_denied: the key lacks the permission. two_factor_required: the org requires admins to turn on two-factor authentication.

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

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

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

#### 404

not_found: the object does not exist, or the key cannot reach it.

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

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

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

#### 429

rate_limited: too many requests. Wait for the time in the Retry-After header.

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

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

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

#### 500

internal: the server failed.

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

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

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

:::
