> ## 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.

# knowledgeEntriesRemove

> Remove several knowledge entries at once, as the knowledge page's bulk Delete does: articles are deleted and FAQ-linked entries unlinked (the FAQ article stays). It applies immediately and is not staged. Each article's deletion is recorded in its history. Returns one result per id: OK, or SKIPPED with NOT_FOUND for an id the store has no entry for, including one already removed. Safe to retry: an entry already changed is changed to the same again, or for a removal reported NOT_FOUND. There is no idempotencyKey, as setting and removing don't add anything a key would guard. It goes live at once, so it needs `commerce_agent_knowledge_publish`; `commerce_agent_knowledge_write` alone is refused with INSUFFICIENT_SCOPE.

**Required scopes:** [`commerce_agent_knowledge_publish`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-commerce_agent_knowledge_publish)

## Arguments

**ids** `[ID!]!` *required*

Knowledge article ids (`mkn_`) and help center link ids (`fkn_`), 1 to 100 distinct ones; a repeated id counts once. Another kind of id fails with INVALID\_KNOWLEDGE\_ID.

## Returns

**knowledgeEntriesRemove** `[KnowledgeEntriesActionResult!](/docs/api-reference/v3/reference/commerce-agent/knowledge-entries-action-result)` *required*

What a bulk knowledge action did with each entry it names. It runs while the request waits, so the result is final.

**fields**

**counts** `[BulkCounts!](/docs/api-reference/v3/reference/common/bulk-counts)` *required*

How many items ended each way.

**fields**

**failed** `Int!` *required*

The items that couldn't be changed.

**ok** `Int!` *required*

The items the action changed.

**skipped** `Int!` *required*

The items it didn't apply to.

**total** `Int!` *required*

The items given.

**results** `[\[KnowledgeEntryActionItem!\]!](/docs/api-reference/v3/reference/commerce-agent/knowledge-entry-action-item)` *required*

One per distinct id, in the order given; at most 100.

**fields**

**article** `[KnowledgeArticle](/docs/api-reference/v3/reference/commerce-agent/knowledge-article)`

The article the id names, as it is after the action. Null for a help center link, an entry not found, or an article the action removed.

**fields**

**changes** `[KnowledgeArticleChangeConnection!](/docs/api-reference/v3/pagination)` *required*

Every change to this article and who made it, newest first, including staged drafts and removals.

**Requires:** [`commerce_agent_knowledge_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-commerce_agent_knowledge_read)

**fields**

**Arguments**

**after** `String`

Forward pagination cursor — returns changes after it.

**before** `String`

Backward pagination cursor — returns changes before it.

**first** `Int`

Forward pagination: returns the first N changes (max 100, default 25). Use with `after`; mutually exclusive with `last`/`before`.

**last** `Int`

Backward pagination: returns the last N changes (max 100, default 25). Use with `before`; mutually exclusive with `first`/`after`.

**content** `String!` *required*

The live article body as authored.

**createdAt** `[DateTime!](/docs/api-reference/v3/reference/common/date-time)` *required*

When the article was created.

**draft** `[KnowledgeArticleDraft](/docs/api-reference/v3/reference/commerce-agent/knowledge-article-draft)`

Changes staged by the API and not yet published. Null when nothing is staged. Reading it needs a token with `commerce_agent_knowledge_read`.

**Requires:** [`commerce_agent_knowledge_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-commerce_agent_knowledge_read)

**effectiveEndAt** `[DateTime](/docs/api-reference/v3/reference/common/date-time)`

When the live article stops being retrievable. Null means no end.

**effectiveStartAt** `[DateTime](/docs/api-reference/v3/reference/common/date-time)`

When the live article becomes retrievable, if `status` is ACTIVE. Null means immediately.

**id** `ID!` *required*

The id of this knowledge article.

**origin** `[KnowledgeArticleOrigin!](/docs/api-reference/v3/reference/commerce-agent/knowledge-article-origin)` *required*

How this article was created. Immutable after create.

**productFamilies** `[ProductFamilyConnection!](/docs/api-reference/v3/pagination)` *required*

Product families this article cites.

**Requires:** [`products_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-products_read)

**fields**

**Arguments**

**after** `String`

Forward pagination cursor — returns items after it. Pass an `edges[].cursor` or `pageInfo.endCursor` from a previous page.

**before** `String`

Backward pagination cursor — returns items before it. Pass an `edges[].cursor` or `pageInfo.startCursor` from a previous page.

**first** `Int`

Forward pagination: returns the first N items (max 100, default 25). Use with `after`; mutually exclusive with `last`/`before`.

**last** `Int`

Backward pagination: returns the last N items (max 100, default 25). Use with `before`; mutually exclusive with `first`/`after`.

**referencedArticles** `[KnowledgeArticleConnection!](/docs/api-reference/v3/pagination)` *required*

Other knowledge articles this article cites.

**Requires:** [`commerce_agent_knowledge_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-commerce_agent_knowledge_read)

**fields**

**Arguments**

