{"id":"cx-kb-api-429-article-code","audience":"it","category":"support-work","technique":"format","track":"support","level":"advanced","title":"Write a short API rate-limit article with one code block","free":false,"task":"Write a developer help article with exactly three labeled lines: Title:, Cause:, Fix:. Title starts with \"How to\". Fix is one sentence. After them, exactly one code block of at most 8 lines showing pseudo-code that waits for the Retry-After seconds and retries once. Do not suggest creating extra API keys. Keep prose under 70 words.","materialLabel":"Your material (attached to your prompt automatically)","material":"SUPPORT TICKETS (API, Oct): 'Getting HTTP 429 Too Many Requests.' Seen from 14 customers.\n\nEXAMPLE RESPONSE\nHTTP/1.1 429 Too Many Requests\nRetry-After: 20\n{\"error\": \"rate_limit_exceeded\", \"limit\": \"100 requests per minute per key\"}\n\nENGINEERING NOTES\n- Limit: 100 requests per minute per API key. Counts reset every minute.\n- The Retry-After header gives the number of seconds to wait before the next request.\n- Recommended: wait the Retry-After seconds, then retry. If it fails again, stop and alert.\n- Batch endpoints count as 1 request for up to 50 records.\n\nAGENT SUGGESTION (rejected): 'Create a few more API keys and rotate them to avoid the limit.' This breaks the terms of use.\nCustomers are developers; keep it short.","rules":[{"type":"codeBlocks","count":1},{"type":"maxCodeLines","max":8},{"type":"maxProseWords","max":70}],"mistakes":[{"title":"Suggesting more keys","why":"The agent suggestion is in the ticket and the AI includes it.","fix":"Say: \"Do not suggest extra API keys.\"","checks":["r2"]},{"title":"Wrong code shape","why":"The AI writes a long multi-block example.","fix":"Say: \"One code block, at most 8 lines, retry once.\"","checks":["r1"]},{"title":"Missing labels","why":"The AI writes a long essay.","fix":"Name Title:, Cause:, Fix: and cap the prose at 70 words.","checks":["r0"]},{"title":"Skipping the code block shape","why":"The AI splits output into several code blocks or none.","fix":"Say \"exactly one code block and nothing else\".","checks":["codeBlocks","maxCodeLines","maxProseWords"]}],"promptHints":[{"label":"Asks for one code block","patterns":["code block","```"]},{"label":"Caps the code length","patterns":["lines"]},{"label":"Cuts the chatter","patterns":["no (intro|explanation|chatter|preamble)","only"]},{"label":"Names the labels","patterns":["title:","cause:","fix:"]},{"label":"Asks for one code block","patterns":["code block","retry-after"]}],"hint":"Developer articles are short and have one runnable idea. Name the labels, the code limits, and what advice to avoid.","rubricLabels":["The prose has the labeled lines Title:, Cause: and Fix: with the title starting \"How to\", the cause naming the 100 requests per minute limit and HTTP 429, and the fix being one sentence about waiting for the Retry-After seconds then retrying","There is exactly one code block of at most 8 lines whose code reads the Retry-After value, waits that long, and retries once","Nothing suggests creating extra API keys or rotating keys"]}