Quickstart
Connect a Discord channel and subscribe to your first account.
1. Create a Republic API Key
Sign in to Republic and open Settings > Developer API > API keys. Name the key and copy it when it is shown. The complete key is displayed only once. Store it on your server as REPUBLIC_API_KEY; do not put it in a public repository, browser application, screenshot, or Discord message.
2. Get Your Discord Webhook URL
In Discord, open the destination channel's settings, choose Integrations, and create an incoming webhook. Copy its URL. You need Discord permission to manage webhooks in that channel. Treat this URL as a secret: it authorizes posting to the channel.
You can also register and manage destinations directly in the Developer Console. Using the API is optional.
3. Register the Destination
Replace the example URL with the URL copied from Discord. Republic verifies it before registering it. Save data.id from the response; this Republic registration UUID is not the numeric Discord webhook ID.
curl -X POST 'https://dev.republicrx.app/api/developer/v1/webhooks' \
-H "Authorization: Bearer $REPUBLIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{"label":"Newsroom","url":"YOUR_DISCORD_WEBHOOK_URL"}'4. Choose an Account and Content Types
Replace WEBHOOK_ID with data.id. This example follows @Safety for posts, quotes, and articles. Include replies or reposts to receive those types too. Sending another PUT replaces that account's entire filter selection.
curl -X PUT 'https://dev.republicrx.app/api/developer/v1/webhooks/WEBHOOK_ID/subscriptions/Safety' \
-H "Authorization: Bearer $REPUBLIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{"content_types":["posts","quotes","articles"]}'5. Check Delivery
Subscriptions deliver future eligible content only; they do not copy old posts. When the account publishes matching public content, check delivery records or the console. Delivery runs in the background and may be delayed by Discord rate limits. Registration does not send a test message.
curl -X GET 'https://dev.republicrx.app/api/developer/v1/webhooks/WEBHOOK_ID/deliveries' \
-H "Authorization: Bearer $REPUBLIC_API_KEY"