List Prompts
Path Parameters
Query Parameters
Results per page (default: 20, max: 100)
Comma-separated list of tags to filter by
Response
Array of prompt objects
Prompt text (1-1000 characters)
Array of tags (max 10 tags, each max 50 characters)
Latest results per engineShow PromptResultSummary properties
Engine name: chatgpt, perplexity, or google_aio
Sentiment: positive, neutral, or negative
Whether brand was mentioned
Example Request
curl -X GET "https://api.opensight.ai/api/brands/brand_123/prompts?page=1&limit=20&tags=pricing,features" \
-H "Authorization: Bearer YOUR_API_KEY"
Example Response
{
"prompts": [
{
"id": "prompt_123",
"brand_id": "brand_123",
"text": "Best project management tools for remote teams",
"tags": ["pricing", "features"],
"is_active": true,
"created_at": "2024-01-15T10:00:00Z",
"updated_at": "2024-01-15T10:00:00Z",
"latest_results": [
{
"engine": "chatgpt",
"score": 85,
"sentiment": "positive",
"mentioned": true
},
{
"engine": "perplexity",
"score": 72,
"sentiment": "neutral",
"mentioned": true
}
]
}
],
"total": 45,
"page": 1,
"limit": 20,
"totalPages": 3
}
Errors
- 404 Not Found - Brand not found or user doesn’t own it
Create Prompt(s)
Path Parameters
Request Body (Single Prompt)
Prompt text (1-1000 characters)
Array of tags (max 10 tags, each max 50 characters)
Request Body (Bulk Prompts)
Array of prompt objects (min 1, max 50)Show Prompt object properties
Prompt text (1-1000 characters)
Response (Single)
The created prompt object
Response (Bulk)
Array of skipped prompts (duplicates)Show Skipped object properties
Prompt text that was skipped
Reason for skipping (e.g., “already exists”)
Example Request (Single)
curl -X POST "https://api.opensight.ai/api/brands/brand_123/prompts" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"text": "Best project management tools for remote teams",
"tags": ["pricing", "features"]
}'
Example Request (Bulk)
curl -X POST "https://api.opensight.ai/api/brands/brand_123/prompts" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompts": [
{
"text": "Best CRM for small businesses",
"tags": ["crm", "small-business"]
},
{
"text": "Top marketing automation tools",
"tags": ["marketing", "automation"]
}
]
}'
Example Response (Bulk)
{
"created": [
{
"id": "prompt_123",
"brand_id": "brand_123",
"text": "Best CRM for small businesses",
"tags": ["crm", "small-business"],
"is_active": true,
"created_at": "2024-01-15T10:00:00Z",
"updated_at": "2024-01-15T10:00:00Z"
}
],
"skipped": [
{
"text": "Top marketing automation tools",
"reason": "Prompt already exists"
}
]
}
Errors
- 403 Forbidden - Prompt limit reached for your plan
- 404 Not Found - Brand not found or user doesn’t own it
- 409 Conflict - Prompt with this text already exists
- 400 Bad Request - Invalid input data
Plan Limits
- Free: 25 prompts per brand
- Starter: 100 prompts per brand
- Growth: 250 prompts per brand
Suggest Prompts
Path Parameters
Request Body
Number of suggestions to generate (default: 20, min: 1, max: 50)
Industry to generate suggestions for (SaaS, E-commerce, Finance, Healthcare, Agency, Other)
Response
Array of suggested prompt texts
Example Request
curl -X POST "https://api.opensight.ai/api/brands/brand_123/prompts/suggest" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"count": 10,
"industry": "SaaS"
}'
Example Response
{
"suggestions": [
"Best project management software for remote teams",
"Top CRM tools for startups",
"Most affordable marketing automation platforms",
"Best team collaboration tools 2024",
"Compare project management software features"
]
}
Get Prompt
Path Parameters
Response
The prompt object (see List Prompts for structure)
Example Request
curl -X GET "https://api.opensight.ai/api/brands/brand_123/prompts/prompt_123" \
-H "Authorization: Bearer YOUR_API_KEY"
Errors
- 404 Not Found - Brand or prompt not found, or user doesn’t own the brand
Update Prompt
Path Parameters
Request Body
Prompt text (1-1000 characters)
Array of tags (max 10 tags, each max 50 characters)
Response
The updated prompt object
Example Request
curl -X PATCH "https://api.opensight.ai/api/brands/brand_123/prompts/prompt_123" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"text": "Best project management tools for distributed teams",
"tags": ["pricing", "features", "remote"],
"is_active": true
}'
Errors
- 404 Not Found - Brand or prompt not found, or user doesn’t own the brand
- 409 Conflict - Prompt with this text already exists
Delete Prompt
Path Parameters
Response
Returns true if successful
Example Request
curl -X DELETE "https://api.opensight.ai/api/brands/brand_123/prompts/prompt_123" \
-H "Authorization: Bearer YOUR_API_KEY"
Errors
- 404 Not Found - Brand or prompt not found, or user doesn’t own the brand
Get Prompt Results
Path Parameters
Response
Array of prompt result objectsShow PromptResult properties
Engine: chatgpt, perplexity, or google_aio
Date the prompt was run (ISO 8601)
Full response text from the AI engine
Whether the brand was mentioned
Position of brand mention (null if not mentioned)
Sentiment score (-1 to 1)
Sentiment: positive, neutral, or negative
competitor_mentions
CompetitorMention[]
required
Array of competitor mentionsShow CompetitorMention properties
Sentiment: positive, neutral, or negative
Overall visibility score (0-100)
Example Request
curl -X GET "https://api.opensight.ai/api/brands/brand_123/prompts/prompt_123/results" \
-H "Authorization: Bearer YOUR_API_KEY"
Example Response
{
"results": [
{
"id": "result_123",
"prompt_id": "prompt_123",
"brand_id": "brand_123",
"engine": "chatgpt",
"run_date": "2024-01-15",
"response_text": "For project management tools, Acme Inc offers excellent features...",
"brand_mentioned": true,
"mention_position": 1,
"sentiment_score": 0.8,
"sentiment_label": "positive",
"citation_urls": ["https://acme.com/features"],
"competitor_mentions": [
{
"name": "Competitor Inc",
"position": 3,
"sentiment": "neutral"
}
],
"visibility_score": 85,
"created_at": "2024-01-15T08:00:00Z"
}
]
}
Errors
- 404 Not Found - Brand or prompt not found, or user doesn’t own the brand