---
title: "Fingerprint and atomically lock an action intent"
method: POST
path: "/v1/actions/lock-intent"
---

# Fingerprint and atomically lock an action intent

`POST /v1/actions/lock-intent`

## Request

- Base URL: `https://api.scrubmytext.com`
- URL: `https://api.scrubmytext.com/v1/actions/lock-intent`
- Auth: HTTP bearer

LockMyAction: derive a stable idempotency key from a structured action and atomically claim it in one call. Execute the external action only when safe_to_execute is true. Reordered JSON object keys resolve to the same lock.

## Request body

- object
  - `action` string, required: Stable action name, such as refund_order or send_email.
  - `arguments` object, required: JSON object containing the action inputs. Object keys are sorted during canonicalization; array order remains significant.
  - `scope` string: Optional namespace used to separate otherwise identical action intents.
  - `lock_ttl_seconds` integer
  - `completion_ttl_seconds` integer

## Response `200`

Action intent fingerprinted and lock result returned

- object
  - `brand` 'LockMyAction', required
  - `status` string, required
  - `safe_to_execute` boolean, required
  - `key` string, required
  - `lock_id` string
  - `action_fingerprint` string, required
  - `idempotency_key` string, required
  - `algorithm` 'sha256', required
  - `canonicalization` string, required
  - `canonical_bytes` integer, required

## Other responses

- `400`: Malformed JSON request
- `401`: API key required or invalid
- `422`: Invalid or unsupported action intent
- `429`: Monthly usage limit reached

---

[API](https://skmtc.dev/scrubmytext/apis/scrubmytext-agent-infrastructure-api.md) · [All operations](https://skmtc.dev/scrubmytext/apis/scrubmytext-agent-infrastructure-api/llms.txt) · [OpenAPI document](https://skmtc.dev/scrubmytext/apis/scrubmytext-agent-infrastructure-api/revisions/54ace36baccf?raw)
