Novu · Arazzo Workflow

Novu Unsubscribe Subscribers From a Topic

Version 1.0.0

Remove a set of subscribers from a topic, then list the remaining subscriptions to confirm.

1 workflow 1 source API 1 provider
View Spec View on GitHub NotificationsMessagingIn AppEmailSMSPushChatWorkflowsOpen SourceSubscribersTopicsInboxWorkflow OrchestrationMulti ChannelDigestMCPFrameworkReactArazzoWorkflows

Provider

novu

Workflows

unsubscribe-from-topic
Delete subscribers from a topic, then verify the remaining subscriptions.
Removes the supplied subscriber ids from the topic and lists the remaining topic subscriptions to confirm the change.
2 steps inputs: subscriberIds, topicKey outputs: remaining, topicKey
1
unsubscribe
TopicsController_deleteTopicSubscriptions
Delete the supplied subscribers' subscriptions from the topic. Novu returns 200 with the result of the delete operation.
2
verifyRemaining
TopicsController_listTopicSubscriptions
List the topic's remaining subscriptions to confirm the unsubscribed subscribers are no longer members.

Source API Descriptions

Arazzo Workflow Specification

novu-unsubscribe-from-topic-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Novu Unsubscribe Subscribers From a Topic
  summary: Remove a set of subscribers from a topic, then list the remaining subscriptions to confirm.
  description: >-
    The inverse of the topic subscribe flow, used when subscribers opt out of an
    audience. The workflow deletes the supplied subscribers' subscriptions from
    a topic and then lists the topic's remaining subscriptions to confirm the
    removals took effect. Every step spells out its request inline so the flow
    can be read and executed without opening the underlying OpenAPI
    description.
  version: 1.0.0
sourceDescriptions:
- name: novuApi
  url: ../openapi/novu-openapi.yml
  type: openapi
workflows:
- workflowId: unsubscribe-from-topic
  summary: Delete subscribers from a topic, then verify the remaining subscriptions.
  description: >-
    Removes the supplied subscriber ids from the topic and lists the remaining
    topic subscriptions to confirm the change.
  inputs:
    type: object
    required:
    - topicKey
    - subscriberIds
    properties:
      topicKey:
        type: string
        description: The key identifier of the topic to unsubscribe from.
      subscriberIds:
        type: array
        description: List of subscriber ids to unsubscribe from the topic.
        items:
          type: string
  steps:
  - stepId: unsubscribe
    description: >-
      Delete the supplied subscribers' subscriptions from the topic. Novu
      returns 200 with the result of the delete operation.
    operationId: TopicsController_deleteTopicSubscriptions
    parameters:
    - name: topicKey
      in: path
      value: $inputs.topicKey
    requestBody:
      contentType: application/json
      payload:
        subscriptions: $inputs.subscriberIds
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      result: $response.body#/data
  - stepId: verifyRemaining
    description: >-
      List the topic's remaining subscriptions to confirm the unsubscribed
      subscribers are no longer members.
    operationId: TopicsController_listTopicSubscriptions
    parameters:
    - name: topicKey
      in: path
      value: $inputs.topicKey
    - name: limit
      in: query
      value: 100
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      remaining: $response.body#/data
  outputs:
    topicKey: $inputs.topicKey
    remaining: $steps.verifyRemaining.outputs.remaining