Endpoints Reference

REST Catalog

Detailed technical specifications for verified PaceCast REST route handlers, including HTTP methods, schemas, and return formats.

Last updated: October 2026

This document indexes all active route handlers exposed by the PaceCast web application. Every endpoint enforces row-level security and tenant isolation by checking caller identity against workspace ownership.

Client Workspaces (/api/clients)

GET/api/clients

Lists all client workspaces owned by or shared with the authenticated user.

200 OK Response
{
  "clients": [
    {
      "id": "01934c2b-e104-7da5-b982-b7e61a6c4290",
      "name": "NorthStar Athletics",
      "currency": "USD",
      "timezone": "America/New_York",
      "created_at": "2026-10-14T18:24:00.000Z"
    }
  ]
}
POST/api/clients

Creates a new isolated client workspace.

ParameterTypeDescription
namerequired
string
Client/Brand name.
currencyrequired
string
3-letter currency code (e.g. 'USD').
timezonerequired
string
IANA timezone (e.g. 'UTC').

Campaign Diagnostics & Runs (/api/campaign-diagnostics)

POST/api/campaign-diagnostics

Ingests Meta or Google Ads CSV files, executes pre-flight checks, and generates an analysis run with diagnostic snapshots.

ParameterTypeDescription
client_idrequired
UUID
Target workspace UUID.
metaoptional
File (.csv)
Daily Meta Ads Manager CSV export.
googleoptional
File (.csv)
Daily Google Ads CSV export.
horizon_daysoptional
integer
30 or 60 days. Default: 30.
spend_modeoptional
string
'hold', 'scale', or 'plan'.

AI Content Drafting (/api/content-draft)

POST/api/content-draft

Synthesizes creative recommendations into a complete video script and visual brief. Debits 3 credits from the user's credit wallet upon successful generation.

Sample Request Payload
{
  "recommendation": { "id": "rec_123", "hookType": "problem_agitate" },
  "plannedItem": { "format": "vertical_video", "targetDuration": 15 },
  "brandProfile": { "industry": "Athletic Apparel", "tone": "Direct & energetic" }
}

Billing & Credit Wallets (/api/billing/credits)

GET/api/billing/credits/balance

Returns current available, included, purchased, and reserved credit balances for the authenticated user.

200 OK Response
{
  "plan": "growth",
  "availableCredits": 240,
  "includedCredits": 200,
  "purchasedCredits": 40,
  "reservedCredits": 0
}