Marketing Consent
Marketing email consent management
Returns the authenticated user's effective newsletter subscription state from Sendy. Sendy is the source of truth.
consent is true only when status is subscribed. Pending confirmation, delivery failures, complaints, and missing subscribers all return consent: false with the corresponding status.
Current Sendy consent status
successPossible values: Authentication required
Sendy integration failure
GET /marketing-consent HTTP/1.1
Host: network.ruuvi.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"result": "success",
"data": {
"consent": true,
"status": "subscribed"
}
}Subscribes or unsubscribes the authenticated user's email address in Sendy, then returns the effective status held by Sendy.
When subscribing to a double opt-in list, the normal result may be unconfirmed. Set silent to true only when the client is allowed to bypass the confirmation email and complete the subscription immediately.
Set to true to subscribe or false to unsubscribe.
When true, bypass Sendy double opt-in confirmation for subscriptions. Ignored when consent is false.
falseLowercase client identifier stored in Sendy's joiningSource custom field. Ignored when consent is false.
^[a-z][a-z0-9_-]*$Two-letter Ruuvi application language code, matching the uppercase WPML language-code format used by the Ruuvi website (for example, EN, FI, or DE). Input is case-insensitive; Ruuvi Cloud converts it to uppercase before storing it in Sendy's Language custom field. Ignored when consent is false.
ENPattern: ^[A-Za-z]{2}$Consent updated in Sendy
successPossible values: Invalid request
Authentication required
Sendy integration failure
POST /marketing-consent HTTP/1.1
Host: network.ruuvi.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 69
{
"consent": true,
"silent": false,
"joiningSource": "app",
"language": "EN"
}{
"result": "success",
"data": {
"consent": true,
"status": "subscribed"
}
}Last updated