Request subscription confirmation
Sends a confirmation email from your sender. Only the recipient's explicit confirmation creates their contact and subscribes them to the named topic.
POST
Sends a confirmation email from your sender. Only the recipient's explicit confirmation creates their contact and subscribes them to the named topic. The link expires after seven days and can be used once. A custom published email template receives confirmUrl. Sending follows ordinary sender, admission, billing, and brand-footer settings. Requires email send authority in addition to the declared contact grants, including the topic subscription change.
apiKeyheader
x-api-key<token>application/json- body
email*stringMatch
^(?=[^@]{1,64}@)[A-Za-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[A-Za-z0-9!#$%&'*+/=?^_`{|}~-]+)*@[^\s@/\\:#?%[\]\p{Cc}]+[.\u3002\uff0e\uff61][^\s@/\\:#?%[\]\p{Cc}]+$topicId*TopicIdMatch
^tpc_[0-9a-hjkmnp-tv-z]{16,24}$from*Your verified email sender. The ordinary send pipeline selects its domain and customer brand.
templateSlug?|nullconsentIp?|nullconsentSource?|nullSubscribeResult
application/json- response
success*booleanexpiresAt*stringimport { createClient } from "samva";
const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });
const result = await samva.subscriptions.subscribe({
"email": "example",
"topicId": "example",
"from": {
"email": "example"
}
});Example Response
{
"success": true,
"expiresAt": "string"
}