# Topic schema Model API Reference (Topics) (/api-reference/topics/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.

<TypeTable
  name="Topic"
  type={{
"id": {
  "description": "The identifier of the topic",
  "type": "string"
},
"key": {
  "description": "The unique key of the topic",
  "type": "string"
},
"name": {
  "description": "The name of the topic",
  "type": "string"
},
"createdAt": {
  "description": "The date the topic was created",
  "type": "string"
},
"updatedAt": {
  "description": "The date the topic was last updated",
  "type": "string"
}
}}
/>

### 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.

<TypeTable
  name="TopicSubscription"
  type={{
"id": {
  "description": "The identifier of the subscription",
  "type": "string"
},
"identifier": {
  "description": "The identifier of the subscription",
  "type": "string"
},
"createdAt": {
  "description": "The date and time the subscription was created",
  "type": "string"
},
"topic": {
  "description": "Topic information",
  "type": "TopicResponseDto"
},
"subscriber": {
  "description": "Subscriber information",
  "type": "SubscriberDto"
},
"contextKeys": {
  "description": "Context keys that scope this subscription (e.g., tenant:org-a, project:proj-123)",
  "type": "string[]"
}
}}
/>

### Subscriber

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

<TypeTable
  name="Subscriber"
  type={{
"id": {
  "description": "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.",
  "type": "string"
},
"firstName": {
  "description": "The first name of the subscriber.",
  "type": "string | null"
},
"lastName": {
  "description": "The last name of the subscriber.",
  "type": "string | null"
},
"email": {
  "description": "The email address of the subscriber.",
  "type": "string | null"
},
"phone": {
  "description": "The phone number of the subscriber.",
  "type": "string | null"
},
"avatar": {
  "description": "The URL of the subscriber's avatar image.",
  "type": "string | null"
},
"locale": {
  "description": "The locale setting of the subscriber, indicating their preferred language or region.",
  "type": "string | null"
},
"channels": {
  "description": "An array of channel settings associated with the subscriber.",
  "type": "ChannelSettingsDto[]"
},
"topics": {
  "description": "An array of topics that the subscriber is subscribed to.",
  "type": "string[]"
},
"isOnline": {
  "description": "Indicates whether the subscriber is currently online.",
  "type": "boolean | null"
},
"lastOnlineAt": {
  "description": "The timestamp indicating when the subscriber was last online, in ISO 8601 format.",
  "type": "string | null"
},
"v": {
  "description": "The version of the subscriber document.",
  "type": "number"
},
"data": {
  "description": "Additional custom data for the subscriber",
  "type": "{ [k: string]: any; } | null"
},
"timezone": {
  "description": "Timezone of the subscriber",
  "type": "string | null"
},
"subscriberId": {
  "description": "The identifier used to create this subscriber, which typically corresponds to the user ID in your system.",
  "type": "string"
},
"organizationId": {
  "description": "The unique identifier of the organization to which the subscriber belongs.",
  "type": "string"
},
"environmentId": {
  "description": "The unique identifier of the environment associated with this subscriber.",
  "type": "string"
},
"deleted": {
  "description": "Indicates whether the subscriber has been deleted.",
  "type": "boolean"
},
"createdAt": {
  "description": "The timestamp indicating when the subscriber was created, in ISO 8601 format.",
  "type": "string"
},
"updatedAt": {
  "description": "The timestamp indicating when the subscriber was last updated, in ISO 8601 format.",
  "type": "string"
}
}}
/>
