Skip to Content

List topic subscriptions

Returns explicit per-channel subscriptions, newest first, optionally filtered by channel and status.

GET
/v1/topics/{id}/subscriptions

Returns explicit per-channel subscriptions, newest first, optionally filtered by channel and status. Pass nextCursor as cursor to continue; nextCursor is null on the last page. Contacts without an explicit subscription are absent from this list.

Authorization

apiKey
headerx-api-key<token>

Path Parameters

id*string
Match^tpc_[0-9a-hjkmnp-tv-z]{16,24}$

Query Parameters

limit?|null
cursor?string
channel?string
Value in"sms""whatsapp""email"
status?string
Value in"subscribed""unsubscribed"

Response Body

TopicSubscriptionPage

application/json
  1. response
items*array<>
nextCursor*string|null
Example Request
import { createClient } from "samva";

const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });

const result = await samva.topics.listSubscriptions({
  "id": "example"
});
Example Response
{
  "items": [
    {
      "contactId": "string",
      "channel": "sms",
      "status": "subscribed",
      "source": "string",
      "subscribedAt": "string",
      "unsubscribedAt": "string",
      "createdAt": "string",
      "updatedAt": "string"
    }
  ],
  "nextCursor": "string"
}

Related documentation