Skip to main content

Squillify development is paused indefinitely. Read why, and discover what this experiment achieved. Read the story

MicroSkills Reference

Idempotency Key Builder

workflow.idempotency_key

ProductionBounded custom (Class B)Deterministicstrictfastv1.0.0
No network

Overview

You send the request data that defines "the same request", and we return one short key for it. Two requests that mean the same thing get the same key even if their JSON arrived with different key order, spacing, or number spelling, because we canonicalize with RFC 8785 before hashing with SHA-256. Pick the parts that matter with JSON Pointers and the rest is ignored, so a changing timestamp or trace id does not make a retry look new. Add a namespace to keep keys from different operations apart. We only compute the key: nothing is stored, remembered, or deduplicated here, and your values are never echoed back.

Everyone rolls their own idempotency key, and the naive version hashes the serialized request body. That breaks the moment a client reorders JSON keys, reformats a number, or adds a timestamp: the retry looks like a new request and the customer is charged twice. Canonicalizing first removes the formatting from the equation, and selecting fields removes the noise.

Reliability

Fully deterministic and clock-free: the same selected data, namespace, and encoding always give the same key, in any locale or timezone, and the canonical form is stable across languages because it is RFC 8785. Keys are 43-character BASE64URL or 64-character HEX. Failures, none of which are worth retrying unchanged: IDEMPOTENCY_POINTER_INVALID means a pointer is not valid RFC 6901 — it must be empty or start with '/', and '~' must be followed by 0 or 1 — or two pointers select the same location, so fix the pointer list and resend. IDEMPOTENCY_POINTER_MISSING means a pointer does not exist in the payload; a missing field is never silently treated as null, because that would let an incomplete request share a key with a complete one, so send the field or drop the pointer. IDEMPOTENCY_FIELD_LIMIT_EXCEEDED means you sent more than 256 pointers, so select fewer fields or key on a whole subtree. IDEMPOTENCY_PAYLOAD_UNSUPPORTED means the payload has no canonical form: an integer beyond 2^53, a non-finite number, an unpaired surrogate, or nesting deeper than 100 levels. The message names which one; large integers should be sent as strings.

Context footprint

Returns one short key and a few labels, a couple of hundred bytes whatever the payload size. A successful call costs 1 execution credit.

When to use it

When a retry must be recognised as the same request, and you want the key to depend on meaning rather than on byte-for-byte formatting.

When the client already sends a reliable idempotency key, when you need a random unique id instead of a derived one, or when you need the digest to be unforgeable — that needs a secret, so use crypto.squillify_signature.

Scope

Note
Derive one stable, opaque key from selected request data, so semantically identical requests hash identically.

Non-goals

  • Does not store keys, remember them, or deduplicate anything
  • Does not decide whether a request is a duplicate — that stays in your store
  • Does not echo the payload, the selected values, or the canonical bytes
  • Does not encrypt or sign; the key is a digest, not a credential
  • Does not accept a caller-supplied key or salt

Properties

IdempotentRetry safeStreaming supportedFile input supportedRequires external service

Capabilities

data-transformation

Cost & billing

Flat rate per invocation

MetercallsBillable onsuccessCost per call1 credit

File handling

Accepts file_refProduces file_refMax input1 MB

How we handle your data

Sensitive output possible
What this means

This skill may receive sensitive content and may return submitted, transformed, extracted, or reformatted content.

Squillify guarantees
  • Runs inside Squillify
  • This skill runs inside Squillify.
  • Payloads are not sent to an external service by this skill.
  • Squillify does not permanently store submitted payloads.
  • Telemetry records metadata only, not submitted content.
  • Submitted payloads are not used for training.
  • Submitted payloads are not reviewed by humans.
  • This skill does not target sensitive data.
  • The response may contain submitted or transformed content.
Your responsibility

Squillify does not determine whether submitted content is sensitive. Your application is responsible for deciding what data it is allowed to submit. Your application is responsible for securing the response.

Read the Microskill Data Handling Policy

Input schema

FieldTypeRequiredDescription
payloadobjectYesPurpose-bound JSON object the key is derived from; wrap a bare value as {value:...}. Nested JSON is accepted to the 1 MiB request limit — unconstrained RFC 8259 JSON items.
fieldsarrayNoFrom 1 through 256 JSON Pointers selecting identity fields; omit it to key on the whole payload.
namespacestringNoUp to 128 characters separating keys across operations; omit it for the empty namespace.
encodingstringNoHow the digest is encoded; omit it for BASE64URL.
algorithmstringNoHash algorithm; omit it for SHA256, the only value in this version.

Output schema

FieldTypeRequiredDescription
keystringYesOpaque idempotency key: 43 characters for BASE64URL or 64 lowercase hex characters for HEX.
algorithmstringYesHash that produced the key, always SHA256 in this version.
encodingstringYesEncoding actually applied, with the default filled in so two stored keys can be compared.
selectedFieldCountintegerYesHow many pointers were applied, or 0 when the key covers the whole payload.
canonicalizationstringYesKeying scheme stored beside the key so a future scheme change is detectable.
_metaobjectNoAlways present on success, with inputBytes naming the canonical form size that was hashed, never the values.

