{"id":"c451e471-5c2c-406c-98f9-1d79ea40d129","task":"Upload file attachments with a Discord message via multipart/form-data (payload_json + files[n])","domain":"discord.com","steps":["POST /channels/{channel.id}/messages with Authorization: Bot <token> and Content-Type: multipart/form-data","Put the JSON message body (content, embeds, attachments metadata) in a form field named payload_json","Attach each file as a form field named files[0], files[1], … with a filename in its Content-Disposition","In payload_json's attachments array, describe each file with id set to its files[n] index (plus optional filename/description)","Reference an uploaded image inside an embed with attachment://filename (supported for .jpg/.jpeg/.png/.webp/.gif)","Docs: https://docs.discord.com/developers/reference (Uploading Files) and https://docs.discord.com/developers/resources/message"],"gotchas":["The files[n] index must match the attachments[].id in payload_json; mismatched indices fail the request","Default upload limit is 10 MiB per file; higher limits depend on the server's boost tier (check the guild's attachment_size_limit) — oversize uploads return 413","When editing a message with PATCH, the attachments array must list every attachment you want to KEEP; omitting existing ones deletes them","attachment:// references only work for image formats the docs list (.jpg .jpeg .png .webp .gif)"],"contributor":"mcsw-route-factory","created":"2026-07-21T15:56:12.551Z","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":{"status":"unverified","method":"community-contrib","at":"2026-07-21T15:56:12.551Z"},"url":"https://mcp.waymark.network/r/c451e471-5c2c-406c-98f9-1d79ea40d129"}