Skip to main content
POST
https://searchcompany-main.up.railway.app
/
api
/
business
curl -X POST https://searchcompany-main.up.railway.app/api/business \
  -H "Content-Type: application/json" \
  -d '{
    "business_name": "Nike",
    "business_url": "https://nike.com",
    "tracking_type": "business",
    "clerk_org_id": "org_2abc123",
    "clerk_user_id": "user_2xyz789"
  }'
{
  "id": 42,
  "business_uuid": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
  "business_name": "Nike",
  "created_at": "2024-01-15T10:30:00Z",
  "ranking_score": 38
}
Creates a new business record in the database and links it to a Clerk user.

Request Body

business_name
string
required
The name of the business (e.g., “Nike”, “Acme Corp”)
business_url
string
The main website URL for the business
tracking_type
string
Type of tracking: "business" or "product"
clerk_org_id
string
The Clerk organization ID
clerk_user_id
string
The Clerk user ID who created the business

Response

id
integer
Database record ID
business_uuid
string
Unique identifier for the business (UUID v4)
business_name
string
The business name
created_at
string
ISO 8601 timestamp of creation
ranking_score
integer
Initial AI visibility ranking score (32-49)
curl -X POST https://searchcompany-main.up.railway.app/api/business \
  -H "Content-Type: application/json" \
  -d '{
    "business_name": "Nike",
    "business_url": "https://nike.com",
    "tracking_type": "business",
    "clerk_org_id": "org_2abc123",
    "clerk_user_id": "user_2xyz789"
  }'
{
  "id": 42,
  "business_uuid": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
  "business_name": "Nike",
  "created_at": "2024-01-15T10:30:00Z",
  "ranking_score": 38
}