Skip to content

API reference

API: Plans and credits

Markdown version

MethodPathWhat it doesScope
GET/v1/marketing/planThe plans (prices, allowances, modules, autonomy), credit prices and the organization's current planbilling:read
PUT/v1/marketing/plan/currentChoose the organization's plan (owners). Paid plans open when paid sign-ups do; until then only Free can be chosen and nothing is charged (web app only)billing:write
GET/v1/marketing/plan/limitsThe plan's limits beyond credits (brands, connected accounts, people) and how many are in use; nothing is ever charged at a limitbilling:read
POST/v1/marketing/plan/trialStart the organization's one 14-day trial of Small center, Center or Group (owners on Free; no card; back to Free when it ends; nothing is charged) (web app only)billing:write
GET/v1/marketing/usageThis month's credits used by module against the monthly cap, the 50/80/100 percent alerts and what happens at the capbilling:read
POST/v1/marketing/usage/top-upsBuy more credits (1000 for $30 a pack; owners on a paid plan): returns a Stripe checkout link. Never automatic; refused while paid sign-ups are off, and nothing is charged (web app only)billing:write

Examples

GET /v1/marketing/plan

The plans (prices, allowances, modules, autonomy), credit prices and the organization's current plan

curl -s "https://api.tendbrook.com/v1/marketing/plan" \
  -H "Authorization: Bearer $EC_API_KEY"
const res = await fetch(`https://api.tendbrook.com/v1/marketing/plan`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.EC_API_KEY}` },
});
const data = await res.json();

GET /v1/marketing/plan/limits

The plan's limits beyond credits (brands, connected accounts, people) and how many are in use; nothing is ever charged at a limit

curl -s "https://api.tendbrook.com/v1/marketing/plan/limits" \
  -H "Authorization: Bearer $EC_API_KEY"
const res = await fetch(`https://api.tendbrook.com/v1/marketing/plan/limits`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.EC_API_KEY}` },
});
const data = await res.json();

GET /v1/marketing/usage

This month's credits used by module against the monthly cap, the 50/80/100 percent alerts and what happens at the cap

curl -s "https://api.tendbrook.com/v1/marketing/usage" \
  -H "Authorization: Bearer $EC_API_KEY"
const res = await fetch(`https://api.tendbrook.com/v1/marketing/usage`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.EC_API_KEY}` },
});
const data = await res.json();

Request and response schemas: https://www.tendbrook.com/openapi.json. All resources: API reference.

Send feedback

Tell us what's broken, confusing or missing on this page, or an idea. It goes to the team that builds the product.
Please don't include passwords or card numbers.
Only to reply about this. Never added to any mailing list.