Social API reference

Social API · Notification-Preferences

patch/v1/communities/{community_id}/actors/{actor_id}/notification-prefs/{kind}Auth

Set 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*string

Social community UUID. Must belong to the PAK's workspace.

actor_id*string

Social 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 · uuid

Social actor UUID.

Example: "aaaaaaaa-0000-0000-0000-000000000001"

kind*object

NotificationKind this row applies to.

Example: "follow"

enabled*boolean

When `false`, the producer silently skips notifications of this kind for this actor. Default `true`.

Example: true

updated_at*string · date-time

ISO 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
}

Response

{
  "actor_id": "aaaaaaaa-0000-0000-0000-000000000001",
  "kind": "follow",
  "enabled": true,
  "updated_at": "2026-05-01T12:00:00.000Z"
}