Check topic subscriptions
Name exactly one contactId, email, or phone and a channel.
GET
Name exactly one contactId, email, or phone and a channel. Returns effective status, using the topic default when no explicit subscription exists. topicIds is an optional comma-separated list. Addresses resolve within the requested namespace; an unknown address returns contactId null and the effective defaults.
apiKeyheader
x-api-key<token>contactId?stringMatch
^contact_[0-9a-hjkmnp-tv-z]{16,24}$email?stringphone?stringnamespaceId?stringMatch
^ns_[0-9a-hjkmnp-tv-z]{16,24}$channel*stringValue in
"sms""whatsapp""email"topicIds?stringTopicSubscriptionCheck
application/json- response
contactId*|nullchannel*stringValue in
"sms""whatsapp""email"topics*array<>import { createClient } from "samva";
const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });
const result = await samva.topics.checkSubscription({
"channel": "sms"
});Example Response
{
"contactId": "string",
"channel": "sms",
"topics": [
{
"topicId": "string",
"topicName": "string",
"status": "subscribed"
}
]
}