**after** `String`

Forward pagination cursor — returns items after it. Pass an `edges[].cursor` or `pageInfo.endCursor` from a previous page.

**before** `String`

Backward pagination cursor — returns items before it. Pass an `edges[].cursor` or `pageInfo.startCursor` from a previous page.

**first** `Int`

Forward pagination: returns the first N items (max 100, default 25). Use with `after`; mutually exclusive with `last`/`before`.

**last** `Int`

Backward pagination: returns the last N items (max 100, default 25). Use with `before`; mutually exclusive with `first`/`after`.

**status** `[KnowledgeArticleStatus!](/docs/api-reference/v3/reference/commerce-agent/knowledge-article-status)` *required*

Whether Commerce Agent may retrieve this live article. Combine with the effective window.

**title** `String!` *required*

The live merchant-facing title of the article.

**updatedAt** `[DateTime!](/docs/api-reference/v3/reference/common/date-time)` *required*

When the live article body was last edited.

**usageCount** `Int!` *required*

How many messages Commerce Agent used this article in. Unsent draft replies don't count. This is the number the merchant app's Knowledge page shows as Uses.

**whenToUse** `String!` *required*

The text Commerce Agent matches a shopper's question against to pick this article. It is generated from the live title and content, so it is read-only. A new article starts with its title. After an edit, the previous text stays until it is regenerated.

**code** `String`

Why the item was skipped or failed: NOT\_FOUND, the store has no entry with this id, or it was removed (another store's included). Null when it is OK.

**helpCenterLink** `[KnowledgeHelpCenterLink](/docs/api-reference/v3/reference/commerce-agent/knowledge-help-center-link)`

The help center link the id names, as it is after the action. Null for an article, an entry not found, or a link the action removed.

**fields**

**createdAt** `[DateTime!](/docs/api-reference/v3/reference/common/date-time)` *required*

When the article was added to knowledge.

**effectiveEndAt** `[DateTime](/docs/api-reference/v3/reference/common/date-time)`

When the article stops being retrievable. Null means no end.

**effectiveStartAt** `[DateTime](/docs/api-reference/v3/reference/common/date-time)`

When the article becomes retrievable, if `status` is ACTIVE. Null means immediately.

**helpCenterArticle** `[HelpCenterArticle](/docs/api-reference/v3/reference/support/help-center-article)`

The linked article. Null once it's deleted.

**Requires:** [`support_config_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-support_config_read)

**helpCenterCollection** `[HelpCenterCollection](/docs/api-reference/v3/reference/support/help-center-collection)`

The collection the article is in; unpublishing it unlinks the article. Null once it's deleted.

**Requires:** [`support_config_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-support_config_read)

**helpCenterPage** `[HelpCenterPage](/docs/api-reference/v3/reference/support/help-center-page)`

The help center page the article was linked from; unpublishing it unlinks the article. Null once it's deleted.

**Requires:** [`support_config_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-support_config_read)

**id** `ID!` *required*

The id of this link, which `knowledgeEntriesStatusSet` and `knowledgeEntriesRemove` take.

**status** `[KnowledgeArticleStatus!](/docs/api-reference/v3/reference/commerce-agent/knowledge-article-status)` *required*

Whether Commerce Agent may use the article. Combine with the effective window.

**title** `String!` *required*

The entry's name as the Knowledge page and its CSV export show it: the page, collection and article titles joined with `>`, leaving out any that are empty or gone.

**updatedAt** `[DateTime!](/docs/api-reference/v3/reference/common/date-time)` *required*

When the link last changed.

**usageCount** `Int!` *required*

How many messages Commerce Agent used the article in, the Knowledge page's Uses. Unsent draft replies don't count.

**whenToUse** `String!` *required*

The text Commerce Agent matches a shopper's question against to pick this article. It is generated from the article, so it is read-only; a new link starts with its title.

**message** `String`

The same, in words. Null when it is OK.

**status** `[BulkItemStatus!](/docs/api-reference/v3/reference/common/bulk-item-status)` *required*

What the action did with the item.

## Errors

Besides the [errors any request can return](https://developers.redo.com/docs/api-reference/v3/errors.md), this operation fails with these codes in `extensions.code`.

| Code | HTTP status | Meaning | Retry |
| - | - | - | - |
| `BAD_USER_INPUT` | `400` | An argument is invalid, or names something the store doesn't have. The message says which. Nothing was written. | Fix the input the message names, then send it again. |
| `INVALID_KNOWLEDGE_ID` | `400` | An id isn't a kind of knowledge entry the argument takes, such as a product knowledge id where an article or help center link id goes. The message names it. Nothing was written. | Pass ids of the kind the argument's description names. |
| `INTERNAL_SERVER_ERROR` | `500` | Something failed on Redo's side. The change may or may not have been made. | Read the record to see whether the change was made before sending it again. A send with an idempotencyKey is safe to retry with the same key. |

## Example

```graphql theme={null}
mutation {
  knowledgeEntriesRemove(ids: "...")
}
```


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