Get a topic subscription

Get a subscription by its unique identifier for a topic.

GET
/v2/topics/{topicKey}/subscriptions/{identifier}

Authorization

Authorization<token>

API key authentication. Allowed headers-- "Authorization: ApiKey <novu_secret_key>".

In: header

Path Parameters

topicKeyRequiredstring

The key identifier of the topic

identifierRequiredstring

The unique identifier of the subscription

Header Parameters

idempotency-keystring

A header for idempotency purposes

Response Body

OK

idRequiredstring

The unique identifier of the subscription

identifierstring

The identifier of the subscription

namestring

The name of the subscription

preferencesarray<object>

The preferences/rules for the subscription

contextKeysarray<string>

Context keys that scope this subscription (e.g., tenant:org-a, project:proj-123)

export interface Response {
  /**
   * The unique identifier of the subscription
   */
  id: string;
  /**
   * The identifier of the subscription
   */
  identifier?: string;
  /**
   * The name of the subscription
   */
  name?: string;
  /**
   * The preferences/rules for the subscription
   */
  preferences?: SubscriptionPreferenceDto[];
  /**
   * Context keys that scope this subscription (e.g., tenant:org-a, project:proj-123)
   */
  contextKeys?: string[];
}
export interface SubscriptionPreferenceDto {
  /**
   * The unique identifier of the subscription
   */
  subscriptionId: string;
  /**
   * Workflow information if this is a template-level preference
   */
  workflow?: WorkflowDto;
  /**
   * Whether the preference is enabled
   */
  enabled: boolean;
  /**
   * Optional condition using JSON Logic rules
   */
  condition?: {
    [k: string]: unknown;
  };
}
export interface WorkflowDto {
  /**
   * Unique identifier of the workflow
   */
  id: string;
  /**
   * Workflow identifier used for triggering
   */
  identifier: string;
  /**
   * Human-readable name of the workflow
   */
  name: string;
  /**
   * Whether this workflow is marked as critical
   */
  critical: boolean;
  /**
   * Tags associated with the workflow
   */
  tags?: string[];
  /**
   * Custom data associated with the workflow
   */
  data?: {};
  /**
   * Severity of the workflow
   */
  severity: "high" | "medium" | "low" | "none";
}
 
curl -X GET "https://api.novu.co/v2/topics/string/subscriptions/string" \
  -H "idempotency-key: string" \
  -H "Authorization: <token>"
{
  "id": "64f5e95d3d7946d80d0cb679",
  "identifier": "subscription-identifier",
  "name": "My Subscription",
  "preferences": [
    {
      "subscriptionId": "64f5e95d3d7946d80d0cb679",
      "workflow": {
        "id": "64a1b2c3d4e5f6g7h8i9j0k1",
        "identifier": "welcome-email",
        "name": "Welcome Email Workflow",
        "critical": false,
        "tags": [
          "user-onboarding",
          "email"
        ],
        "data": {
          "category": "onboarding",
          "priority": "high"
        },
        "severity": "high"
      },
      "enabled": true,
      "condition": {
        "and": [
          {
            "===": [
              {
                "var": "tier"
              },
              "premium"
            ]
          }
        ]
      }
    }
  ],
  "contextKeys": [
    "tenant:org-a",
    "project:proj-123"
  ]
}

On this page

No Headings
Edit this page on GitHub