List topic subscriptions
Returns explicit per-channel subscriptions, newest first, optionally filtered by channel and status.
GET
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.
apiKeyheader
x-api-key<token>id*stringMatch
^tpc_[0-9a-hjkmnp-tv-z]{16,24}$limit?|nullcursor?stringchannel?stringValue in
"sms""whatsapp""email"status?stringValue in
"subscribed""unsubscribed"TopicSubscriptionPage
application/json- response
items*array<>nextCursor*string|nullimport { 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"
}