POST, PATCH and DELETE. They need a key with
the write scope. A key that reads only gets 403 insufficient_scope.
Each write does what the same change in the dashboard does: it checks the
plan of the account, and it goes to the audit log of the account. Each entry
gives the key and the address of the request:
Send a write again safely with an idempotency key
A network can fail after the API writes and before your program gets the answer. Send anIdempotency-Key header with each POST and PATCH, and
send the same key again when you retry:
Use a new UUID for each write. A
DELETE takes no key: a second delete gets
404.
Try a write first with a dry run
Each write of many items takes"dry_run": true. The API checks each item and
gives the answer, but it writes nothing:
Writes of many items and rejected items
A write of many items writes each item on its own. An item that is not valid is inrejected, with its index in your request and a code, and the other
items are written:
403 plan_limit_reached.
Create a topic with its scenarios
One request makes a topic and its scenarios:conflict. A topic that the plan cannot hold is
rejected with plan_limit_reached, and the topics before it stay written.
Change only what you send with PATCH
APATCH changes only the fields of its body. The other fields keep their
values. For the engines of a topic:
What you can write with the API
A new scenario runs with the next run of its topic. A write does not start a
run, thus it costs nothing.
The API reads the articles, the briefs and the templates, but it does not
write them. The dashboard writes them with a model.
A tracked URL group is a folder for the tracked URLs of a brand, such as
“Blog” or “Q4 campaign”. It is not a brand group. A brand group joins
competitors into one brand.
Writes that have a cost
Most writes only change the setup, thus they cost nothing. These writes start work that costs, as the same action in the dashboard does:
The plan of the account limits the knowledge bases of a brand. A write over
the limit gets
403 plan_limit_reached, and nothing is written.