Skip to content

← newsletter

GET/api/v1/newsletter/resubscribe

Resubscribe

Re-subscribe the user behind this send-token (symmetric to /unsubscribe). Used by the "Vous avez changé d'avis ?" link on the unsubscribe confirmation page (same token), AND can be hand-shared with users who unsubscribed by accident. Idempotent : flipping back on an already-opted-in user is a no-op. The resubscribe page does NOT offer re-unsubscribe (each weekly brief already carries its own unsubscribe link).

Authentication

Public endpoint: no key required. Anonymous quotas still apply (see Rate limits).

Query parameters

NameTypeRequiredDescription
tokenstring-

Responses

StatusDescriptionSchema
200Successful Responsestring
422Validation ErrorHTTPValidationError

See the standard error codes documented in the Error codes.

Code samples

Three ready-to-paste implementations. Replace $TRINITY_API_KEY with your API key (generated from the dashboard under Profile → API keys).

cURL

curl -X GET \
  'https://api.trinityinsights.io/api/v1/newsletter/resubscribe?token=value'

Python

import os
import requests

BASE = "https://api.trinityinsights.io"
headers = {
}
params = {
    "token": "value",  # required
}

response = requests.get(f"{BASE}/api/v1/newsletter/resubscribe", headers=headers, params=params, timeout=10)
response.raise_for_status()
data = response.json()

JavaScript

const apiKey = process.env.TRINITY_API_KEY;

const response = await fetch(
  "https://api.trinityinsights.io/api/v1/newsletter/resubscribe?token=value",
  {
    method: "GET",
    headers: {
    },
  },
);

if (!response.ok) {
  throw new Error(`HTTP ${response.status}`);
}
const data = await response.json();

Institutional disclaimer

Trinity Insights is an educational and analytical tool. Values returned by this endpoint do not constitute investment advice. Trinity Insights is not a Crypto-Asset Service Provider (CASP) registered under MiCA Regulation (EU) 2023/1114. See the full disclaimer.