Delete a pipe-scoped knowledge base data lookup
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
- Authentication: Use a Service Account token (Personal Access Tokens are deprecated).
- Permissions: You must be admin of the pipe where the data lookup was created.
- Data Lookup ID: The
idreturned when the data lookup was created. See Create Knowledge Base Data Lookup.
Deletion is permanent. A deleted data lookup cannot be recovered. Any AI agents that reference the data lookup will no longer have access to it.
Delete a Knowledge Base Data Lookup
Use the deleteAiKnowledgeBaseDataLookup mutation to permanently delete a data lookup from a pipe's knowledge base.
Inputs
- pipeUuid: UUID of the pipe the data lookup belongs to (required).
- dataLookupId: ID of the knowledge base data lookup to delete (required).
mutation {
deleteAiKnowledgeBaseDataLookup(
input: { pipeUuid: "pipe-uuid-123", dataLookupId: "data-lookup-uuid-789" }
) {
success
errors
}
}
Response:
{
"data": {
"deleteAiKnowledgeBaseDataLookup": {
"success": true,
"errors": []
}
}
}
Response explained
- success:
truewhen the data lookup was successfully deleted,falseotherwise. - errors: Array of error messages when the deletion fails. Empty on success.
Error handling
If the deletion fails (e.g., permission denied or pipe not found), you'll receive an error response:
{
"data": {
"deleteAiKnowledgeBaseDataLookup": null
},
"errors": [
{
"message": "Permission denied",
"locations": [
{
"line": 2,
"column": 3
}
],
"path": ["deleteAiKnowledgeBaseDataLookup"]
}
]
}
Error response explained
- data.deleteAiKnowledgeBaseDataLookup: Returns
nullwhen the operation fails. - errors: Array containing error details when the operation fails.
- errors[].message: Human-readable error description. Common messages:
"Permission denied"— the authenticated user is not an admin of the pipe."Pipe not found with id: <uuid>"— thepipeUuiddoes not match an existing pipe."Field 'deleteAiKnowledgeBaseDataLookup' doesn't exist on type 'Mutation'"— the feature flag is not enabled for the organization.
Tips
- Agent references: Deleting a data lookup automatically removes it from all agents and behaviors that reference it.
- Finding your data lookup ID: The
idis returned by thecreateAiKnowledgeBaseDataLookupmutation. See Create Knowledge Base Data Lookup.
