Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.qoder.com/llms.txt

Use this file to discover all available pages before exploring further.

Use an Idempotency-Key header to safely retry write operations and avoid duplicate resource creation on network timeouts.

Header format

Add an Idempotency-Key header to write operations (POST / PUT / DELETE):
Idempotency-Key: <UUID v4>
Use a UUID v4 to ensure global uniqueness. GET requests are inherently idempotent and do not need this header.

Duplicate request behavior

ScenarioServer response
Same key + same bodyReturns the original response without re-executing
Same key + different body409 conflict_error: "Idempotency key reused with a different request body."
No idempotency keyExecutes every time, potentially creating duplicate resources

Lifecycle

PropertyDescription
Retention24 hours after first use
After expiryThe same key is treated as a new request
ScopePer PAT (account)

Example

# Create an Agent with an idempotency key (safe to retry on timeout)
curl -X POST "https://api.qoder.com/api/v1/cloud/agents" \
  -H "Authorization: Bearer $QODER_PAT" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen | tr '[:upper:]' '[:lower:]')" \
  -d '{"name": "my-agent", "model": "ultimate"}'
Strongly recommended when creating critical resources (Agents, Sessions, Environments). Automation scripts issuing bulk writes should generate a unique key per request.