Skip to Content

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
/v1/subscriptions

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.

Authorization

apiKey
headerx-api-key<token>

Request Body

application/json
  1. body
email*string
Match^(?=[^@]{1,64}@)[A-Za-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[A-Za-z0-9!#$%&'*+/=?^_`{|}~-]+)*@[^\s@/\\:#?%[\]\p{Cc}]+[.\u3002\uff0e\uff61][^\s@/\\:#?%[\]\p{Cc}]+$
topicId*TopicId
Match^tpc_[0-9a-hjkmnp-tv-z]{16,24}$
from*

Your verified email sender. The ordinary send pipeline selects its domain and customer brand.

templateSlug?|null
consentIp?|null
consentSource?|null

Response Body

SubscribeResult

application/json
  1. response
success*boolean
expiresAt*string
Example Request
import { 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"
}

Related documentation