API contract

POST /v1/execute
curl
curl -sS -X POST "$BASE/v1/execute" -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"skillKey":"workflow.idempotency_key","input":{"payload":{"order":{"id":"A-1001","total":49.9}},"fields":["/order/id"],"namespace":"orders.submit"}}'
Integrations
TypeScript SDK
import { Squillify } from "@squillify/sdk";

const sq = new Squillify({ apiKey: process.env.SQUILLIFY_API_KEY });

const { output } = await sq.execute("workflow.idempotency_key", {"fields":["/order/id","/order/total"],"namespace":"orders.submit","payload":{"requestedAt":"2026-07-27T10:00:00Z","order":{"id":"A-1001","total":49.9},"traceId":"abc-123"}});

Errors

CodeHTTPRetryableDescription
VALIDATION_ERROR400NoThe request payload failed schema validation.
UNAUTHORIZED401NoMissing or invalid API key.
SKILL_NOT_ACCESSIBLE403NoThe API key is not granted access to this skill.
SKILL_NOT_AVAILABLE_FOR_PLAN403NoThis skill is not included in your current plan.
PLAN_ELIGIBILITY_UNAVAILABLE503YesPlan eligibility could not be decided. Retry after backoff.
SKILL_NOT_FOUND404NoThe requested skill or version does not exist.
TENANT_RATE_LIMITED429YesRequest rate limit exceeded. Retry after backoff.
QUOTA_EXCEEDED429YesPlan quota exhausted. Retryable once the quota period resets.
EXECUTION_TIMEOUT504YesExecution exceeded the allowed time budget.
IDEMPOTENCY_POINTER_INVALID400NoThe request payload failed this skill's input validation.
IDEMPOTENCY_POINTER_MISSING400NoThe request payload failed this skill's input validation.
IDEMPOTENCY_FIELD_LIMIT_EXCEEDED429NoA size, quota, rate, or time limit was exceeded.
IDEMPOTENCY_PAYLOAD_UNSUPPORTED400NoThe request payload failed this skill's input validation.

Other limits

LimitValue
Recommended inline bytes32 KiB

Limitations

  • Does not store keys, remember them, or deduplicate anything
  • Does not decide whether a request is a duplicate — that stays in your store
  • Does not echo the payload, the selected values, or the canonical bytes
  • Does not encrypt or sign; the key is a digest, not a credential
  • Does not accept a caller-supplied key or salt
  • Storing or checking the key — that is your database's job
  • Hashing a secret: a digest of a low-entropy secret is guessable
  • Keying on data that legitimately changes between retries, such as a timestamp

How to call

POST /v1/execute (requires authentication)

Request bodyjson
{
  "skillKey": "workflow.idempotency_key",
  "input": {
    "fields": [
      "/order/id",
      "/order/total"
    ],
    "namespace": "orders.submit",
    "payload": {
      "requestedAt": "2026-07-27T10:00:00Z",
      "order": {
        "id": "A-1001",
        "total": 49.9
      },
      "traceId": "abc-123"
    }
  }
}

Examples

Key an order on the fields that define it, ignoring the changing request metadata

Inputjson
{
  "fields": [
    "/order/id",
    "/order/total"
  ],
  "namespace": "orders.submit",
  "payload": {
    "requestedAt": "2026-07-27T10:00:00Z",
    "order": {
      "id": "A-1001",
      "total": 49.9
    },
    "traceId": "abc-123"
  }
}
Expected outputjson
{
  "encoding": "BASE64URL",
  "selectedFieldCount": 2,
  "canonicalization": "rfc8785-sha256-v1",
  "_meta": {
    "inputBytes": 42
  },
  "key": "IVHiRTS_jRKlqQVe_omAGel4akASJBLBpsIsw7c-7EA",
  "algorithm": "SHA256"
}

Key a whole webhook payload as hex, so a redelivery is recognised whatever the JSON formatting

Inputjson
{
  "payload": {
    "event": "invoice.paid",
    "invoice": "INV-7"
  },
  "encoding": "HEX"
}
Expected outputjson
{
  "encoding": "HEX",
  "selectedFieldCount": 0,
  "canonicalization": "rfc8785-sha256-v1",
  "_meta": {
    "inputBytes": 42
  },
  "key": "65cb6d6b2e07352eb26ce145ffe81e49eecee470375abc822089633653bc2270",
  "algorithm": "SHA256"
}
  • Build an Idempotency-Key for a payment or order submission from the request body
  • Deduplicate webhook deliveries whose payload repeats but whose envelope changes
  • Give a queue message a stable identity so a redelivery is recognised

Avoid for

  • Storing or checking the key — that is your database's job
  • Hashing a secret: a digest of a low-entropy secret is guessable
  • Keying on data that legitimately changes between retries, such as a timestamp

Composable with

Safety & privacy

  • Runs without calling any external service.
  • Your payloads are never stored permanently.
  • Telemetry captures metadata only — never your payload contents.
  • We never train models on your payloads.
  • No human reviews your payloads.

Tags

hashingnormalizationworkflowidempotency