ShastaBiz API Documentation

Access your listings, events, and directory data programmatically.


Authentication

All API requests require a Bearer token in the Authorization header.

Authorization: Bearer YOUR_API_KEY

Generate API keys from your dashboard.

Access Tiers
Tier Requirement What You Get
Owner API Any paid listing or subscription Manage your own listings & events via API
Data API API Access product ($49.99/mo) Read-only access to entire directory (listings, events, categories)
Free users No API access

Rate Limits

Requests are limited per API key per hour:

  • Owner scope: 100 requests/hour
  • Data scope: 1,000 requests/hour

When exceeded, the API returns HTTP 429 with a JSON error message.

Error Codes

Code Meaning
401 Invalid or missing API key
403 Insufficient scope or subscription required
404 Resource not found
422 Validation error
429 Rate limit exceeded

Auth API

POST

Verify your API key and get user info.

curl -X POST https://shastabiz.com/api/v1/auth/verify \
  -H "Authorization: Bearer YOUR_API_KEY"
Response
{
  "user": { "id": 1, "email": "you@example.com", "first_name": "Jane", "last_name": "Doe" },
  "subscription": { "plan": "Premium", "status": "active" },
  "scopes": ["owner", "data"]
}

Owner API

Requires "owner" scope and at least one paid listing.

GET

List your approved listings (paginated).

curl https://shastabiz.com/api/v1/my/listings?page=1&per_page=25 \
  -H "Authorization: Bearer YOUR_API_KEY"
Response
{
  "data": [{ "id": 1, "business_name": "Coffee Shop", "city": "Redding", ... }],
  "meta": { "page": 1, "per_page": 25, "total": 3 }
}

PATCH

Update your listing.

Params: business_name, description, address, city, state, zip_code, phone_number, email, website, facebook, instagram, twitter, linkedin

curl -X PATCH https://shastabiz.com/api/v1/my/listings/123 \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d "phone_number=530-555-1234"

GET

List events for your listings.

POST

Create an event for one of your listings.

Params: listing_id (required), name, description, start_date, end_date, start_time, end_time, location, address, city, state, price, website

curl -X POST https://shastabiz.com/api/v1/my/events \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d "listing_id=123&name=Grand+Opening&start_date=2026-03-01"

PATCH

Update an event.

DELETE

Delete an event.


Data API

Requires "data" scope and the API Access product ($49.99/mo).

GET

Search the business directory (paginated).

Filters: category (ID), city, keyword

curl "https://shastabiz.com/api/v1/listings?city=Redding&per_page=10" \
  -H "Authorization: Bearer YOUR_API_KEY"
Response
{
  "data": [{ "id": 1, "business_name": "Acme Inc", "city": "Redding", ... }],
  "meta": { "page": 1, "per_page": 10, "total": 142 }
}

GET

Get a single listing by ID or slug.

GET

List all listing categories.

curl https://shastabiz.com/api/v1/categories \
  -H "Authorization: Bearer YOUR_API_KEY"
Response
{
  "data": [{ "id": 1, "name": "Restaurants", "kind": "listing" }, ...]
}

GET

List events (paginated).

Filters: city, listing_id, upcoming (true/false), keyword

GET

Get a single event by ID or slug.