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

# REST API examples

> Filter and paginate feedback, then create a request safely from your server.

Complete the [API quickstart](/api/overview) first. These examples build on the same `GLEAN_FEED_API_KEY` environment variable.

## Filter feedback

List up to 10 requests that contain “export” in the title or description:

```bash theme={null}
curl --fail-with-body \
  "https://app.gleanfeed.com/api/v1/feedback?limit=10&search=export" \
  --header "Authorization: Bearer $GLEAN_FEED_API_KEY"
```

This request requires `feedback:read`. You can also filter by `stage` or by a board ID from the same workspace. See [Endpoints](/api/endpoints#feedback) for the supported feedback operations.

## Read the next page

When a list response includes `"hasMore": true`, copy its opaque `nextCursor` into the next request:

```bash theme={null}
curl --fail-with-body \
  "https://app.gleanfeed.com/api/v1/feedback?limit=10&search=export&cursor=PASTE_NEXT_CURSOR" \
  --header "Authorization: Bearer $GLEAN_FEED_API_KEY"
```

Keep every filter from the first request while paging, and pass the cursor exactly as returned. When `hasMore` is `false`, there are no more pages.

## Create a feedback request

Call create operations from your server, where the API key cannot be read by customers. This request needs `feedback:write`.

```bash theme={null}
curl --fail-with-body \
  --request POST \
  "https://app.gleanfeed.com/api/v1/feedback" \
  --header "Authorization: Bearer $GLEAN_FEED_API_KEY" \
  --header "Content-Type: application/json" \
  --header "Idempotency-Key: $(uuidgen)" \
  --header "X-Glean-Feed-Agent: release-bot" \
  --data '{
    "boardId": "product-ideas",
    "title": "Filter exports by board",
    "description": "Let workspace admins export requests from one board.",
    "sourceUrl": "https://app.example.com/admin/exports",
    "metadata": {
      "plan": "growth",
      "entryPoint": "exports-page"
    }
  }'
```

`boardId` accepts a board UUID or slug. Omitting it uses the workspace's first board that accepts requests, so tools that cannot confirm which board you intend should require a selection. `sourceUrl` and `metadata` give your team private context for triage; they are not shown on the public portal. `X-Glean-Feed-Agent` records the agent name in audit context and does not affect authorization.

<Check>
  A successful create returns HTTP `201` and the new request in `data`. Open the Feedback page in
  the dashboard to confirm it appears. Reusing the same `Idempotency-Key` returns the original
  result instead of creating another request.
</Check>

## Next steps

* Review [Authentication](/api/authentication) before deploying a server integration.
* Use [Scopes](/api/scopes) to separate read and write credentials.
* Browse the [endpoint catalog](/api/endpoints) and the live OpenAPI contract at `https://app.gleanfeed.com/api/v1/openapi.json`.
