Members
Exempt from an automod rule
/v1/guilds/:guildId/members/:userId/automod/exemptions/:ruleIdAdd the member to a rule's exempt members, so the rule leaves them alone. Doing it twice is fine: changed says whether this call did anything.
A rule exempts at most 100 members, the same as on the dashboard. Rule ids are on the member endpoint's automod.exemptions and in the dashboard. An unknown rule is a 404.
A dashboard save of the Automod page replaces the whole configuration, so an exemption added here while someone has the page open is undone if they save without reloading.
Every change shows in the server's Recent changes on the dashboard, with the key's name and prefix and the reason if you send one. Writes are server-side only: browsers are refused at the CORS preflight, so a key that can change data never has to sit in a web page.
Headers
Idempotency-Keystring- Any string up to 255 characters you choose for this change, such as a UUID. A retry with the same key gets the first response back instead of making the change again, for 24 hours. Reusing a key for a different request is a 400; retrying while the first is still running is a 409
IDEMPOTENCY_CONFLICT. A 5xx is not kept, so the same key can be retried. X-Audit-Log-Reasonstring- Why, in up to 200 characters, URI-encoded as Discord expects. It shows next to the change in the server's Recent changes.