Concepts

Idempotency

Prevent duplicate operations by including an Idempotency-Key header in POST requests.

Overview

To prevent duplicate operations (such as submitting the same job application twice due to a network retry), include an Idempotency-Key header in your POST requests. If we receive two requests with the same key, the second request returns the cached response from the first without executing the operation again.

Usage

Use UUID v4 format for idempotency keys. Keys are valid for 24 hours after the first request. Subsequent requests with the same key within that window return the original response. Always generate a new key for genuinely new operations.

curl -X POST https://apply-api.boringproject.ai/api/v1/sessions/apply \
  -H "Authorization: Bearer bp_live_..." \
  -H "Idempotency-Key: 550e8400-e29b-41d4-a716-446655440000" \
  -H "Content-Type: application/json" \
  -d '{...}'

Best Practices

Generate a unique key per logical operation, not per HTTP request. Store the key alongside the operation so retries use the same key. If a request times out, retry with the same key — you will get back the result of the original request if it completed. Do not reuse keys across different operations.

Use idempotency keys for all session creation and application submission requests to ensure exactly-once semantics.