Agent API failures now carry a stable error code
Over HTTP, every failure of the agent API answers a snake_case code to branch on beside a message to read, and claiming a key that already asked personas counts as getting started.
- For developers:
POST /api/2cents,POST /api/simulations,POST /api/feedbackandPOST /api/reportsnow answer{ "error": "<code>", "message": "…" }.errorused to be the sentence; it is now a stable code such asno_credits,persona_not_foundordaily_limit, and the sentence moved tomessage. A body that doesn't match the schema answers400Validation failedwith itsissues. A question, name, report reason or feedback text the service refuses is now422(was400), and an unknown persona is404. See the agent API and/openapi.json(version 1.2.0). - For developers: in the signed-in API,
POST /api/my/keysandPOST /api/my/claimanswer400Validation failedfor a malformed body (wasinvalid_keyandinvalid_claim). See the API reference. - Claiming an earlier key that already asked personas counts as getting started, so the getting-started emails don't come. See Your key and your 2¢.