API reference
API: Marketing
| Method | Path | What it does | Scope |
|---|---|---|---|
| GET | /v1/marketing/asset-rights | List asset rights | marketing:read |
| POST | /v1/marketing/asset-rights | Create an asset right | marketing:write |
| GET | /v1/marketing/asset-rights/:id | Get an asset right | marketing:read |
| GET | /v1/marketing/asset-usage | List asset usage | marketing:read |
| POST | /v1/marketing/asset-usage | Create an asset usage | marketing:write |
| GET | /v1/marketing/asset-usage/:id | Get an asset usage | marketing:read |
| PATCH | /v1/marketing/asset-usage/:id | Change an asset usage | marketing:write |
| GET | /v1/marketing/assets | List assets | marketing:read |
| POST | /v1/marketing/assets | Create an asset | marketing:write |
| GET | /v1/marketing/assets/:id | Get an asset | marketing:read |
| PATCH | /v1/marketing/assets/:id | Change an asset | marketing:write |
| GET | /v1/marketing/assets/:id/versions | List an asset's versions with how each was made | marketing:read |
| POST | /v1/marketing/assets/:id/versions | Add a version to an asset, labeled with how it was made | marketing:write |
| GET | /v1/marketing/autonomy | The kinds of marketing action, their checks and ceilings, and the autonomy levels each allows | marketing:read |
| GET | /v1/marketing/brands | List brands | marketing:read |
| POST | /v1/marketing/brands | Create a brand | marketing:write |
| GET | /v1/marketing/brands/:id | Get a brand | marketing:read |
| PATCH | /v1/marketing/brands/:id | Change a brand | marketing:write |
| GET | /v1/marketing/brands/:id/versions | List a brand's kit versions, newest first | marketing:read |
| POST | /v1/marketing/brands/:id/versions | Save a new version of a brand's kit (earlier versions stay as they were) | marketing:write |
| GET | /v1/marketing/campaigns | List campaigns | marketing:read |
| POST | /v1/marketing/campaigns | Create a campaign | marketing:write |
| GET | /v1/marketing/campaigns/:id | Get a campaign | marketing:read |
| PATCH | /v1/marketing/campaigns/:id | Change a campaign | marketing:write |
| POST | /v1/marketing/campaigns/:id/assets | Attach an asset to a campaign | marketing:write |
| GET | /v1/marketing/campaigns/:id/links | A campaign's assets and audiences | marketing:read |
| GET | /v1/marketing/channel-accounts | List channel accounts | marketing:read |
| POST | /v1/marketing/channel-accounts | Create a channel account | marketing:write |
| GET | /v1/marketing/channel-accounts/:id | Get a channel account | marketing:read |
| PATCH | /v1/marketing/channel-accounts/:id | Change a channel account | marketing:write |
| PUT | /v1/marketing/channel-accounts/:id/limits | Set a channel account's autonomy ceiling, spend ceilings and restrictions, or pause it (owners) | settings:write |
| GET | /v1/marketing/channel-campaigns | List channel campaigns | marketing:read |
| POST | /v1/marketing/channel-campaigns | Create a channel campaign | marketing:write |
| GET | /v1/marketing/channel-campaigns/:id | Get a channel campaign | marketing:read |
| PATCH | /v1/marketing/channel-campaigns/:id | Change a channel campaign | marketing:write |
| GET | /v1/marketing/channel-entities | List channel entities | marketing:read |
| POST | /v1/marketing/channel-entities | Create a channel entity | marketing:write |
| GET | /v1/marketing/channel-entities/:id | Get a channel entity | marketing:read |
| PATCH | /v1/marketing/channel-entities/:id | Change a channel entity | marketing:write |
| GET | /v1/marketing/connectors | Each marketing connector before you connect it: what it reads, writes and can spend, its permissions and whether it's ready | connections:read |
| GET | /v1/marketing/credits | Credits used this month and the monthly limit (the plan's, plus this month's top-ups and credits carried over) | billing:read |
| PUT | /v1/marketing/credits/limit | Set the monthly credit limit (owners; at most the plan's allowance; empty for the plan's allowance) | billing:write |
| GET | /v1/marketing/markets | List markets | marketing:read |
| POST | /v1/marketing/markets | Create a market | marketing:write |
| GET | /v1/marketing/markets/:id | Get a market | marketing:read |
| PATCH | /v1/marketing/markets/:id | Change a market | marketing:write |
| GET | /v1/marketing/metrics | Read daily metrics for a date range, by campaign, channel account, metric or level | marketing:read |
| POST | /v1/marketing/metrics | Write daily metrics (up to 1,000 facts; the same fact again replaces its value) | marketing:write |
| GET | /v1/marketing/modules | The product's areas and which ones are on for your organization | marketing:read |
| PUT | /v1/marketing/modules/:key | Turn an area of the product on or off for your organization (owners) | settings:write |
| GET | /v1/marketing/modules/:key/preview | What turning an area on would do outside the product and what it may cost, before you turn it on | marketing:read |
| GET | /v1/marketing/plans | List plans | marketing:read |
| POST | /v1/marketing/plans | Create a plan | marketing:write |
| GET | /v1/marketing/plans/:id | Get a plan | marketing:read |
| PATCH | /v1/marketing/plans/:id | Change a plan | marketing:write |
| GET | /v1/marketing/products | List products | marketing:read |
| POST | /v1/marketing/products | Create a product | marketing:write |
| GET | /v1/marketing/products/:id | Get a product | marketing:read |
| PATCH | /v1/marketing/products/:id | Change a product | marketing:write |
| GET | /v1/marketing/switched-off | The abilities that stay off in your areas until an owner turns them on, what each does and where it's turned on | marketing:read |
Examples
GET /v1/marketing/asset-rights
List asset rights
curl -s "https://api.cubbylark.com/v1/marketing/asset-rights" \
-H "Authorization: Bearer $KC_API_KEY"const res = await fetch(`https://api.cubbylark.com/v1/marketing/asset-rights`, {
method: "GET",
headers: { authorization: `Bearer ${process.env.KC_API_KEY}` },
});
const data = await res.json();POST /v1/marketing/asset-rights
Create an asset right
curl -s -X POST "https://api.cubbylark.com/v1/marketing/asset-rights" \
-H "Authorization: Bearer $KC_API_KEY" \
-H "content-type: application/json" \
-d '{}'const res = await fetch(`https://api.cubbylark.com/v1/marketing/asset-rights`, {
method: "POST",
headers: { authorization: `Bearer ${process.env.KC_API_KEY}`, "content-type": "application/json" },
body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();GET /v1/marketing/asset-rights/$ID
Get an asset right
curl -s "https://api.cubbylark.com/v1/marketing/asset-rights/$ID" \
-H "Authorization: Bearer $KC_API_KEY"const res = await fetch(`https://api.cubbylark.com/v1/marketing/asset-rights/${id}`, {
method: "GET",
headers: { authorization: `Bearer ${process.env.KC_API_KEY}` },
});
const data = await res.json();GET /v1/marketing/asset-usage
List asset usage
curl -s "https://api.cubbylark.com/v1/marketing/asset-usage" \
-H "Authorization: Bearer $KC_API_KEY"const res = await fetch(`https://api.cubbylark.com/v1/marketing/asset-usage`, {
method: "GET",
headers: { authorization: `Bearer ${process.env.KC_API_KEY}` },
});
const data = await res.json();POST /v1/marketing/asset-usage
Create an asset usage
curl -s -X POST "https://api.cubbylark.com/v1/marketing/asset-usage" \
-H "Authorization: Bearer $KC_API_KEY" \
-H "content-type: application/json" \
-d '{}'const res = await fetch(`https://api.cubbylark.com/v1/marketing/asset-usage`, {
method: "POST",
headers: { authorization: `Bearer ${process.env.KC_API_KEY}`, "content-type": "application/json" },
body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();GET /v1/marketing/asset-usage/$ID
Get an asset usage
curl -s "https://api.cubbylark.com/v1/marketing/asset-usage/$ID" \
-H "Authorization: Bearer $KC_API_KEY"const res = await fetch(`https://api.cubbylark.com/v1/marketing/asset-usage/${id}`, {
method: "GET",
headers: { authorization: `Bearer ${process.env.KC_API_KEY}` },
});
const data = await res.json();PATCH /v1/marketing/asset-usage/$ID
Change an asset usage
curl -s -X PATCH "https://api.cubbylark.com/v1/marketing/asset-usage/$ID" \
-H "Authorization: Bearer $KC_API_KEY" \
-H "content-type: application/json" \
-d '{}'const res = await fetch(`https://api.cubbylark.com/v1/marketing/asset-usage/${id}`, {
method: "PATCH",
headers: { authorization: `Bearer ${process.env.KC_API_KEY}`, "content-type": "application/json" },
body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();GET /v1/marketing/assets
List assets
curl -s "https://api.cubbylark.com/v1/marketing/assets" \
-H "Authorization: Bearer $KC_API_KEY"const res = await fetch(`https://api.cubbylark.com/v1/marketing/assets`, {
method: "GET",
headers: { authorization: `Bearer ${process.env.KC_API_KEY}` },
});
const data = await res.json();POST /v1/marketing/assets
Create an asset
curl -s -X POST "https://api.cubbylark.com/v1/marketing/assets" \
-H "Authorization: Bearer $KC_API_KEY" \
-H "content-type: application/json" \
-d '{}'const res = await fetch(`https://api.cubbylark.com/v1/marketing/assets`, {
method: "POST",
headers: { authorization: `Bearer ${process.env.KC_API_KEY}`, "content-type": "application/json" },
body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();GET /v1/marketing/assets/$ID
Get an asset
curl -s "https://api.cubbylark.com/v1/marketing/assets/$ID" \
-H "Authorization: Bearer $KC_API_KEY"const res = await fetch(`https://api.cubbylark.com/v1/marketing/assets/${id}`, {
method: "GET",
headers: { authorization: `Bearer ${process.env.KC_API_KEY}` },
});
const data = await res.json();PATCH /v1/marketing/assets/$ID
Change an asset
curl -s -X PATCH "https://api.cubbylark.com/v1/marketing/assets/$ID" \
-H "Authorization: Bearer $KC_API_KEY" \
-H "content-type: application/json" \
-d '{}'const res = await fetch(`https://api.cubbylark.com/v1/marketing/assets/${id}`, {
method: "PATCH",
headers: { authorization: `Bearer ${process.env.KC_API_KEY}`, "content-type": "application/json" },
body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();GET /v1/marketing/assets/$ID/versions
List an asset's versions with how each was made
curl -s "https://api.cubbylark.com/v1/marketing/assets/$ID/versions" \
-H "Authorization: Bearer $KC_API_KEY"const res = await fetch(`https://api.cubbylark.com/v1/marketing/assets/${id}/versions`, {
method: "GET",
headers: { authorization: `Bearer ${process.env.KC_API_KEY}` },
});
const data = await res.json();POST /v1/marketing/assets/$ID/versions
Add a version to an asset, labeled with how it was made
curl -s -X POST "https://api.cubbylark.com/v1/marketing/assets/$ID/versions" \
-H "Authorization: Bearer $KC_API_KEY" \
-H "content-type: application/json" \
-d '{}'const res = await fetch(`https://api.cubbylark.com/v1/marketing/assets/${id}/versions`, {
method: "POST",
headers: { authorization: `Bearer ${process.env.KC_API_KEY}`, "content-type": "application/json" },
body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();GET /v1/marketing/autonomy
The kinds of marketing action, their checks and ceilings, and the autonomy levels each allows
curl -s "https://api.cubbylark.com/v1/marketing/autonomy" \
-H "Authorization: Bearer $KC_API_KEY"const res = await fetch(`https://api.cubbylark.com/v1/marketing/autonomy`, {
method: "GET",
headers: { authorization: `Bearer ${process.env.KC_API_KEY}` },
});
const data = await res.json();GET /v1/marketing/brands
List brands
curl -s "https://api.cubbylark.com/v1/marketing/brands" \
-H "Authorization: Bearer $KC_API_KEY"const res = await fetch(`https://api.cubbylark.com/v1/marketing/brands`, {
method: "GET",
headers: { authorization: `Bearer ${process.env.KC_API_KEY}` },
});
const data = await res.json();POST /v1/marketing/brands
Create a brand
curl -s -X POST "https://api.cubbylark.com/v1/marketing/brands" \
-H "Authorization: Bearer $KC_API_KEY" \
-H "content-type: application/json" \
-d '{}'const res = await fetch(`https://api.cubbylark.com/v1/marketing/brands`, {
method: "POST",
headers: { authorization: `Bearer ${process.env.KC_API_KEY}`, "content-type": "application/json" },
body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();GET /v1/marketing/brands/$ID
Get a brand
curl -s "https://api.cubbylark.com/v1/marketing/brands/$ID" \
-H "Authorization: Bearer $KC_API_KEY"const res = await fetch(`https://api.cubbylark.com/v1/marketing/brands/${id}`, {
method: "GET",
headers: { authorization: `Bearer ${process.env.KC_API_KEY}` },
});
const data = await res.json();PATCH /v1/marketing/brands/$ID
Change a brand
curl -s -X PATCH "https://api.cubbylark.com/v1/marketing/brands/$ID" \
-H "Authorization: Bearer $KC_API_KEY" \
-H "content-type: application/json" \
-d '{}'const res = await fetch(`https://api.cubbylark.com/v1/marketing/brands/${id}`, {
method: "PATCH",
headers: { authorization: `Bearer ${process.env.KC_API_KEY}`, "content-type": "application/json" },
body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();GET /v1/marketing/brands/$ID/versions
List a brand's kit versions, newest first
curl -s "https://api.cubbylark.com/v1/marketing/brands/$ID/versions" \
-H "Authorization: Bearer $KC_API_KEY"const res = await fetch(`https://api.cubbylark.com/v1/marketing/brands/${id}/versions`, {
method: "GET",
headers: { authorization: `Bearer ${process.env.KC_API_KEY}` },
});
const data = await res.json();POST /v1/marketing/brands/$ID/versions
Save a new version of a brand's kit (earlier versions stay as they were)
curl -s -X POST "https://api.cubbylark.com/v1/marketing/brands/$ID/versions" \
-H "Authorization: Bearer $KC_API_KEY" \
-H "content-type: application/json" \
-d '{}'const res = await fetch(`https://api.cubbylark.com/v1/marketing/brands/${id}/versions`, {
method: "POST",
headers: { authorization: `Bearer ${process.env.KC_API_KEY}`, "content-type": "application/json" },
body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();GET /v1/marketing/campaigns
List campaigns
curl -s "https://api.cubbylark.com/v1/marketing/campaigns" \
-H "Authorization: Bearer $KC_API_KEY"const res = await fetch(`https://api.cubbylark.com/v1/marketing/campaigns`, {
method: "GET",
headers: { authorization: `Bearer ${process.env.KC_API_KEY}` },
});
const data = await res.json();POST /v1/marketing/campaigns
Create a campaign
curl -s -X POST "https://api.cubbylark.com/v1/marketing/campaigns" \
-H "Authorization: Bearer $KC_API_KEY" \
-H "content-type: application/json" \
-d '{}'const res = await fetch(`https://api.cubbylark.com/v1/marketing/campaigns`, {
method: "POST",
headers: { authorization: `Bearer ${process.env.KC_API_KEY}`, "content-type": "application/json" },
body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();GET /v1/marketing/campaigns/$ID
Get a campaign
curl -s "https://api.cubbylark.com/v1/marketing/campaigns/$ID" \
-H "Authorization: Bearer $KC_API_KEY"const res = await fetch(`https://api.cubbylark.com/v1/marketing/campaigns/${id}`, {
method: "GET",
headers: { authorization: `Bearer ${process.env.KC_API_KEY}` },
});
const data = await res.json();PATCH /v1/marketing/campaigns/$ID
Change a campaign
curl -s -X PATCH "https://api.cubbylark.com/v1/marketing/campaigns/$ID" \
-H "Authorization: Bearer $KC_API_KEY" \
-H "content-type: application/json" \
-d '{}'const res = await fetch(`https://api.cubbylark.com/v1/marketing/campaigns/${id}`, {
method: "PATCH",
headers: { authorization: `Bearer ${process.env.KC_API_KEY}`, "content-type": "application/json" },
body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();POST /v1/marketing/campaigns/$ID/assets
Attach an asset to a campaign
curl -s -X POST "https://api.cubbylark.com/v1/marketing/campaigns/$ID/assets" \
-H "Authorization: Bearer $KC_API_KEY" \
-H "content-type: application/json" \
-d '{}'const res = await fetch(`https://api.cubbylark.com/v1/marketing/campaigns/${id}/assets`, {
method: "POST",
headers: { authorization: `Bearer ${process.env.KC_API_KEY}`, "content-type": "application/json" },
body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();GET /v1/marketing/campaigns/$ID/links
A campaign's assets and audiences
curl -s "https://api.cubbylark.com/v1/marketing/campaigns/$ID/links" \
-H "Authorization: Bearer $KC_API_KEY"const res = await fetch(`https://api.cubbylark.com/v1/marketing/campaigns/${id}/links`, {
method: "GET",
headers: { authorization: `Bearer ${process.env.KC_API_KEY}` },
});
const data = await res.json();GET /v1/marketing/channel-accounts
List channel accounts
curl -s "https://api.cubbylark.com/v1/marketing/channel-accounts" \
-H "Authorization: Bearer $KC_API_KEY"const res = await fetch(`https://api.cubbylark.com/v1/marketing/channel-accounts`, {
method: "GET",
headers: { authorization: `Bearer ${process.env.KC_API_KEY}` },
});
const data = await res.json();POST /v1/marketing/channel-accounts
Create a channel account
curl -s -X POST "https://api.cubbylark.com/v1/marketing/channel-accounts" \
-H "Authorization: Bearer $KC_API_KEY" \
-H "content-type: application/json" \
-d '{}'const res = await fetch(`https://api.cubbylark.com/v1/marketing/channel-accounts`, {
method: "POST",
headers: { authorization: `Bearer ${process.env.KC_API_KEY}`, "content-type": "application/json" },
body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();GET /v1/marketing/channel-accounts/$ID
Get a channel account
curl -s "https://api.cubbylark.com/v1/marketing/channel-accounts/$ID" \
-H "Authorization: Bearer $KC_API_KEY"const res = await fetch(`https://api.cubbylark.com/v1/marketing/channel-accounts/${id}`, {
method: "GET",
headers: { authorization: `Bearer ${process.env.KC_API_KEY}` },
});
const data = await res.json();PATCH /v1/marketing/channel-accounts/$ID
Change a channel account
curl -s -X PATCH "https://api.cubbylark.com/v1/marketing/channel-accounts/$ID" \
-H "Authorization: Bearer $KC_API_KEY" \
-H "content-type: application/json" \
-d '{}'const res = await fetch(`https://api.cubbylark.com/v1/marketing/channel-accounts/${id}`, {
method: "PATCH",
headers: { authorization: `Bearer ${process.env.KC_API_KEY}`, "content-type": "application/json" },
body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();PUT /v1/marketing/channel-accounts/$ID/limits
Set a channel account's autonomy ceiling, spend ceilings and restrictions, or pause it (owners)
curl -s -X PUT "https://api.cubbylark.com/v1/marketing/channel-accounts/$ID/limits" \
-H "Authorization: Bearer $KC_API_KEY" \
-H "content-type: application/json" \
-d '{}'const res = await fetch(`https://api.cubbylark.com/v1/marketing/channel-accounts/${id}/limits`, {
method: "PUT",
headers: { authorization: `Bearer ${process.env.KC_API_KEY}`, "content-type": "application/json" },
body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();GET /v1/marketing/channel-campaigns
List channel campaigns
curl -s "https://api.cubbylark.com/v1/marketing/channel-campaigns" \
-H "Authorization: Bearer $KC_API_KEY"const res = await fetch(`https://api.cubbylark.com/v1/marketing/channel-campaigns`, {
method: "GET",
headers: { authorization: `Bearer ${process.env.KC_API_KEY}` },
});
const data = await res.json();POST /v1/marketing/channel-campaigns
Create a channel campaign
curl -s -X POST "https://api.cubbylark.com/v1/marketing/channel-campaigns" \
-H "Authorization: Bearer $KC_API_KEY" \
-H "content-type: application/json" \
-d '{}'const res = await fetch(`https://api.cubbylark.com/v1/marketing/channel-campaigns`, {
method: "POST",
headers: { authorization: `Bearer ${process.env.KC_API_KEY}`, "content-type": "application/json" },
body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();GET /v1/marketing/channel-campaigns/$ID
Get a channel campaign
curl -s "https://api.cubbylark.com/v1/marketing/channel-campaigns/$ID" \
-H "Authorization: Bearer $KC_API_KEY"const res = await fetch(`https://api.cubbylark.com/v1/marketing/channel-campaigns/${id}`, {
method: "GET",
headers: { authorization: `Bearer ${process.env.KC_API_KEY}` },
});
const data = await res.json();PATCH /v1/marketing/channel-campaigns/$ID
Change a channel campaign
curl -s -X PATCH "https://api.cubbylark.com/v1/marketing/channel-campaigns/$ID" \
-H "Authorization: Bearer $KC_API_KEY" \
-H "content-type: application/json" \
-d '{}'const res = await fetch(`https://api.cubbylark.com/v1/marketing/channel-campaigns/${id}`, {
method: "PATCH",
headers: { authorization: `Bearer ${process.env.KC_API_KEY}`, "content-type": "application/json" },
body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();GET /v1/marketing/channel-entities
List channel entities
curl -s "https://api.cubbylark.com/v1/marketing/channel-entities" \
-H "Authorization: Bearer $KC_API_KEY"const res = await fetch(`https://api.cubbylark.com/v1/marketing/channel-entities`, {
method: "GET",
headers: { authorization: `Bearer ${process.env.KC_API_KEY}` },
});
const data = await res.json();POST /v1/marketing/channel-entities
Create a channel entity
curl -s -X POST "https://api.cubbylark.com/v1/marketing/channel-entities" \
-H "Authorization: Bearer $KC_API_KEY" \
-H "content-type: application/json" \
-d '{}'const res = await fetch(`https://api.cubbylark.com/v1/marketing/channel-entities`, {
method: "POST",
headers: { authorization: `Bearer ${process.env.KC_API_KEY}`, "content-type": "application/json" },
body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();GET /v1/marketing/channel-entities/$ID
Get a channel entity
curl -s "https://api.cubbylark.com/v1/marketing/channel-entities/$ID" \
-H "Authorization: Bearer $KC_API_KEY"const res = await fetch(`https://api.cubbylark.com/v1/marketing/channel-entities/${id}`, {
method: "GET",
headers: { authorization: `Bearer ${process.env.KC_API_KEY}` },
});
const data = await res.json();PATCH /v1/marketing/channel-entities/$ID
Change a channel entity
curl -s -X PATCH "https://api.cubbylark.com/v1/marketing/channel-entities/$ID" \
-H "Authorization: Bearer $KC_API_KEY" \
-H "content-type: application/json" \
-d '{}'const res = await fetch(`https://api.cubbylark.com/v1/marketing/channel-entities/${id}`, {
method: "PATCH",
headers: { authorization: `Bearer ${process.env.KC_API_KEY}`, "content-type": "application/json" },
body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();GET /v1/marketing/connectors
Each marketing connector before you connect it: what it reads, writes and can spend, its permissions and whether it's ready
curl -s "https://api.cubbylark.com/v1/marketing/connectors" \
-H "Authorization: Bearer $KC_API_KEY"const res = await fetch(`https://api.cubbylark.com/v1/marketing/connectors`, {
method: "GET",
headers: { authorization: `Bearer ${process.env.KC_API_KEY}` },
});
const data = await res.json();GET /v1/marketing/credits
Credits used this month and the monthly limit (the plan's, plus this month's top-ups and credits carried over)
curl -s "https://api.cubbylark.com/v1/marketing/credits" \
-H "Authorization: Bearer $KC_API_KEY"const res = await fetch(`https://api.cubbylark.com/v1/marketing/credits`, {
method: "GET",
headers: { authorization: `Bearer ${process.env.KC_API_KEY}` },
});
const data = await res.json();PUT /v1/marketing/credits/limit
Set the monthly credit limit (owners; at most the plan's allowance; empty for the plan's allowance)
curl -s -X PUT "https://api.cubbylark.com/v1/marketing/credits/limit" \
-H "Authorization: Bearer $KC_API_KEY" \
-H "content-type: application/json" \
-d '{}'const res = await fetch(`https://api.cubbylark.com/v1/marketing/credits/limit`, {
method: "PUT",
headers: { authorization: `Bearer ${process.env.KC_API_KEY}`, "content-type": "application/json" },
body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();GET /v1/marketing/markets
List markets
curl -s "https://api.cubbylark.com/v1/marketing/markets" \
-H "Authorization: Bearer $KC_API_KEY"const res = await fetch(`https://api.cubbylark.com/v1/marketing/markets`, {
method: "GET",
headers: { authorization: `Bearer ${process.env.KC_API_KEY}` },
});
const data = await res.json();POST /v1/marketing/markets
Create a market
curl -s -X POST "https://api.cubbylark.com/v1/marketing/markets" \
-H "Authorization: Bearer $KC_API_KEY" \
-H "content-type: application/json" \
-d '{}'const res = await fetch(`https://api.cubbylark.com/v1/marketing/markets`, {
method: "POST",
headers: { authorization: `Bearer ${process.env.KC_API_KEY}`, "content-type": "application/json" },
body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();GET /v1/marketing/markets/$ID
Get a market
curl -s "https://api.cubbylark.com/v1/marketing/markets/$ID" \
-H "Authorization: Bearer $KC_API_KEY"const res = await fetch(`https://api.cubbylark.com/v1/marketing/markets/${id}`, {
method: "GET",
headers: { authorization: `Bearer ${process.env.KC_API_KEY}` },
});
const data = await res.json();PATCH /v1/marketing/markets/$ID
Change a market
curl -s -X PATCH "https://api.cubbylark.com/v1/marketing/markets/$ID" \
-H "Authorization: Bearer $KC_API_KEY" \
-H "content-type: application/json" \
-d '{}'const res = await fetch(`https://api.cubbylark.com/v1/marketing/markets/${id}`, {
method: "PATCH",
headers: { authorization: `Bearer ${process.env.KC_API_KEY}`, "content-type": "application/json" },
body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();GET /v1/marketing/metrics
Read daily metrics for a date range, by campaign, channel account, metric or level
curl -s "https://api.cubbylark.com/v1/marketing/metrics" \
-H "Authorization: Bearer $KC_API_KEY"const res = await fetch(`https://api.cubbylark.com/v1/marketing/metrics`, {
method: "GET",
headers: { authorization: `Bearer ${process.env.KC_API_KEY}` },
});
const data = await res.json();POST /v1/marketing/metrics
Write daily metrics (up to 1,000 facts; the same fact again replaces its value)
curl -s -X POST "https://api.cubbylark.com/v1/marketing/metrics" \
-H "Authorization: Bearer $KC_API_KEY" \
-H "content-type: application/json" \
-d '{}'const res = await fetch(`https://api.cubbylark.com/v1/marketing/metrics`, {
method: "POST",
headers: { authorization: `Bearer ${process.env.KC_API_KEY}`, "content-type": "application/json" },
body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();GET /v1/marketing/modules
The product's areas and which ones are on for your organization
curl -s "https://api.cubbylark.com/v1/marketing/modules" \
-H "Authorization: Bearer $KC_API_KEY"const res = await fetch(`https://api.cubbylark.com/v1/marketing/modules`, {
method: "GET",
headers: { authorization: `Bearer ${process.env.KC_API_KEY}` },
});
const data = await res.json();PUT /v1/marketing/modules/$KEY
Turn an area of the product on or off for your organization (owners)
curl -s -X PUT "https://api.cubbylark.com/v1/marketing/modules/$KEY" \
-H "Authorization: Bearer $KC_API_KEY" \
-H "content-type: application/json" \
-d '{}'const res = await fetch(`https://api.cubbylark.com/v1/marketing/modules/${key}`, {
method: "PUT",
headers: { authorization: `Bearer ${process.env.KC_API_KEY}`, "content-type": "application/json" },
body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();GET /v1/marketing/modules/$KEY/preview
What turning an area on would do outside the product and what it may cost, before you turn it on
curl -s "https://api.cubbylark.com/v1/marketing/modules/$KEY/preview" \
-H "Authorization: Bearer $KC_API_KEY"const res = await fetch(`https://api.cubbylark.com/v1/marketing/modules/${key}/preview`, {
method: "GET",
headers: { authorization: `Bearer ${process.env.KC_API_KEY}` },
});
const data = await res.json();GET /v1/marketing/plans
List plans
curl -s "https://api.cubbylark.com/v1/marketing/plans" \
-H "Authorization: Bearer $KC_API_KEY"const res = await fetch(`https://api.cubbylark.com/v1/marketing/plans`, {
method: "GET",
headers: { authorization: `Bearer ${process.env.KC_API_KEY}` },
});
const data = await res.json();POST /v1/marketing/plans
Create a plan
curl -s -X POST "https://api.cubbylark.com/v1/marketing/plans" \
-H "Authorization: Bearer $KC_API_KEY" \
-H "content-type: application/json" \
-d '{}'const res = await fetch(`https://api.cubbylark.com/v1/marketing/plans`, {
method: "POST",
headers: { authorization: `Bearer ${process.env.KC_API_KEY}`, "content-type": "application/json" },
body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();GET /v1/marketing/plans/$ID
Get a plan
curl -s "https://api.cubbylark.com/v1/marketing/plans/$ID" \
-H "Authorization: Bearer $KC_API_KEY"const res = await fetch(`https://api.cubbylark.com/v1/marketing/plans/${id}`, {
method: "GET",
headers: { authorization: `Bearer ${process.env.KC_API_KEY}` },
});
const data = await res.json();PATCH /v1/marketing/plans/$ID
Change a plan
curl -s -X PATCH "https://api.cubbylark.com/v1/marketing/plans/$ID" \
-H "Authorization: Bearer $KC_API_KEY" \
-H "content-type: application/json" \
-d '{}'const res = await fetch(`https://api.cubbylark.com/v1/marketing/plans/${id}`, {
method: "PATCH",
headers: { authorization: `Bearer ${process.env.KC_API_KEY}`, "content-type": "application/json" },
body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();GET /v1/marketing/products
List products
curl -s "https://api.cubbylark.com/v1/marketing/products" \
-H "Authorization: Bearer $KC_API_KEY"const res = await fetch(`https://api.cubbylark.com/v1/marketing/products`, {
method: "GET",
headers: { authorization: `Bearer ${process.env.KC_API_KEY}` },
});
const data = await res.json();POST /v1/marketing/products
Create a product
curl -s -X POST "https://api.cubbylark.com/v1/marketing/products" \
-H "Authorization: Bearer $KC_API_KEY" \
-H "content-type: application/json" \
-d '{}'const res = await fetch(`https://api.cubbylark.com/v1/marketing/products`, {
method: "POST",
headers: { authorization: `Bearer ${process.env.KC_API_KEY}`, "content-type": "application/json" },
body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();GET /v1/marketing/products/$ID
Get a product
curl -s "https://api.cubbylark.com/v1/marketing/products/$ID" \
-H "Authorization: Bearer $KC_API_KEY"const res = await fetch(`https://api.cubbylark.com/v1/marketing/products/${id}`, {
method: "GET",
headers: { authorization: `Bearer ${process.env.KC_API_KEY}` },
});
const data = await res.json();PATCH /v1/marketing/products/$ID
Change a product
curl -s -X PATCH "https://api.cubbylark.com/v1/marketing/products/$ID" \
-H "Authorization: Bearer $KC_API_KEY" \
-H "content-type: application/json" \
-d '{}'const res = await fetch(`https://api.cubbylark.com/v1/marketing/products/${id}`, {
method: "PATCH",
headers: { authorization: `Bearer ${process.env.KC_API_KEY}`, "content-type": "application/json" },
body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();GET /v1/marketing/switched-off
The abilities that stay off in your areas until an owner turns them on, what each does and where it's turned on
curl -s "https://api.cubbylark.com/v1/marketing/switched-off" \
-H "Authorization: Bearer $KC_API_KEY"const res = await fetch(`https://api.cubbylark.com/v1/marketing/switched-off`, {
method: "GET",
headers: { authorization: `Bearer ${process.env.KC_API_KEY}` },
});
const data = await res.json();Request and response schemas: https://www.cubbylark.com/openapi.json. All resources: API reference.