API

Idempotency

How Everyn clients safely retry create requests without duplicating product work.

Idempotency keeps network retries from creating duplicate datasets, job specs, runs, exports, alert rules, webhook endpoints, organizations, API keys, or invitations. Everyn treats the idempotency key as part of the create-operation contract.

Idempotency rules

Create-style routes that require Idempotency-Key:

RoutePurpose
POST /v1/dataset-uploadsCreate a dataset upload session and enqueue intake.
POST /v1/job-specsA verified human creates a reusable Job through a browser session.
POST /v1/job-specs/{jobSpecId}/forkA verified human forks an exact Job version.
POST /v1/runsCreate a run from a dataset and job spec.
POST /v1/runs/{runId}/retryCreate a retry run with lineage.
POST /v1/runs/{runId}/exportsCreate a self-starting export.
POST /v1/webhook-endpointsCreate a webhook endpoint.
POST /v1/alert-rulesCreate an alert rule.
POST /v1/organizationsCreate an organization through the admin API.
POST /v1/organizations/{organizationId}/api-keysCreate an organization-owned API key.
POST /v1/organizations/{organizationId}/invitationsCreate an organization invitation.

Example:

This machine-key example creates a Run from an existing human-authored Job. A machine key cannot claim or replay a Job-authoring idempotency receipt, even if it has job_specs:write.

curl -sS -X POST "$EVERYN_BASE_URL/v1/runs" \
  -H "Authorization: Bearer $EVERYN_API_KEY" \
  -H "Idempotency-Key: run-preview-20260707-leads-v1" \
  -H "Content-Type: application/json" \
  --data '{
    "datasetId": "ds_...",
    "jobSpecId": "js_...",
    "scope": { "type": "limit", "count": 25 }
  }'

Recovery rules:

SituationClient behavior
Timeout before responseRetry the same request with the same Idempotency-Key.
Same key, same bodyExpect the same logical operation rather than duplicate product work.
Same key, changed bodyExpect 409 idempotency_conflict; choose a new key only if the changed request is truly a new operation.
New run or retry intendedCreate a new idempotency key and make the retry or follow-up run explicit.
Job authoring after membership revocationThe human must regain current workspace write access; a matching old key does not bypass authorization.
Historical machine Job-authoring receiptA human must review the Job and use a new key; the old receipt cannot be replayed as human authoring.

See the API quickstart for run creation and API errors for 409 recovery.