Bulk edits
Bulk edits applied to ad sets and ads, and reverting them.
List bulk edits
The workspace's bulk edits (applies and reverts), newest first, each with whether it can still be undone.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
mine | string | Optional | false for everyone's; default: only the caller's own. |
after | string | Optional | Cursor: nextAfter of the previous page. |
limit | string | Optional | Page size (1-100, default 20). |
Pluto-Workspace | string (uuid) | Optional | The workspace to act in, for credentials that can reach several (sessions, agent tokens). API keys belong to one workspace; another value is a 403. |
Response
items- This page.
items[].actorId- Their ID.
items[].actorKind- Who made it: person, agent or api_key.
items[].applying- Still being applied.
items[].canUndo- Whether a revert would start now: the credential may write, it wasn't undone and isn't still applying.
items[].createdAt- When.
items[].entities- What it changed.
items[].fields- The fields it changed.
items[].id- Changeset.
items[].items- Ads or ad sets it changed.
items[].kindrevertwhen it undid another bulk edit (reverts).One ofedit,revertitems[].revertedBy- The changeset that undid it.
items[].reverts- The bulk edit it undid.
items[].summary- What changed, in words.
nextAfter- Cursor for the next page; null at the end.
curl "$PLUTO_API/changesets" \
-H "Authorization: Bearer $PLUTO_KEY"Get a bulk edit
A changeset: who changed what.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Required | The changeset's ID. |
Pluto-Workspace | string (uuid) | Optional | The workspace to act in, for credentials that can reach several (sessions, agent tokens). API keys belong to one workspace; another value is a 403. |
Response
actorId- Their ID.
actorKind- Who made it: person, agent or api_key.
createdAt- When.
entries- Before/after per item and field.
entries[].after- Value after (any JSON); null when unset.
entries[].before- Value before (any JSON); null when unset.
entries[].entityadorad_set.entries[].entityId- Item.
entries[].field- Field.
entries[].versionAfter- The item's version after the change; a revert applies only while it is still current.
id- Changeset.
revertedBy- The changeset that reverted it.
selector- The selector the edit resolved.
summary- What changed, in words.
Errors
- 400The request is malformed.
- 401No valid credential.
- 403The credential lacks the permission, or belongs to another workspace.
- 404Not found in this workspace.
- 429Too many requests from this credential. Wait
Retry-Afterseconds. People in the app have their own budget, so an agent swarm can't starve them.
curl "$PLUTO_API/changesets/da17397c-759e-4179-916f-87cbbcd79e42" \
-H "Authorization: Bearer $PLUTO_KEY"Revert a bulk edit
Restores items unchanged since; the rest come back as conflicts. Provider effects are not undone. Runs in chunks like an apply.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Required | The changeset's ID. |
Idempotency-Key | string | Optional | The command ID. A retry with the same key returns the stored result; the same key with different input is a 409. Without it a retry cannot be recognized. |
Pluto-Workspace | string (uuid) | Optional | The workspace to act in, for credentials that can reach several (sessions, agent tokens). API keys belong to one workspace; another value is a 403. |
Response
Reverted count and conflicts.
Errors
- 400The request is malformed.
- 401No valid credential.
- 403The credential lacks the permission, or belongs to another workspace.
- 404Not found in this workspace.
- 409Conflict: a stale
expectedVersion(the body carriescurrent), a duplicate, or an Idempotency-Key reused with different input. - 422Validation failed;
errorslists every field problem at once. - 429Too many requests from this credential. Wait
Retry-Afterseconds. People in the app have their own budget, so an agent swarm can't starve them.
curl -X POST "$PLUTO_API/changesets/da17397c-759e-4179-916f-87cbbcd79e42/revert" \
-H "Authorization: Bearer $PLUTO_KEY" \
-H "Idempotency-Key: b9cd7f2c-34bb-4c5d-841d-566116aa48f9"