Subscription
User subscription management
Returns an array of JSON objects detailing the subscriptions the user has had. The active subscription (if any) will have isActive: true.
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Responses
200
Subscription history retrieved successfully
application/json
resultstring · enumRequiredExample:
successPossible values: 400
BAD REQUEST - Malformed request
application/json
401
UNAUTHORIZED - Auth token missing or invalid
application/json
get/subscription
GET /subscription HTTP/1.1
Host: network.ruuvi.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"result": "success",
"data": {
"subscriptions": [
{
"subscriptionName": "DEV",
"maxClaims": 25,
"maxShares": 40,
"maxSharesPerSensor": 5,
"maxHistoryDays": 720,
"maxResolutionMinutes": 1,
"emailAlertAllowed": true,
"pushAlertAllowed": true,
"telegramAlertAllowed": true,
"delayedAlertAllowed": true,
"pdfExportAllowed": true,
"offlineAlertAllowed": true,
"isActive": true,
"startTime": 1721815542,
"endTime": 1753351542,
"endAt": "2026-07-24T10:35:42.000Z",
"lastUpdated": 1732187742
},
{
"subscriptionName": "DEV",
"maxClaims": 25,
"maxShares": 40,
"maxSharesPerSensor": 5,
"maxHistoryDays": 720,
"maxResolutionMinutes": 1,
"emailAlertAllowed": true,
"pushAlertAllowed": true,
"telegramAlertAllowed": false,
"delayedAlertAllowed": false,
"pdfExportAllowed": false,
"offlineAlertAllowed": false,
"isActive": false,
"startTime": 1673435292,
"endTime": 1673608092,
"endAt": "2025-01-15T12:00:00.000Z",
"lastUpdated": 1673608092
}
]
}
}Applies a new subscription to the authenticated user immediately. Parameters are passed as JSON in the request body. The success response contains full subscription history, with the active subscription first in the subscriptions array.
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
codestringRequiredExample:
Subscription claim code
BCDF-FGHJResponses
200
Subscription was applied successfully
application/json
resultstring · enumRequiredExample:
successPossible values: 400
BAD REQUEST - Missing or malformed fields
application/json
401
UNAUTHORIZED - Auth token missing or invalid
application/json
post/subscription
POST /subscription HTTP/1.1
Host: network.ruuvi.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 20
{
"code": "BCDF-FGHJ"
}{
"result": "success",
"data": {
"subscriptions": [
{
"subscriptionName": "DEV",
"maxClaims": 25,
"maxShares": 40,
"maxSharesPerSensor": 5,
"maxHistoryDays": 720,
"maxResolutionMinutes": 1,
"emailAlertAllowed": true,
"pushAlertAllowed": true,
"telegramAlertAllowed": true,
"delayedAlertAllowed": true,
"pdfExportAllowed": true,
"offlineAlertAllowed": true,
"isActive": true,
"startTime": 1721815542,
"endTime": 1753351542,
"endAt": "2026-07-24T10:35:42.000Z",
"lastUpdated": 1732187742
},
{
"subscriptionName": "DEV",
"maxClaims": 25,
"maxShares": 40,
"maxSharesPerSensor": 5,
"maxHistoryDays": 720,
"maxResolutionMinutes": 1,
"emailAlertAllowed": true,
"pushAlertAllowed": true,
"telegramAlertAllowed": false,
"delayedAlertAllowed": false,
"pdfExportAllowed": false,
"offlineAlertAllowed": false,
"isActive": false,
"startTime": 1673435292,
"endTime": 1673608092,
"endAt": "2025-01-15T12:00:00.000Z",
"lastUpdated": 1673608092
}
]
}
}Last updated