Manage event reminders
Requires: A secret key with
MEMBER_AUTH, and the member's session.
Members get reminder emails before events they are registered for. This setting turns them on or off for the member in this community. It is one switch for every event here, not a per-event choice.
GET /api/v1/communities/:communityTag/me/reminder-preferences
PATCH /api/v1/communities/:communityTag/me/reminder-preferencesAt a glance
curl -X PATCH "https://api.cobuntu.com/api/v1/communities/your-community/me/reminder-preferences" \
-H "X-API-Key: $COBUNTU_SECRET_KEY" \
-H "X-Cobuntu-Auth-Token: $MEMBER_SESSION" \
-H "Content-Type: application/json" \
-d '{"emailReminders":false}'Both need a secret key with MEMBER_AUTH and the member's session.
const member = cobuntu.as(session);
const { emailReminders } = await member.me.reminderPreferences.get();
// { emailReminders: true }
await member.me.reminderPreferences.update({ emailReminders: false });
// { emailReminders: false }| Answer | Means |
|---|---|
400 INVALID_INPUT | emailReminders was not a boolean. |
401 INVALID_SESSION | Sign the member in again. |
403 SECRET_KEY_REQUIRED | A publishable key. |
Only email is covered. The other notification emails (events, posts,
announcements) live in me.preferences under notifications; see the
Account area guide.
A small server action for a toggle:
"use server";
export async function setReminders(on: boolean) {
const member = cobuntuForRequest();
return member.me.reminderPreferences.update({ emailReminders: on });
}