> ## Documentation Index
> Fetch the complete documentation index at: https://novu-c5de82d9-docs-homepage-redesign.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Topic schema

> Reference the Novu topic schema used in API requests and responses. Review fields, data types, and object structure for this resource.

### Topic

Topic is a collection of subscribers that share a common interest. Subscriber can subscribe to multiple topics. When a subscriber is subscribed to a topic, they will receive notifications generated by workflows triggered to that topic.

<ResponseField name="id" type="string">
  The identifier of the topic
</ResponseField>

<ResponseField name="key" type="string">
  The unique key of the topic
</ResponseField>

<ResponseField name="name" type="string">
  The name of the topic
</ResponseField>

<ResponseField name="createdAt" type="string">
  The date the topic was created
</ResponseField>

<ResponseField name="updatedAt" type="string">
  The date the topic was last updated
</ResponseField>

### TopicSubscription

TopicSubscription is a relationship between a subscriber and a topic. It is used to track which subscribers are subscribed to which topics and when they subscribed. `createdAt` is the date and time the subscription was created.

<ResponseField name="id" type="string">
  The internal ID generated by Novu for the subscription. Use this when referencing the subscription by its database ID.
</ResponseField>

<ResponseField name="identifier" type="string">
  The user-supplied key provided when creating the subscription. Use this to look up or manage a specific subscription within a topic.
</ResponseField>

<ResponseField name="createdAt" type="string">
  The date and time the subscription was created
</ResponseField>

<ResponseField name="topic" type="TopicResponseDto">
  Topic information
</ResponseField>

<ResponseField name="subscriber" type="SubscriberDto">
  Subscriber information
</ResponseField>

<ResponseField name="contextKeys" type="string[]">
  Context keys that scope this subscription (e.g., tenant:org-a, project:proj-123)
</ResponseField>

### Subscriber

Subscriber is a user who can receive notifications. Read more about subscribers on [subscribers concept page](/platform/concepts/subscribers).

<ResponseField name="id" type="string">
  The internal ID generated by Novu for your subscriber. This ID does not match the `subscriberId` used in your queries. Refer to `subscriberId` for that identifier.
</ResponseField>

<ResponseField name="firstName" type="string">
  The first name of the subscriber.
</ResponseField>

<ResponseField name="lastName" type="string">
  The last name of the subscriber.
</ResponseField>

<ResponseField name="email" type="string">
  The email address of the subscriber.
</ResponseField>

<ResponseField name="phone" type="string">
  The phone number of the subscriber.
</ResponseField>

<ResponseField name="avatar" type="string">
  The URL of the subscriber's avatar image.
</ResponseField>

<ResponseField name="locale" type="string">
  The locale setting of the subscriber, indicating their preferred language or region.
</ResponseField>

<ResponseField name="channels" type="ChannelSettingsDto[]">
  An array of channel settings associated with the subscriber.
</ResponseField>

<ResponseField name="topics" type="string[]">
  An array of topics that the subscriber is subscribed to.
</ResponseField>

<ResponseField name="isOnline" type="boolean">
  Indicates whether the subscriber is currently online.
</ResponseField>

<ResponseField name="lastOnlineAt" type="string">
  The timestamp indicating when the subscriber was last online, in ISO 8601 format.
</ResponseField>

<ResponseField name="v" type="number">
  The version of the subscriber document.
</ResponseField>

<ResponseField name="data" type="{ [k: string]: any; }">
  Additional custom data for the subscriber
</ResponseField>

<ResponseField name="timezone" type="string">
  Timezone of the subscriber
</ResponseField>

<ResponseField name="subscriberId" type="string">
  The identifier used to create this subscriber, which typically corresponds to the user ID in your system.
</ResponseField>

<ResponseField name="organizationId" type="string">
  The unique identifier of the organization to which the subscriber belongs.
</ResponseField>

<ResponseField name="environmentId" type="string">
  The unique identifier of the environment associated with this subscriber.
</ResponseField>

<ResponseField name="deleted" type="boolean">
  Indicates whether the subscriber has been deleted.
</ResponseField>

<ResponseField name="createdAt" type="string">
  The timestamp indicating when the subscriber was created, in ISO 8601 format.
</ResponseField>

<ResponseField name="updatedAt" type="string">
  The timestamp indicating when the subscriber was last updated, in ISO 8601 format.
</ResponseField>
