Discord's REST API lives at https://discord.com/api/v10. The easiest way in is a webhook, which needs no bot at all; everything else runs as a bot user.
For webhooks: in a channel's settings, Integrations → Webhooks → New Webhook → Copy Webhook URL. The URL ends in /webhooks/<id>/<token> — paste those two parts when asked.
For a bot: create an application in the developer portal, copy the token from its Bot page, and invite it to your server. Bot tokens go in Authorization: Bot <token> — the word Bot, not Bearer. In the examples it's written {{DISCORD_BOT_TOKEN}}.
Full reference: https://discord.com/developers/docs/reference
No bot needed. Returns 204; add ?wait=true to get the created message back.
curl -X POST https://discord.com/api/webhooks/{{WEBHOOK_ID}}/{{WEBHOOK_TOKEN}} \
-H "Content-Type: application/json" \
-d '{"content": "Hello from PostTaco 🌮", "username": "PostTaco"}'
Quickest way to check a bot token works.
curl https://discord.com/api/v10/users/@me \
-H "Authorization: Bot {{DISCORD_BOT_TOKEN}}"
The bot needs Send Messages permission in the channel. Right-click a channel → Copy Channel ID (turn on Developer Mode first).
curl -X POST https://discord.com/api/v10/channels/{{CHANNEL_ID}}/messages \
-H "Authorization: Bot {{DISCORD_BOT_TOKEN}}" \
-H "Content-Type: application/json" \
-d '{"content": "Hello from the bot"}'
Every channel in the server (guild) with its id, type, and position.
curl https://discord.com/api/v10/guilds/{{GUILD_ID}}/channels \
-H "Authorization: Bot {{DISCORD_BOT_TOKEN}}"