WavefrontDevelopers

Start

Quickstart

Start an article over the REST API, follow it to review, and publish it once a person approves it. You need a Wavefront workspace on a plan or the trial, and to be one of its owners to create the key.

1. Create an API key

In the web app, open Settings → API and MCP, name the key and pick its scopes. For this guide pick generations:read, generations:write and publish. The key is shown once; store it as a secret.

export WF=https://wavefront.adwave.com
export WAVEFRONT_API_KEY=wf_live_…

2. Check the key

GET /v1/me returns the key's scopes and its workspace. The workspace slug goes in every other path.

curl -s "$WF/v1/me" -H "Authorization: Bearer $WAVEFRONT_API_KEY"
Response
{
  "kind": "api_key",
  "key_id": "key_…",
  "scopes": ["generations:read", "generations:write", "publish"],
  "workspace": { "id": "ws_…", "slug": "adwave", "name": "Adwave" }
}

3. Start a generation

Generation is asynchronous: the request returns at once with an id. The Idempotency-Key header makes a retried request safe. Each kind's input fields are at GET /v1/kinds.

curl -s -X POST "$WF/v1/workspaces/adwave/generations" \
  -H "Authorization: Bearer $WAVEFRONT_API_KEY" \
  -H "Idempotency-Key: k40-2026-10-draft-1" \
  -H "content-type: application/json" \
  -d '{"kind":"article","input":{"content_type":"stats","title":"Google Ads cost benchmarks by industry","primary_keyword":"google ads cost benchmarks","required_facts":["average cost per click by industry"],"assignment":{"id":"K40","revision":"1"}}}'
Response: 202 Accepted
{
  "generation": { "id": "gen_…", "kind": "article", "status": "queued", … },
  "replayed": false,
  "app_url": "https://wavefront.adwave.com/w/adwave/g/gen_…"
}

4. Poll it

Every 15 to 30 seconds is plenty.

curl -s "$WF/v1/workspaces/adwave/generations/gen_…" \
  -H "Authorization: Bearer $WAVEFRONT_API_KEY"
statusWhat to do
queued, runningPoll again.
needs_inputAnswer its questions (step 5).
ready_for_reviewA version exists. A person reviews it at app_url (step 6).
incomplete_budgetIt ran out of budget. A partial version may exist; request a revision or start again.
failed, cancelled, expiredFinished without a version to review. Read error.

The response is {generation, events, versions, history, app_url}. generation.review_status is the latest version's decision: pending, approved, changes_requested or superseded. Instead of polling you can subscribe to webhooks such as generation.ready_for_review and version.approved.

5. Answer questions

A draft that needs something it can't find pauses with needs_input and a list of questions, each with an id and a prompt. Answer by id and the same run resumes. Unanswered, it expires after 14 days.

curl -s -X POST "$WF/v1/workspaces/adwave/generations/gen_…/inputs" \
  -H "Authorization: Bearer $WAVEFRONT_API_KEY" \
  -H "content-type: application/json" \
  -d '{"answers":{"q1":"Use the 2026 benchmarks from our pricing study."}}'

6. A person approves it in the app

At ready_for_review, a reviewer opens app_url, reads the draft and its checks, and approves it or asks for changes. Keys can't approve (403 human_approval_required), but they can ask for changes on someone's behalf:

curl -s -X POST "$WF/v1/workspaces/adwave/versions/ver_…/revisions" \
  -H "Authorization: Bearer $WAVEFRONT_API_KEY" \
  -H "content-type: application/json" \
  -d '{"feedback":"Lead with the cost-per-click table and cite each source."}'

7. Publish or schedule

Once the version is approved, find a destination (an owner sets them up under Settings → Publishing) and publish to it.

curl -s "$WF/v1/workspaces/adwave/destinations" -H "Authorization: Bearer $WAVEFRONT_API_KEY"

curl -s -X POST "$WF/v1/workspaces/adwave/versions/ver_…/publish" \
  -H "Authorization: Bearer $WAVEFRONT_API_KEY" \
  -H "content-type: application/json" \
  -d '{"destination_id":"dst_…"}'

That returns 202 with a publication. Poll GET …/publications/{id} until its state is published (or draft_created or scheduled), or failed. To publish later instead, schedule it:

curl -s -X POST "$WF/v1/workspaces/adwave/schedules" \
  -H "Authorization: Bearer $WAVEFRONT_API_KEY" \
  -H "content-type: application/json" \
  -d '{"version_id":"ver_…","destination_id":"dst_…","publish_at":"2026-10-20T09:00:00Z"}'
Publishing a later version of the same content to the same destination updates the page in place: same URL, same slug. More on publishing.