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

# knowledgeArticles

> List Commerce Agent knowledge articles, optionally filtered by title/body substring, status, or origin.

**Required scopes:** [`commerce_agent_knowledge_read`](/docs/api-reference/v3/reference/scopes#scope-commerce_agent_knowledge_read)

## Arguments

<ResponseField name="after" type="String">
  Forward pagination cursor — returns items after it. Pass an `edges[].cursor` or `pageInfo.endCursor` from a previous page.
</ResponseField>

<ResponseField name="before" type="String">
  Backward pagination cursor — returns items before it. Pass an `edges[].cursor` or `pageInfo.startCursor` from a previous page.
</ResponseField>

<ResponseField name="first" type="Int">
  Forward pagination: returns the first N items (max 100, default 25). Use with `after`; mutually exclusive with `last`/`before`.
</ResponseField>

<ResponseField name="last" type="Int">
  Backward pagination: returns the last N items (max 100, default 25). Use with `before`; mutually exclusive with `first`/`after`.
</ResponseField>

<ResponseField name="orderBy" type={<a href="/docs/api-reference/v3/reference/commerce-agent/knowledge-article-sort-key">KnowledgeArticleSortKey</a>}>
  Which key to sort by (defaults to createdAt, newest-first). Combine with `reverse` to flip direction.
</ResponseField>

<ResponseField name="origin" type={<a href="/docs/api-reference/v3/reference/commerce-agent/knowledge-article-origin">KnowledgeArticleOrigin</a>}>
  Only include articles with this origin.
</ResponseField>

<ResponseField name="query" type="String">
  Case-insensitive substring match on title or content. For ranked search, use `searchKnowledgeArticles`.
</ResponseField>

<ResponseField name="reverse" type="Boolean">
  Reverses the sort direction selected by `orderBy` (or its default).
</ResponseField>

<ResponseField name="status" type={<a href="/docs/api-reference/v3/reference/commerce-agent/knowledge-article-status">KnowledgeArticleStatus</a>}>
  Only include articles with this status.
</ResponseField>

## Returns

<ResponseField name="knowledgeArticles" type={<a href="/docs/api-reference/v3/pagination">KnowledgeArticleConnection!</a>} required>
  A paginated list of KnowledgeArticle items.

  <Expandable title="fields" lazyRender>
    <ResponseField name="edges" type={<a href="/docs/api-reference/v3/pagination">[KnowledgeArticleEdge!]!</a>} required>
      The list of edges (each a node plus its pagination `cursor`).

      <Expandable title="fields" lazyRender>
        <ResponseField name="cursor" type="String!" required>
          Opaque cursor for this item; pass to `after`/`before` to page from here.
        </ResponseField>

        <ResponseField name="node" type={<a href="/docs/api-reference/v3/reference/commerce-agent/knowledge-article">KnowledgeArticle!</a>} required>
          The item at this edge.

          <Expandable title="fields" lazyRender>
            <ResponseField name="content" type="String!" required>
              The article body as authored.
            </ResponseField>

            <ResponseField name="createdAt" type={<a href="/docs/api-reference/v3/reference/common/date-time">DateTime!</a>} required>
              When the article was created.
            </ResponseField>

            <ResponseField name="effectiveEndAt" type={<a href="/docs/api-reference/v3/reference/common/date-time">DateTime</a>}>
              When the article stops being retrievable. Null means no end.
            </ResponseField>

            <ResponseField name="effectiveStartAt" type={<a href="/docs/api-reference/v3/reference/common/date-time">DateTime</a>}>
              When the article becomes retrievable, if `status` is ACTIVE. Null means immediately.
            </ResponseField>

            <ResponseField name="id" type="ID!" required>
              The id of this knowledge article.
            </ResponseField>

            <ResponseField name="origin" type={<a href="/docs/api-reference/v3/reference/commerce-agent/knowledge-article-origin">KnowledgeArticleOrigin!</a>} required>
              How this article was created. Immutable after create.
            </ResponseField>

            <ResponseField name="productFamilies" type={<a href="/docs/api-reference/v3/pagination">ProductFamilyConnection!</a>} required>
              Product families this article cites.

              **Requires:** [`products_read`](/docs/api-reference/v3/reference/scopes#scope-products_read)

              <Expandable title="fields" lazyRender>
                **Arguments**

                <ResponseField name="after" type="String">
                  Forward pagination cursor — returns items after it. Pass an `edges[].cursor` or `pageInfo.endCursor` from a previous page.
                </ResponseField>

                <ResponseField name="before" type="String">
                  Backward pagination cursor — returns items before it. Pass an `edges[].cursor` or `pageInfo.startCursor` from a previous page.
                </ResponseField>

                <ResponseField name="first" type="Int">
                  Forward pagination: returns the first N items (max 100, default 25). Use with `after`; mutually exclusive with `last`/`before`.
                </ResponseField>

                <ResponseField name="last" type="Int">
                  Backward pagination: returns the last N items (max 100, default 25). Use with `before`; mutually exclusive with `first`/`after`.
                </ResponseField>
              </Expandable>
            </ResponseField>

            <ResponseField name="referencedArticles" type={<a href="/docs/api-reference/v3/pagination">KnowledgeArticleConnection!</a>} required>
              Other knowledge articles this article cites.

              **Requires:** [`commerce_agent_knowledge_read`](/docs/api-reference/v3/reference/scopes#scope-commerce_agent_knowledge_read)

              <Expandable title="fields" lazyRender>
                **Arguments**

                <ResponseField name="after" type="String">
                  Forward pagination cursor — returns items after it. Pass an `edges[].cursor` or `pageInfo.endCursor` from a previous page.
                </ResponseField>

                <ResponseField name="before" type="String">
                  Backward pagination cursor — returns items before it. Pass an `edges[].cursor` or `pageInfo.startCursor` from a previous page.
                </ResponseField>

                <ResponseField name="first" type="Int">
                  Forward pagination: returns the first N items (max 100, default 25). Use with `after`; mutually exclusive with `last`/`before`.
                </ResponseField>

                <ResponseField name="last" type="Int">
                  Backward pagination: returns the last N items (max 100, default 25). Use with `before`; mutually exclusive with `first`/`after`.
                </ResponseField>
              </Expandable>
            </ResponseField>

            <ResponseField name="status" type={<a href="/docs/api-reference/v3/reference/commerce-agent/knowledge-article-status">KnowledgeArticleStatus!</a>} required>
              Whether Commerce Agent may retrieve this article. Combine with the effective window.
            </ResponseField>

            <ResponseField name="title" type="String!" required>
              The merchant-facing title of the article.
            </ResponseField>

            <ResponseField name="updatedAt" type={<a href="/docs/api-reference/v3/reference/common/date-time">DateTime!</a>} required>
              When the article body was last edited.
            </ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="nodes" type={<a href="/docs/api-reference/v3/reference/commerce-agent/knowledge-article">[KnowledgeArticle!]!</a>} required>
      The nodes in this page, without the edge/cursor wrapper — a convenience over `edges`.

      <Expandable title="fields" lazyRender>
        <ResponseField name="content" type="String!" required>
          The article body as authored.
        </ResponseField>

        <ResponseField name="createdAt" type={<a href="/docs/api-reference/v3/reference/common/date-time">DateTime!</a>} required>
          When the article was created.
        </ResponseField>

        <ResponseField name="effectiveEndAt" type={<a href="/docs/api-reference/v3/reference/common/date-time">DateTime</a>}>
          When the article stops being retrievable. Null means no end.
        </ResponseField>

        <ResponseField name="effectiveStartAt" type={<a href="/docs/api-reference/v3/reference/common/date-time">DateTime</a>}>
          When the article becomes retrievable, if `status` is ACTIVE. Null means immediately.
        </ResponseField>

        <ResponseField name="id" type="ID!" required>
          The id of this knowledge article.
        </ResponseField>

        <ResponseField name="origin" type={<a href="/docs/api-reference/v3/reference/commerce-agent/knowledge-article-origin">KnowledgeArticleOrigin!</a>} required>
          How this article was created. Immutable after create.
        </ResponseField>

        <ResponseField name="productFamilies" type={<a href="/docs/api-reference/v3/pagination">ProductFamilyConnection!</a>} required>
          Product families this article cites.

          **Requires:** [`products_read`](/docs/api-reference/v3/reference/scopes#scope-products_read)

          <Expandable title="fields" lazyRender>
            **Arguments**

            <ResponseField name="after" type="String">
              Forward pagination cursor — returns items after it. Pass an `edges[].cursor` or `pageInfo.endCursor` from a previous page.
            </ResponseField>

            <ResponseField name="before" type="String">
              Backward pagination cursor — returns items before it. Pass an `edges[].cursor` or `pageInfo.startCursor` from a previous page.
            </ResponseField>

            <ResponseField name="first" type="Int">
              Forward pagination: returns the first N items (max 100, default 25). Use with `after`; mutually exclusive with `last`/`before`.
            </ResponseField>

            <ResponseField name="last" type="Int">
              Backward pagination: returns the last N items (max 100, default 25). Use with `before`; mutually exclusive with `first`/`after`.
            </ResponseField>

            **Fields**

            <ResponseField name="edges" type={<a href="/docs/api-reference/v3/pagination">[ProductFamilyEdge!]!</a>} required>
              The list of edges (each a node plus its pagination `cursor`).
            </ResponseField>

            <ResponseField name="nodes" type={<a href="/docs/api-reference/v3/reference/catalog/product-family">[ProductFamily!]!</a>} required>
              The nodes in this page, without the edge/cursor wrapper — a convenience over `edges`.
            </ResponseField>

            <ResponseField name="pageInfo" type={<a href="/docs/api-reference/v3/pagination">PageInfo!</a>} required>
              Pagination metadata for the current page.
            </ResponseField>
          </Expandable>
        </ResponseField>

        <ResponseField name="referencedArticles" type={<a href="/docs/api-reference/v3/pagination">KnowledgeArticleConnection!</a>} required>
          Other knowledge articles this article cites.

          **Requires:** [`commerce_agent_knowledge_read`](/docs/api-reference/v3/reference/scopes#scope-commerce_agent_knowledge_read)

          <Expandable title="fields" lazyRender>
            **Arguments**

            <ResponseField name="after" type="String">
              Forward pagination cursor — returns items after it. Pass an `edges[].cursor` or `pageInfo.endCursor` from a previous page.
            </ResponseField>

            <ResponseField name="before" type="String">
              Backward pagination cursor — returns items before it. Pass an `edges[].cursor` or `pageInfo.startCursor` from a previous page.
            </ResponseField>

            <ResponseField name="first" type="Int">
              Forward pagination: returns the first N items (max 100, default 25). Use with `after`; mutually exclusive with `last`/`before`.
            </ResponseField>

            <ResponseField name="last" type="Int">
              Backward pagination: returns the last N items (max 100, default 25). Use with `before`; mutually exclusive with `first`/`after`.
            </ResponseField>
          </Expandable>
        </ResponseField>

        <ResponseField name="status" type={<a href="/docs/api-reference/v3/reference/commerce-agent/knowledge-article-status">KnowledgeArticleStatus!</a>} required>
          Whether Commerce Agent may retrieve this article. Combine with the effective window.
        </ResponseField>

        <ResponseField name="title" type="String!" required>
          The merchant-facing title of the article.
        </ResponseField>

        <ResponseField name="updatedAt" type={<a href="/docs/api-reference/v3/reference/common/date-time">DateTime!</a>} required>
          When the article body was last edited.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="pageInfo" type={<a href="/docs/api-reference/v3/pagination">PageInfo!</a>} required>
      Pagination metadata for the current page.

      <Expandable title="fields" lazyRender>
        <ResponseField name="endCursor" type="String">
          Cursor of the last edge in this page; pass to `after` to page forward.
        </ResponseField>

        <ResponseField name="hasNextPage" type="Boolean!" required>
          Whether more items exist after this page (drives forward pagination with `first`/`after`).
        </ResponseField>

        <ResponseField name="hasPreviousPage" type="Boolean!" required>
          Whether more items exist before this page (drives backward pagination with `last`/`before`).
        </ResponseField>

        <ResponseField name="startCursor" type="String">
          Cursor of the first edge in this page; pass to `before` to page backward.
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

## Example

```graphql theme={null}
query {
  knowledgeArticles(after: "...", before: "...", first: 10, last: 10, orderBy: CREATED_AT, origin: AI_SUGGESTED, query: "...", reverse: true, status: ACTIVE) {
    nodes {
      content
      createdAt
      effectiveEndAt
      effectiveStartAt
      id
      origin
      status
      title
      # ...
    }
    pageInfo { hasNextPage endCursor }
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.