/v1/communities/{community_id}/actors/{actor_id}/notification-prefs/{kind}AuthSet a single notification-kind preference for the actor.
Idempotent upsert. Pass `{ enabled: false }` to mute, `{ enabled: true }` to re-enable. Cache is invalidated on write so the next NotificationService.tryEmit picks up the change immediately. Returns the resulting preference row.
Path parameters
community_id*stringSocial community UUID. Must belong to the PAK's workspace.
actor_id*stringSocial actor UUID.
kind*enum (15)NotificationKind label.
Request body
enabled*boolean`true` to receive notifications of this kind, `false` to mute. Default behaviour (no row) is `true`.
Example: false
Response · 200 Preference upserted.
actor_id*string · uuidSocial actor UUID.
Example: "aaaaaaaa-0000-0000-0000-000000000001"
kind*objectNotificationKind this row applies to.
Example: "follow"
enabled*booleanWhen `false`, the producer silently skips notifications of this kind for this actor. Default `true`.
Example: true
updated_at*string · date-timeISO timestamp of the last update. Synthesised entries (no explicit row) report epoch.
Example: "2026-05-01T12:00:00.000Z"
Example
Request
PATCH https://social.productcraft.co/v1/communities/{community_id}/actors/{actor_id}/notification-prefs/{kind}
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json
{
"enabled": false
}import { Social } from "@productcraft/social";
// Reads PRODUCTCRAFT_API_KEY from the environment
const social = new Social();
const notificationPref = await social.community("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f").actors.notificationPrefs.update("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f", "follow", { enabled: false });social.community(…).actors.notificationPrefs.update(actorId, kind, params, options?): Social.NotificationPref
Response
{
"actor_id": "aaaaaaaa-0000-0000-0000-000000000001",
"kind": "follow",
"enabled": true,
"updated_at": "2026-05-01T12:00:00.000Z"
}