API Tokens de Notification
Endpoints pour la gestion des tokens de notification push des clients.
SDK: client.notificationToken
Endpoints
Enregistrer un token
Enregistre ou met à jour un token de notification pour un client.
POST /app/{appId}/customer/{customerId}/notification-token/setRequête
| Champ | Type | Requis | Description |
|---|---|---|---|
apiKey | string | Oui | Clé API |
token | string | Oui | Token de notification (FCM, APNs, etc.) |
platform | string | Oui | Plateforme: IOS, ANDROID, WEB |
deviceId | string | Non | Identifiant unique de l’appareil |
deviceName | string | Non | Nom de l’appareil (ex: “iPhone de Jean”) |
curl -X POST https://api.applite.ai/app/{appId}/customer/{customerId}/notification-token/set \
-H "Content-Type: application/json" \
-d '{
"apiKey": "your_api_key",
"token": "fcm_token_abc123...",
"platform": "ANDROID",
"deviceId": "device_unique_id",
"deviceName": "Samsung Galaxy S21"
}'Si le token existe déjà pour ce client, il sera mis à jour avec les nouvelles informations d’appareil.
Supprimer un token
Supprime un token de notification spécifique (déconnexion d’un appareil).
POST /app/{appId}/customer/{customerId}/notification-token/removeRequête
| Champ | Type | Requis | Description |
|---|---|---|---|
apiKey | string | Oui | Clé API |
token | string | Oui | Token à supprimer |
curl -X POST https://api.applite.ai/app/{appId}/customer/{customerId}/notification-token/remove \
-H "Content-Type: application/json" \
-d '{
"apiKey": "your_api_key",
"token": "fcm_token_abc123..."
}'Supprimer tous les tokens
Supprime tous les tokens d’un client (déconnexion de tous les appareils).
POST /app/{appId}/customer/{customerId}/notification-token/remove-allRequête
| Champ | Type | Requis | Description |
|---|---|---|---|
apiKey | string | Oui | Clé API |
curl -X POST https://api.applite.ai/app/{appId}/customer/{customerId}/notification-token/remove-all \
-H "Content-Type: application/json" \
-d '{
"apiKey": "your_api_key"
}'Utilisez cette méthode avec précaution. Elle déconnecte le client de tous ses appareils.
Lister les tokens
Liste tous les tokens de notification d’un client.
POST /app/{appId}/customer/{customerId}/notification-token/listRequête
| Champ | Type | Requis | Description |
|---|---|---|---|
apiKey | string | Oui | Clé API |
curl -X POST https://api.applite.ai/app/{appId}/customer/{customerId}/notification-token/list \
-H "Content-Type: application/json" \
-d '{
"apiKey": "your_api_key"
}'Plateformes supportées
| Plateforme | Description |
|---|---|
IOS | Apple Push Notification service (APNs) |
ANDROID | Firebase Cloud Messaging (FCM) |
WEB | Web Push Notifications |
Last updated on