Create Watchlist API provides you a way to Create your watchlists once you have the Keywords Defined.
All POST data should be sent in the JSON format (UTF-8 encoding).
You can add multiple keyword in the keywords array in your watchlist which you want to track.
curl -X POST "https://cafqluqomuhgtchexldv.supabase.co/functions/v1/api-watchlist"
-H "x-api-key: YOUR_TEAM_API_KEY_HERE"
-H "Content-Type: application/json"
-d '{
"keywords": [
{
"keyword": "artificial intelligence",
"required_keywords": ["business", "enterprise"],
"exclude_keywords": ["gaming", "entertainment"]
},
"machine learning"
],
"name": "Enterprise AI Watchlist",
"description": "Track enterprise AI and ML discussions"
}'
Authentication
Parameters
Essential Parameters:
Parameter | Type | Description |
---|---|---|
keywords | array | Array of keywords to track. Can be simple strings or detailed keyword objects. |
Optional Parameters:
Parameter | Type | Description |
---|---|---|
name | string | Custom name for the watchlist. If not provided, it is auto-generated from the keywords. |
description | string | Description for the watchlist. Used for metadata. |
Labels | Array | Custom labels with descriptions |
Simple:
{
"keywords": ["artificial intelligence", "machine learning", "AI"]
}
Advance:
{
"keywords": [
"remote work",
{
"keyword": "work from home",
"required_keywords": ["productivity", "tools"],
"exclude_keywords": ["job posting", "hiring"]
},
"digital nomad"
],
"name": "Remote Work Insights",
"description": "Track discussions about remote work culture and productivity",
"labels": [
{
"name": "Remote Culture",
"description": "Posts about remote work culture and best practices"
},
{
"name": "Productivity Tools",
"description": "Tools and software for remote productivity"
},
{
"name": "Digital Nomad Lifestyle",
"description": "Location-independent work and travel"
}
]
}
Success (200) - New Watchlist Created
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Crypto & Blockchain Watchlist",
"slug": "crypto-blockchain-watchlist-abc123",
"keywords": ["blockchain", "cryptocurrency", "bitcoin", "ethereum"],
"created": true,
"results": [
{
"success": true,
"keyword": "blockchain",
"keyword_id": "keyword-uuid-1"
},
{
"success": true,
"keyword": "cryptocurrency",
"keyword_id": "keyword-uuid-2"
},
{
"success": true,
"keyword": "bitcoin",
"keyword_id": "keyword-uuid-3"
},
{
"success": true,
"keyword": "ethereum",
"keyword_id": "keyword-uuid-4"
}
],
"labels": [
{
"key": "Blockchain Technology",
"description": "Posts about blockchain infrastructure and development"
},
{
"key": "Cryptocurrency Market",
"description": "Posts about crypto trading, prices, and market analysis"
},
{
"key": "DeFi",
"description": "Decentralized finance applications and protocols"
},
{
"key": "Web3"
}
]
}
Response Fields Description
Field | Type | Description |
---|---|---|
id | string | Unique watchlist identifier in UUID format* |
name | string | Custom or auto-generated name of the watchlist. |
slug | string | URL-friendly slug for the watchlist. |
keywords | array | List of keywords associated with the watchlist. |
created | boolean | Indicates whether the watchlist was successfully created. |
results | array | Array of keyword creation results. Each entry includes success/failure for individual keywords. |
Inside results array Fields description
Field | Type | Description |
---|---|---|
success | boolean | Status of keyword creation (true if created successfully, false otherwise). |
keyword | string | The keyword that was processed. |
keyword_id | string | Unique identifier for the keyword (UUID). Returned only if success = true. |
error | string | Error message if the keyword could not be created. Returned only if success = false. |
Status Code | Error Message | Description |
---|---|---|
400 | "keywords array is required and must not be empty" | The keywords parameter is missing or empty. |
401 | "Unauthorized: Invalid API key" | Authentication failed due to an invalid or missing API key. |
500 | "Database error message" | Internal server error occurred while processing the request. Contact OutXAI |
For more information about the OutXAI API, feel free to contact us at support@outx.ai.