/
githubmirror
/
novu
Обзор
Документация
Войти
/
githubmirror
/
novu
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
next
docs/api-reference/topics/create-topic-subscriptions.mdx
14 строк
1 KB
Dima Grossman
feat(worker): Support subscriber, actor, and context in topic conditions fixes NV-8309 (#11959)
19 июл 2026, 11:41
Не верифицирован
19 июл 2026, 11:41
bfedfd2
Код
Авторство
О чём код?
--- title: "Create topic subscriptions" openapi: "POST /v2/topics/{topicKey}/subscriptions" --- Subscribe one or more subscribers to a topic. Pass `subscriptions` as subscriber IDs, or as objects with `identifier` and `subscriberId` when you need a custom subscription key. Preferences can include [JSON Logic conditions](/platform/subscription/manage-topic-subscriptions#json-logic-conditions) evaluated at trigger time against the trigger **payload**, **subscriber** profile, **actor**, and **context**. Use paths such as `{ "var": "payload.fieldName" }`, `{ "var": "subscriber.data.tier" }`, `{ "var": "actor.data.role" }`, or `{ "var": "context.tenant.id" }`. Pass an optional `context` object to scope subscriptions to a [Context](/platform/concepts/contexts). The Context on the subscription must exactly match the Context on the workflow trigger. See [Context-scoped subscriptions](/platform/subscription/manage-topic-subscriptions#context-scoped-subscriptions). <Note> When you provide a custom `identifier` for a subscription, it must be **512 characters or fewer**. Requests with longer identifiers are rejected. </Note>