curl -X POST https://api.notvis.com/v1/push/register \
-H "Content-Type: application/json" \
-d '{
"account_id": "your-account-id",
"app_id": "your-app-id",
"platform": "fcm",
"token": "dGhpcyBpcyBhIHB1c2ggdG9rZW4...",
"device_id": "device-uuid-123",
"os_version": "Android 14",
"app_version": "2.1.0",
"locale": "en-US",
"timezone": "Asia/Kolkata"
}'
await fetch('https://api.notvis.com/v1/push/register', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
account_id: 'your-account-id',
app_id: 'your-app-id',
platform: 'fcm',
token: fcmToken,
device_id: deviceId,
}),
});
{
"registration_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"contact_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
{
"code": 400,
"message": "validation failed",
"details": {
"platform": "platform must be one of: apns, fcm, web"
}
}
Push Notifications
Register Device
Register a device for push notifications. No API key required.
POST
/
v1
/
push
/
register
curl -X POST https://api.notvis.com/v1/push/register \
-H "Content-Type: application/json" \
-d '{
"account_id": "your-account-id",
"app_id": "your-app-id",
"platform": "fcm",
"token": "dGhpcyBpcyBhIHB1c2ggdG9rZW4...",
"device_id": "device-uuid-123",
"os_version": "Android 14",
"app_version": "2.1.0",
"locale": "en-US",
"timezone": "Asia/Kolkata"
}'
await fetch('https://api.notvis.com/v1/push/register', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
account_id: 'your-account-id',
app_id: 'your-app-id',
platform: 'fcm',
token: fcmToken,
device_id: deviceId,
}),
});
{
"registration_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"contact_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
{
"code": 400,
"message": "validation failed",
"details": {
"platform": "platform must be one of: apns, fcm, web"
}
}
This endpoint is designed for client-side SDKs and does not require an API key. Authentication is handled via
account_id and app_id validation.Request Body
string
required
Your Notvis account ID.
string
required
Your push notification app ID (configured in the dashboard).
string
required
Push notification platform. Must be one of:
apns (iOS), fcm (Android/Web via Firebase), or web (Web Push).string
required
Device push token obtained from the platform SDK (APNs device token, FCM registration token, or Web Push subscription).
string
Unique device identifier. Used for device deduplication and anonymous-to-identified user linking.
string
Operating system version (e.g.,
"iOS 17.4", "Android 14").string
Your application version (e.g.,
"2.1.0").string
Device locale (e.g.,
"en-US", "hi-IN").string
Device timezone (e.g.,
"Asia/Kolkata", "America/New_York").Response
string
Unique registration identifier for this device.
string
Contact ID associated with this device.
curl -X POST https://api.notvis.com/v1/push/register \
-H "Content-Type: application/json" \
-d '{
"account_id": "your-account-id",
"app_id": "your-app-id",
"platform": "fcm",
"token": "dGhpcyBpcyBhIHB1c2ggdG9rZW4...",
"device_id": "device-uuid-123",
"os_version": "Android 14",
"app_version": "2.1.0",
"locale": "en-US",
"timezone": "Asia/Kolkata"
}'
await fetch('https://api.notvis.com/v1/push/register', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
account_id: 'your-account-id',
app_id: 'your-app-id',
platform: 'fcm',
token: fcmToken,
device_id: deviceId,
}),
});
{
"registration_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"contact_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
{
"code": 400,
"message": "validation failed",
"details": {
"platform": "platform must be one of: apns, fcm, web"
}
}