API reference
Recurring messages
Messages the Zyron bot posts in a channel on a schedule — every N seconds, or after every N member messages.
All paths are relative to https://api.zyron.pro/api/v1/guilds/:guildId.
List recurring messages
GET
/guilds/:guildId/recurringReturns the guild's recurring messages along with the limits that apply when writing them back.
json
{
"items": [
{
"_id": "665f1c2ab8d3e14f2a9b1c10",
"channelId": "234567890123456789",
"mode": "interval",
"intervalSeconds": 3600,
"everyMessages": 50,
"content": "Don't forget to check the leaderboard!",
"embed": null,
"enabled": true,
"lastSentAt": "2026-07-11T18:30:00.000Z"
}
],
"limits": {
"maxItems": 5,
"minIntervalSeconds": 60,
"maxIntervalSeconds": 604800,
"minEveryMessages": 10,
"maxEveryMessages": 10000,
"maxContent": 2000
}
}Replace recurring messages
PUT
/guilds/:guildId/recurringFull replacement — the body's items array becomes the guild's complete list. Send an empty array to remove all recurring messages.
| Field | Type | Description |
|---|---|---|
itemsrequired | object[] | The new list (max 5 entries). |
items[]._id | string | Echo the id from GET to keep an item's identity — existing items keep their schedule across updates. Omit for new items. |
items[].channelIdrequired | string | The channel the message is posted in. |
items[].mode | "interval" | "messages" | interval posts every intervalSeconds; messages posts after every everyMessages member messages in the channel. Defaults to interval. |
items[].intervalSeconds | number | Seconds between posts in interval mode, 60–604800. |
items[].everyMessages | number | Member messages between posts in messages mode, 10–10000. Bot messages don't count. |
items[].content | string | The message text, max 2000 characters. Optional when embed is set — but every item needs content, an embed, or both. |
items[].embed | object | null | An embed to send with (or instead of) the text — same shape as trigger embeds. |
items[].enabled | boolean | Disabled items are kept but never post. Defaults to true. |
curl -X PUT https://api.zyron.pro/api/v1/guilds/123456789012345678/recurring \
-H "Authorization: Bearer zyr_your_guild_key" \
-H "Content-Type: application/json" \
-d '{
"items": [
{
"channelId": "234567890123456789",
"mode": "messages",
"everyMessages": 100,
"content": "Use code ZYRON in the item shop!",
"enabled": true
}
]
}'Scheduling behavior
lastSentAt is server-owned and read-only: interval schedules survive bot restarts, and a new or edited item first posts one full interval after it is saved. Message counters are in-memory and restart from zero when the bot restarts.PUT replaces the whole list
To add or edit one item, first
GET /recurring, modify the array (keeping each item's _id), then PUT it back in full. Anything you omit is deleted.Errors
400 invalid_request when a limit is exceeded, a channel id is missing or invalid, an interval or message count is out of range, or an item has neither content nor an embed. See Errors for the shared codes.