Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions api-reference/openapi/accounts.json
Original file line number Diff line number Diff line change
Expand Up @@ -3587,6 +3587,12 @@
"type": "string",
"description": "Chat ID to include a chat link in the email footer. Use [Create Chat](/api-reference/chat/create) to create one."
},
"idempotency_key": {
"type": "string",
"maxLength": 256,
"description": "Optional key that makes this send exactly-once. Two requests carrying the same key deliver a single email; the duplicate returns the original send's id instead of delivering again. Intended for retried or replayed callers — scheduled task runs re-execute on crash or redeploy, and without a key each re-execution delivers another copy of the same report. Use a value that is stable across retries of the same logical send and unique between different sends.",
"example": "chat_9f2c1e04-6b7a-4c3d-9a1e-2f5b8c7d0e11:msg_IVjxAcIRghYu"
},
Comment on lines +3590 to +3595

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: Add minLength: 1 to idempotency_key so an empty string is rejected at the schema level rather than silently bypassing deduplication or requiring backend special-casing.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At api-reference/openapi/accounts.json, line 3590:

<comment>Add `minLength: 1` to `idempotency_key` so an empty string is rejected at the schema level rather than silently bypassing deduplication or requiring backend special-casing.</comment>

<file context>
@@ -3587,6 +3587,12 @@
             "type": "string",
             "description": "Chat ID to include a chat link in the email footer. Use [Create Chat](/api-reference/chat/create) to create one."
           },
+          "idempotency_key": {
+            "type": "string",
+            "maxLength": 256,
</file context>
Suggested change
"idempotency_key": {
"type": "string",
"maxLength": 256,
"description": "Optional key that makes this send exactly-once. Two requests carrying the same key deliver a single email; the duplicate returns the original send's id instead of delivering again. Intended for retried or replayed callers — scheduled task runs re-execute on crash or redeploy, and without a key each re-execution delivers another copy of the same report. Use a value that is stable across retries of the same logical send and unique between different sends.",
"example": "chat_9f2c1e04-6b7a-4c3d-9a1e-2f5b8c7d0e11:msg_IVjxAcIRghYu"
},
"idempotency_key": {
"type": "string",
"minLength": 1,
"maxLength": 256,
"description": "Optional key that makes this send exactly-once. Two requests carrying the same key deliver a single email; the duplicate returns the original send's id instead of delivering again. Intended for retried or replayed callers — scheduled task runs re-execute on crash or redeploy, and without a key each re-execution delivers another copy of the same report. Use a value that is stable across retries of the same logical send and unique between different sends.",
"example": "chat_9f2c1e04-6b7a-4c3d-9a1e-2f5b8c7d0e11:msg_IVjxAcIRghYu"
},

"account_id": {
"type": "string",
"format": "uuid",
Expand Down