Skip to main content
cURL
Cost: 1 API credit per write.
Needs the seller’s Chrome open somewhere, with the Alura extension and signed in to Etsy for this shop. The script or agent can run on another computer. An offline extension answers extension_offline; the live status can name a more specific connection problem. Errors cost no API credits. See Chrome extension.
Needs the ads:write scope and the Etsy Ads workspace permission. Works on a run applied over this API or on Alura’s Etsy Ads page. Send dry_run=true to see the writes it would send, without sending them.
This changes your live Etsy Ads. A paused listing is advertised again and starts spending.

What is restored

item_keys undoes only the changes you name (each action’s key), at most 120 a time. The default is every change of the run that can be undone.

What is left alone

Only changes still standing are undone. Alura leaves these alone:
  • A change already undone or marked resolved.
  • A change a newer run changed since.
  • A change another run also made, when Alura can’t tell which came last. Check it on Etsy and mark it resolved in the app.
  • A move whose earlier strategy was never recorded.
When nothing is left, the answer is 409 optimize_nothing_to_revert, and it names why. A run still applying answers 409 optimize_run_applying. Retry once it has finished.

How the writes run

Just before writing, Alura reads each listing on Etsy and restores only while Etsy still shows the run’s change.
  • Each restore is one Etsy write, read back before the next. A write that doesn’t succeed stops the ones after it (not_sent).
  • restored is true only when Etsy shows it.
  • A restore Etsy can’t show back stays not confirmed in the run. The next revert reads Etsy before sending it again.

Limits

The shop takes 20 Etsy writes a minute and 500 a day, and 30 live reads a minute. Each change is read on Etsy before and after. A request that needs more than are left is refused first: 429 live_rate_limited, nothing sent. Only a write that lands is charged. See Credits and limits. Past its time budget, or when Etsy has not shown the outcome yet, it answers 202 with its change (a retry under the same Idempotency-Key then answers the result).

Authorizations

Authorization
string
header
required

An API key: Authorization: Bearer alura_sk_....

Headers

Idempotency-Key
string

Makes a retry safe: the same key with the same request within 24 hours answers from the first write (with Idempotent-Replayed: true) and never writes to Etsy twice; a write that failed with nothing written (Retry-After set) is tried again under it. The same key with a different request is a 409 conflict; while the first request still runs, 409 idempotency_processing (or the same 202). Required for relative changes such as adjust_price, and to add a listing file, image or video, or to change the alt text of an image (each uploads to Etsy, so a blind retry would upload again); a dry_run=true needs none.

Required string length: 1 - 255

Path Parameters

id
string
required

The run ID: a preview's, or a run in the shop's history.

Required string length: 1 - 80
Pattern: ^[A-Za-z0-9_-]{1,80}$
Example:

"7c1d2e3f-4a5b-4c6d-8e9f-0a1b2c3d4e5f"

Query Parameters

dry_run
boolean

true: plan the write and send nothing: what it would change, the Etsy calls it would make, and nothing reserved, charged or recorded. Free; counts toward the per-minute write limit.

Body

application/json
item_keys
string[]

Undo only these changes (each action's key, as the run lists it); default every change of the run that can be undone, at most 120 at a time.

Required array length: 1 - 120 elements
Required string length: 1 - 600

Response

OK: the write landed on Etsy (or, with dry_run=true, what it would do).

What the revert sent to Etsy, each restore read back from Etsy before the next.

object
string
required
Allowed value: "workspace.ads_optimize_revert"
run_id
string
required
shop_id
string
required
status
enum<string>
required

succeeded when every restore succeeded; otherwise the status of the first one that did not (the restores after it were not sent).

Available options:
succeeded,
partial,
failed,
unknown,
applying,
not_sent,
skipped
restores
object[]
required