Delete Knowledge Base Plain Text

Delete a pipe-scoped knowledge base plain text

Before You Begin

🔗 Use the GraphQL Playground to execute the queries in this guide.

➡️ New to GraphQL? Learn how to navigate the Playground with our Playground Basics Guide.

Prerequisites

  1. Authentication: Use a Service Account token (Personal Access Tokens are deprecated).
  2. Permissions: You must be admin of the pipe that owns the plain text.
  3. Plain Text ID: Identify the UUID of the plain text to delete. This is returned when creating the plain text.

See our Get resource IDs page for how to find these values.

Delete a Knowledge Base Plain Text

Use the deleteAiKnowledgeBasePlainText mutation to permanently remove a plain text knowledge base from a pipe.

⚠️

This action is irreversible. Deleting a plain text removes it as a data source from any AI agents that reference it.

Inputs

  • pipeUuid: UUID of the pipe that owns this plain text (required).
  • plainTextId: UUID of the plain text to delete (required).

Example

mutation {
  deleteAiKnowledgeBasePlainText(
    input: { pipeUuid: "pipe-uuid-123", plainTextId: "f27e4cac-1724-4879-a575-28ccdee4c022" }
  ) {
    success
    errors
  }
}

Response:

{
  "data": {
    "deleteAiKnowledgeBasePlainText": {
      "success": true,
      "errors": []
    }
  }
}

Response explained

  • success: true when the plain text was deleted successfully; false otherwise.
  • errors: Array of error messages if the operation failed.

Error handling

If the deletion fails (e.g., plain text not found or permission denied), you'll receive an error response:

{
  "data": {
    "deleteAiKnowledgeBasePlainText": {
      "success": false,
      "errors": ["Record not found"]
    }
  }
}

Error response explained

  • success: false when the operation fails.
  • errors: Array containing human-readable error descriptions. Common messages:
    • "Permission denied" — the authenticated user is not an admin of the pipe.
    • "Pipe not found with id: <uuid>" — the pipeUuid does not match an existing pipe.
    • "Record not found" — the plainTextId does not match an existing plain text.

Tips

  • Check before deleting: Verify that no AI agents are actively using this plain text as a data source before deleting it.
  • Irreversible: Deletion cannot be undone. If you only need to temporarily disable the content, consider updating it with placeholder text instead.