Skip to main content

List Brands

Response

brands
Brand[]
Array of brand objects

Example Request

curl -X GET "https://api.opensight.ai/api/brands" \
  -H "Authorization: Bearer YOUR_API_KEY"

Example Response

{
  "brands": [
    {
      "id": "brand_123",
      "user_id": "user_456",
      "name": "Acme Inc",
      "website_url": "https://acme.com",
      "industry": "SaaS",
      "is_active": true,
      "created_at": "2024-01-15T10:00:00Z",
      "updated_at": "2024-01-15T10:00:00Z"
    }
  ]
}

Create Brand

Request Body

name
string
required
Brand name (1-255 characters)
website_url
string
required
Valid brand website URL
industry
string
Brand industry (SaaS, E-commerce, Finance, Healthcare, Agency, Other)

Response

brand
Brand
The created brand object

Example Request

curl -X POST "https://api.opensight.ai/api/brands" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Acme Inc",
    "website_url": "https://acme.com",
    "industry": "SaaS"
  }'

Example Response

{
  "brand": {
    "id": "brand_123",
    "user_id": "user_456",
    "name": "Acme Inc",
    "website_url": "https://acme.com",
    "industry": "SaaS",
    "is_active": true,
    "created_at": "2024-01-15T10:00:00Z",
    "updated_at": "2024-01-15T10:00:00Z"
  }
}

Errors

  • 403 Forbidden - Brand limit reached for your plan
  • 400 Bad Request - Invalid input data

Get Brand

Path Parameters

id
string
required
Brand ID

Response

brand
Brand
The brand object

Example Request

curl -X GET "https://api.opensight.ai/api/brands/brand_123" \
  -H "Authorization: Bearer YOUR_API_KEY"

Errors

  • 404 Not Found - Brand not found or user doesn’t own it

Update Brand

Path Parameters

id
string
required
Brand ID

Request Body

name
string
Brand name (1-255 characters)
website_url
string
Valid website URL
industry
string
Brand industry
pinned
boolean
Whether to pin the brand in the UI

Response

brand
Brand
The updated brand object

Example Request

curl -X PATCH "https://api.opensight.ai/api/brands/brand_123" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Acme Corporation",
    "pinned": true
  }'

Errors

  • 404 Not Found - Brand not found or user doesn’t own it

Delete Brand

Path Parameters

id
string
required
Brand ID

Response

success
boolean
Returns true if successful

Example Request

curl -X DELETE "https://api.opensight.ai/api/brands/brand_123" \
  -H "Authorization: Bearer YOUR_API_KEY"

Errors

  • 404 Not Found - Brand not found or user doesn’t own it

Get Brand Dashboard

Path Parameters

id
string
required
Brand ID

Response

overall_score
number
Overall visibility score (0-100)
engine_scores
object
Scores per engine
sentiment
object
Sentiment distribution
total_mentions
number
Total number of brand mentions
total_prompts
number
Total number of active prompts
recent_changes
Change[]
Array of recent changes

Example Request

curl -X GET "https://api.opensight.ai/api/brands/brand_123/dashboard" \
  -H "Authorization: Bearer YOUR_API_KEY"

Example Response

{
  "overall_score": 72,
  "engine_scores": {
    "chatgpt": 75,
    "perplexity": 68,
    "google_aio": 73
  },
  "sentiment": {
    "positive": 65,
    "neutral": 30,
    "negative": 5
  },
  "total_mentions": 45,
  "total_prompts": 25,
  "recent_changes": [
    {
      "id": "change_123",
      "type": "visibility_up",
      "description": "Visibility increased by 5 points on ChatGPT",
      "engine": "chatgpt",
      "change_value": 5,
      "created_at": "2024-01-15T10:00:00Z"
    }
  ]
}

Errors

  • 404 Not Found - Brand not found or user doesn’t own it

Path Parameters

id
string
required
Brand ID

Query Parameters

range
string
Time range: 7d, 14d, 30d, or 90d (default: 30d)

Response

Array of trend data points

Example Request

curl -X GET "https://api.opensight.ai/api/brands/brand_123/trends?range=30d" \
  -H "Authorization: Bearer YOUR_API_KEY"

Example Response

{
  "trends": [
    {
      "date": "2024-01-15",
      "overall": 72,
      "chatgpt": 75,
      "perplexity": 68,
      "google_aio": 73
    },
    {
      "date": "2024-01-16",
      "overall": 74,
      "chatgpt": 77,
      "perplexity": 70,
      "google_aio": 75
    }
  ]
}

Errors

  • 404 Not Found - Brand not found or user doesn’t own it

Build docs developers (and LLMs) love