---
title: "Delete topic subscriptions"
method: DELETE
path: "/v2/topics/{topicKey}/subscriptions"
tags: ["Topics"]
---

# Delete topic subscriptions

`DELETE /v2/topics/{topicKey}/subscriptions`

## Request

- Base URL: `https://api.notifly.io`
- URL: `https://api.notifly.io/v2/topics/{topicKey}/subscriptions`
- Auth: API key in header `Authorization`

Delete subscriptions for subscriberIds for a topic.

## Path parameters

- `topicKey` string, required

## Request body

- DeleteTopicSubscriptionsRequestDto
  - `subscriberIds` string[]: List of subscriber identifiers to unsubscribe from the topic (max: 100). @deprecated Use the "subscriptions" property instead.
  - `subscriptions` union[]: List of subscriptions to unsubscribe from the topic (max: 100). Can be either a string array of subscriber IDs or an array of objects with identifier and/or subscriberId. If only subscriberId is provided, all subscriptions for that subscriber within the topic will be deleted.
    - union
      - string
      - DeleteTopicSubscriberIdentifierDto
        - `identifier` string: Unique identifier for this subscription. If provided, deletes only this specific subscription.
        - `subscriberId` string: The subscriber ID. If provided without identifier, deletes all subscriptions for this subscriber within the topic.

## Response `200`

Subscriptions deleted successfully

- DeleteTopicSubscriptionsResponseDto
  - `data` SubscriptionDto[], required: The list of successfully deleted subscriptions
    - `_id` string, required: The unique identifier of the subscription
    - `identifier` string: The identifier of the subscription
    - `topic` TopicDto, required
      - `_id` string, required: The internal unique identifier of the topic
      - `key` string, required: The key identifier of the topic used in your application. Should be unique on the environment level.
      - `name` string: The name of the topic
      - `data` object: Additional custom data associated with the topic
    - `subscriber` SubscriberDto, required
      - `_id` string, required: The identifier of the subscriber
      - `subscriberId` string, required: The external identifier of the subscriber
      - `avatar` string, nullable: The avatar URL of the subscriber
      - `firstName` string, nullable: The first name of the subscriber
      - `lastName` string, nullable: The last name of the subscriber
      - `email` string, nullable: The email of the subscriber
    - `contextKeys` string[]: Context keys that scope this subscription (e.g., tenant:org-a, project:proj-123)
    - `createdAt` string, required: The creation date of the subscription
    - `updatedAt` string, required: The last update date of the subscription
  - `meta` MetaDto, required
    - `totalCount` number, required: The total count of subscriber IDs provided
    - `successful` number, required: The count of successfully created subscriptions
    - `failed` number, required: The count of failed subscription attempts
  - `errors` SubscriptionsDeleteErrorDto[]: The list of errors for failed deletion attempts
    - `subscriberId` string, required: The subscriber ID that failed
    - `code` string, required: The error code
    - `message` string, required: The error message

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `405`: Method Not Allowed
- `409`: Conflict
- `413`: Payload Too Large
- `414`: URI Too Long
- `415`: Unsupported Media Type
- `422`: Unprocessable Entity
- `429`: The client has sent too many requests in a given amount of time.
- `500`: Internal Server Error
- `503`: The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.

---

[API](https://skmtc.dev/notifly/apis/notifly-api.md) · [All operations](https://skmtc.dev/notifly/apis/notifly-api/llms.txt) · [OpenAPI document](https://skmtc.dev/notifly/apis/notifly-api/revisions/af909b9e1e57?raw)
