> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gosentrix.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Idempotency

> Making idempotent API requests

Idempotent requests ensure safe retries without side effects.

## Idempotency Keys

Include an `Idempotency-Key` header in POST/PUT/PATCH requests:

<RequestExample>
  ```bash theme={null}
  curl -X POST https://api.gosentrix.io/api/v1/tenants \
    -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
    -H "Idempotency-Key: unique-key-12345" \
    -H "Content-Type: application/json" \
    -d '{"name": "My Company"}'
  ```
</RequestExample>

## How It Works

1. First request with key: Processed normally
2. Subsequent requests with same key: Returns original response
3. Key validity: 24 hours

## Best Practices

* Generate unique keys (UUIDs recommended)
* Include keys for all mutating operations
* Store keys for retry scenarios
* Use keys for webhook retries

## Supported Endpoints

All POST, PUT, and PATCH endpoints support idempotency keys.
