How to Filter by Tags
Problem
Solution
Filter by Tag Name
curl -X POST https://api-integrations.snackprompt.com/v1/kb/search \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"query": "vacation policy",
"filters": {
"tenant_id": "your-tenant-id",
"tag_names": ["HR", "Policies"]
},
"limit": 5
}'Filter by Tag ID
Understanding the Logic
Multiple Tags = OR
Tags + Other Filters = AND
Use Cases
Search in a Specific Category
Search in Multiple Departments
Directed Chat
Where Do Tags Come From?
Tips
1. Use tag_names for Readability
2. Don't Overdo the Filters
3. Test First with Search
Related
Last updated
Was this helpful?