# API: Plans and credits

| Method | Path | What it does | Scope |
|---|---|---|---|
| GET | `/v1/marketing/first-run/audit` | A read-only first look: what the product found in your own data and what it would do first (nothing is sent, published or spent) | `marketing:read` |
| GET | `/v1/marketing/first-run/progress` | Where your organization is in setup (the step, the goals picked, the website given), or null before it starts | `marketing:read` |
| PUT | `/v1/marketing/first-run/progress` | Save where you are in setup, so leaving it (to connect an account, a reload, another device) never loses your place (web app only) | `marketing:write` |
| GET | `/v1/marketing/plan` | The plans (prices, allowances, modules, autonomy), credit prices and the organization's current plan | `billing:read` |
| PUT | `/v1/marketing/plan/current` | Choose 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/limits` | The plan's limits beyond credits (brands, connected accounts, people) and how many are in use; nothing is ever charged at a limit | `billing:read` |
| GET | `/v1/marketing/plan/outcomes` | Outcome-priced options, which this organization turned on, and this month's outcomes priced at the catalog's rates (a statement: nothing is charged) | `billing:read` |
| PUT | `/v1/marketing/plan/outcomes/:id` | Turn an outcome-priced option on or off (owners; counted from now on, never before) (web app only) | `billing:write` |
| GET | `/v1/marketing/plan/trial` | This organization's trial of a paid plan (if any) and whether trials are open | `billing:read` |
| POST | `/v1/marketing/plan/trial` | Start the organization's one 14-day trial of Starter or Growth (owners on Free; no card; back to Free when it ends; nothing is charged) (web app only) | `billing:write` |
| 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 | `billing:read` |
| POST | `/v1/marketing/usage/top-ups` | Buy more credits (1000 for $10; owners). Refused while paid sign-ups are off; nothing is charged (web app only) | `billing:write` |

## Examples

### GET /v1/marketing/first-run/audit

A read-only first look: what the product found in your own data and what it would do first (nothing is sent, published or spent)

```bash
curl -s "https://api.scheeleworks.com/v1/marketing/first-run/audit" \
  -H "Authorization: Bearer $MA_API_KEY"
```

```js
const res = await fetch(`https://api.scheeleworks.com/v1/marketing/first-run/audit`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.MA_API_KEY}` },
});
const data = await res.json();
```

### GET /v1/marketing/first-run/progress

Where your organization is in setup (the step, the goals picked, the website given), or null before it starts

```bash
curl -s "https://api.scheeleworks.com/v1/marketing/first-run/progress" \
  -H "Authorization: Bearer $MA_API_KEY"
```

```js
const res = await fetch(`https://api.scheeleworks.com/v1/marketing/first-run/progress`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.MA_API_KEY}` },
});
const data = await res.json();
```

### GET /v1/marketing/plan

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

```bash
curl -s "https://api.scheeleworks.com/v1/marketing/plan" \
  -H "Authorization: Bearer $MA_API_KEY"
```

```js
const res = await fetch(`https://api.scheeleworks.com/v1/marketing/plan`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.MA_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

```bash
curl -s "https://api.scheeleworks.com/v1/marketing/plan/limits" \
  -H "Authorization: Bearer $MA_API_KEY"
```

```js
const res = await fetch(`https://api.scheeleworks.com/v1/marketing/plan/limits`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.MA_API_KEY}` },
});
const data = await res.json();
```

### GET /v1/marketing/plan/outcomes

Outcome-priced options, which this organization turned on, and this month's outcomes priced at the catalog's rates (a statement: nothing is charged)

```bash
curl -s "https://api.scheeleworks.com/v1/marketing/plan/outcomes" \
  -H "Authorization: Bearer $MA_API_KEY"
```

```js
const res = await fetch(`https://api.scheeleworks.com/v1/marketing/plan/outcomes`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.MA_API_KEY}` },
});
const data = await res.json();
```

### GET /v1/marketing/plan/trial

This organization's trial of a paid plan (if any) and whether trials are open

```bash
curl -s "https://api.scheeleworks.com/v1/marketing/plan/trial" \
  -H "Authorization: Bearer $MA_API_KEY"
```

```js
const res = await fetch(`https://api.scheeleworks.com/v1/marketing/plan/trial`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.MA_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

```bash
curl -s "https://api.scheeleworks.com/v1/marketing/usage" \
  -H "Authorization: Bearer $MA_API_KEY"
```

```js
const res = await fetch(`https://api.scheeleworks.com/v1/marketing/usage`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.MA_API_KEY}` },
});
const data = await res.json();
```

Request and response schemas: [https://www.scheeleworks.com/openapi.json](https://www.scheeleworks.com/openapi.json). All resources: [API reference](https://www.scheeleworks.com/docs/api).
