Edited one ad hook and resent the bulk run? Same key gives 409

Reusing an Idempotency-Key with a changed Sume bulk-run payload returns 409 idempotency_conflict. Send only the edited hook under a new key.

5 min readSume
All posts

If you edit one hook in a 12-item UGC bulk run and resend it with the same Idempotency-Key, Sume returns 409 idempotency_conflict and names the original queue in details.queue_id. Nothing new is queued. Resend only the edited hook as a one-item bulk run under a fresh key (read 2026-10-08).

The replay rules

The key's scope is one Format. The header wins over a body idempotency_key if you send both. Unlike a single run, a bulk replay stays 202, and the queue has no idempotency_hit field, so a replayed call looks like a normal success: you only notice because the queue id is the old one.

Bulk-run replay outcomes as of 2026-10-08
You sendResult
Same key, same { concurrency, items }202 and the queue that already exists
Same key, different payload409 idempotency_conflict; details.queue_id names the original
New key, any payloadA new queue; every item is a new, billed Format run

Why a fresh key for the whole list is the wrong fix

A new key creates a second queue, and every item in it becomes a new Format run that spends from the workspace. If 11 of your 12 hooks were already fine, re-sending all 12 pays for 11 duplicates. Each item carries its own generation_spend_cap_usd, which limits one run but does not stop you from paying for a duplicate run twice.

So split the work: keep the first queue running, then send the edited hook alone.

  • Queue 1: key launch-hooks-v1, 12 items, untouched
  • Queue 2: key launch-hooks-v1-hook7-edit, 1 item, the edited hook
  • Cancel the old hook 7 child with POST /v1/format-runs/{run_id}/cancel if it has not finished

The two calls

Cancelling a child marks that queue item canceled and frees its slot for the next queued item. The Format run API has no public cancel-queue route, so cancel per child. Mint keys with a batch label, never a bare counter, so two people cannot collide.

curl -sS -X POST "https://api.sume.com/v1/formats/sume/sume-close-camera-ugc/bulk-runs" \
  -H "Authorization: Bearer $SUME_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: launch-hooks-v1-hook7-edit" \
  -d '{
    "concurrency": 1,
    "items": [
      { "instruction": "Vertical 9:16 UGC ad. New hook for line 7.",
        "generation_spend_cap_usd": 15 }
    ]
  }'

Check the result the right way

A queue is completed when every item is terminal, which is not the same as success. Read counts.failed and counts.canceled, then open the child run at GET /v1/format-runs/{run_id} for the reason. A 429 or 503 while polling is transient and the queue keeps draining, so back off rather than resubmit.

Sources

Related posts

More in Formats

All Formats posts

Written by Sume