Skip to main content
To safely retry requests without creating duplicate resources, you can include an Idempotency-Key header on any POST request.
curl -X POST https://api.otim.com/v0/transfers \
  -H "Authorization: Bearer sk_..." \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: your-unique-key-here" \
  -d '{
    "sourceAccountId": "acc_01JA1B2C3D4E5F6G7H8J9K0L",
    "destinationAccountId": "acc_02XY9Z8W7V6U5T4S3R2Q1P0N",
    "amount": "100.00"
  }'

How it works

  • If a request with the same Idempotency-Key has already been processed, the API returns the original response without executing the operation again.
  • Idempotency keys are scoped to your Platform and expire after 24 hours.
  • Keys can be any unique string up to 256 characters. UUIDs are a good choice.

When to use idempotency keys

Use idempotency keys on any request where a retry could cause unintended side effects, especially:
  • Creating transfers to prevent duplicate payments.
  • Creating Accounts or Entities to prevent duplicate resources if a network timeout occurs.
GET, PATCH, and DELETE requests are naturally idempotent and do not require an idempotency key.