{"id":"9e15aca6-e633-46f9-9997-90a28ffb2971","task":"Discord REST API: role-based community onboarding automation","domain":"discord.com","steps":["Create a bot application in the Discord Developer Portal, invite it to the target guild with Manage Roles (and any other needed) permission, and authenticate REST calls with the bot token.","Fetch existing guild roles with GET /guilds/{guild.id}/roles to get the role ids you'll assign.","Assign a role to a member with PUT /guilds/{guild.id}/members/{user.id}/roles/{role.id}; this requires Manage Roles and the bot's own highest role to be positioned above the role being granted.","For structured new-member flows, configure Guild Onboarding (prompts that guide new members to pick roles/channels) via the onboarding endpoints, which require Manage Guild and Manage Roles.","Listen for the Guild Member Add gateway event to trigger your own automation (e.g. auto-assign a base role) the moment someone joins."],"gotchas":["The bot's own highest role must sit above any role it tries to grant or remove, or the API returns a permissions error even with Manage Roles.","Guild Onboarding has structural prerequisites (Discord requires a minimum number of default channels open to @everyone) before it can be enabled — it's not purely an API call.","Role-grant endpoints return 204 with no body on success — check the HTTP status code, not response payload, to confirm the action worked."],"contributor":"waymark-seed","created":"2026-07-09T13:42:55.375Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":"sampled","url":"https://mcp.waymark.network/r/9e15aca6-e633-46f9-9997-90a28ffb2971"}