Reconcile a no-code run with GET /v1/jobs and idempotency_key
When a Zap, scenario or flow loses its job ids, list jobs with GET /v1/jobs and join on idempotency_key. Pages are newest first, 100 at most, cursor-paged.

Set the Idempotency-Key on every Sume submit to something derived from your own record id, then rebuild lost state with GET /v1/jobs: each job row carries the idempotency_key it was created with, and Sume's OpenAPI says that is the column to join your own labels on. Pages are newest first, capped at 100, and move with next_cursor, passed back as starting_after. It works the same whether the run lived in n8n, Make, Zapier, Activepieces or a script.
Everything here is from Sume's API reference, the live OpenAPI behind it, and Jobs and results.
Which query parameters does the list take?
From the OpenAPI definition of listApiJobs. An unrecognized parameter is a 400 unknown_parameter rather than a silently unfiltered page, so a typo cannot hand you the wrong rows.
| Parameter | Values | Use |
|---|---|---|
status | queued, processing, completed, failed, canceled | Find stuck or failed jobs |
type | Non-empty string | Narrow to one job type |
limit | 1 to 100 | Page size |
starting_after | The previous page's next_cursor | Next page |
scope | thread or workspace | An ordinary API key defaults to workspace |
Why join on idempotency_key and not array position?
Sume's description says newest-first is not your submission order once a wave retries, so identity must not come from position. A retry with the same Idempotency-Key returns the original job, so one key maps to one job id, and the row shows both. Use a key that encodes your record, such as row-1042-v1; the submit endpoints accept 1 to 255 printable ASCII characters.
Reuse the same key only for the same operation and payload. If you change the intent, change the key.
What does a reconcile script look like?
This prints the failed jobs with their keys. The last page has no next_cursor, which is the loop terminator; Sume says not to synthesize one from the final job.
import json, os, urllib.request
def get(path):
req = urllib.request.Request(
"https://api.sume.com" + path,
headers={"Authorization": "Bearer " + os.environ["SUME_API_KEY"]},
)
with urllib.request.urlopen(req, timeout=30) as r:
return json.load(r)
def main():
cursor = None
while True:
q = "/v1/jobs?limit=100&status=failed"
if cursor:
q += "&starting_after=" + cursor
data = get(q)["data"]
for job in data["jobs"]:
print(job.get("idempotency_key"), job["id"])
cursor = data.get("next_cursor")
if not cursor:
break
main()What do I do with a failed or missing job?
For a failed job, read the error off the job record: GET /v1/jobs/{id}, and fix the cause the category names (for example validation means fix the input). Retry the submit only after that, with a new key if the input changed. For a job that is completed while your sheet says pending, the webhook never reached you: fetch GET /v1/jobs/{id}/result and write it back, or call POST /v1/jobs/{job_id}/webhook/redeliver so the event arrives again. Never resubmit the original paid request just because your tool timed out; a local timeout does not cancel the job.
Sources
Related posts
More in Developers
- Retry an avatar video request without paying twice
A timed-out avatar video submit can be retried safely with the same Idempotency-Key. What Sume returns, what causes a 409, and how to build the key.
- Ruby Net::HTTP: submit and poll a Sume job with one key
A Ruby recipe using only Net::HTTP: submit a Sume image job with an Idempotency-Key, set open and read timeouts, poll status_url, and return the artifact URLs.
- Feed scraped product copy to a Format run: input, not instruction
Putting a supplier's text into a Format's instruction lets it steer the run. Sume's input field is treated as data, with a 64-key and 2 MiB limit.
- script_run budgets: call, paid-call and timeout limits on MCP
script_run caps a Sume MCP program by timeout (5-55 s), max_calls and max_paid_calls, and stops with a named error code. Defaults, ceilings and what to do next.
Written by Sume