diff --git a/fern/products/sdks/guides/configure-idempotency.mdx b/fern/products/sdks/guides/configure-idempotency.mdx index ba2690e19..cde1c7b14 100644 --- a/fern/products/sdks/guides/configure-idempotency.mdx +++ b/fern/products/sdks/guides/configure-idempotency.mdx @@ -3,10 +3,13 @@ title: Configure Idempotency Headers description: SDKs that safely support retrying requests --- - +For endpoints you've configured as idempotent, Fern's SDKs allow you to +specify idempotency headers. Typically the headers include `Idempotency-Key`, +but you can also specify additional headers. -For any idempotent endpoints, Fern's SDKs will allow you to specify idempotency headers. -Typically the headers include `Idempotency-Key`, but you can also specify additional headers. +## How it works for SDK users + +Your SDK users can specify an idempotency header like this: @@ -55,15 +58,17 @@ Typically the headers include `Idempotency-Key`, but you can also specify additi -Note that the generated SDKs will not allow you to specify idempotency headers + + The generated SDKs will not allow users to specify idempotency headers for non-idempotent endpoints. This is to ensure that the user knows exactly which invocations are idempotent and which are not. + -### Configuration +## Configuring idempotency headers -To enable idempotency headers in your API, you need to do the following in your overrides file: +To set up idempotency headers in your API, you need to do the following in your `overrides` file: 1. Configure the idempotency headers -2. Mark individual endpoints as idempotent +1. Mark individual endpoints as idempotent @@ -97,7 +102,7 @@ To enable idempotency headers in your API, you need to do the following in your Idempotency-Expiration: integer ``` - + ```yaml # Mark an individual endpoint as idempotent endpoints: