aYOUne
← Marketing API

WebPushSubscribers

Singular: WebPushSubscriber — Base-URL: https://marketing-api.ayoune.app — Zugriff: CRUD

play_circle Jetzt ausprobieren beta

Requests werden über den consumer-app Proxy an *.ayoune.app weitergeleitet. Tokens bleiben im Browser und werden pro Call mitgesendet.

Beispiel-Response (aufgezeichnet) Beispiel

Eine echte, zuvor aufgezeichnete GET /:id-Antwort dieses Endpunkts — nicht der Live-Call oben. Sensible Felder sind maskiert.

{
  "payload": {
    "webPush": {
      "keys": {
        "p256dh": "BAGX7FKPwNFIZwUrFU13iUZf58mMUZgEZA_JfZ_wEfvxmug0xTQiCQAOebtp4A6N6cSdOjkf6s9qICScJJXpim4",
        "auth": "1deGf5MID9Ss3hlF4dddHA"
      },
      "endpoint": "https://fcm.googleapis.com/fcm/send/fMijufutfMM:APA91bHXRQv-UjSWzeM7hMX5zk19l0rDzDzr9cyZeOBWpkU3H33EZ19dja6uTmry94nTzvidmAGv5pxTtOuh2AJqJQLEdy4SgMVoXNIr0ocq11g3WYAMQTUPAIDWLiqDyhY9awCmp_Eu",
      "expirationTime": null
    },
    "_id": "607d7558806af8001a6abcb6",
    "identifier": "5ee06fc3860473001cfb290e_Unknown_Windows_windows-10_Chrome_true_false_false_https://fcm.googleapis.com/fcm/send/fMijufutfMM:APA91bHXRQv-UjSWzeM7hMX5zk19l0rDzDzr9cyZeOBWpkU3H33EZ19dja6uTmry94nTzvidmAGv5pxTtOuh2AJqJQLEdy4SgMVoXNIr0ocq11g3WYAMQTUPAIDWLiqDyhY9awCmp_Eu",
    "user": "5ee06fc3860473001cfb290e",
    "browser": "Chrome",
    "browser_version": "92.0.4515.159",
    "createdAt": "2021-04-19T12:19:36.364Z",
    "device": "Unknown",
    "isDesktop": true,
    "isMobile": false,
    "isTablet": false,
    "last_active": "2021-08-29T10:32:20.313Z",
    "os": "Windows",
    "os_version": "windows-10",
    "updatedAt": "2021-08-29T10:32:20.314Z",
    "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36"
  },
  "meta": {
    "links": [
      {
        "rel": "self",
        "href": "https://marketing-api.ayoune.app/webpushsubscribers/607d7558806af8001a6abcb6",
        "method": "get",
        "title": "GET",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      }
    ],
    "relations": [],
    "debugId": "6a6194cbf78ad61f199101ad",
    "errors": [],
    "actions": [
      {
        "rel": "self",
        "action": "COPY",
        "title": "MODEL_WEBPUSHSUBSCRIBER",
        "href": "https://api.ayoune.app/marketing/webpushsubscribers/607d7558806af8001a6abcb6/copy",
        "method": "post",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      },
      {
        "rel": "self",
        "action": "DELETE",
        "title": "MODEL_WEBPUSHSUBSCRIBER",
        "href": "https://api.ayoune.app/marketing/webpushsubscribers/607d7558806af8001a6abcb6/copy",
        "method": "post",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      }
    ],
    "version": {
      "host": "2026.24.4",
      "core": "2026.257.1"
    },
    "rateLimit": {
      "limit": "2500",
      "remaining": "1708",
      "reset": "1784783437",
      "resetDate": "Thu Jul 23 2026"
    },
    "responseTime": 91.811778,
    "code": 200,
    "status": "success",
    "error": false
  }
}

Endpunkte

MethodePathBeschreibungRight
GET /webpushsubscribers Liste mit Filtern/Paginierung marketing.webpushsubscribers.view
GET /webpushsubscribers/:id Einzelner Datensatz marketing.webpushsubscribers.view
POST /webpushsubscribers Neuen Datensatz erstellen marketing.webpushsubscribers.new
PUT /webpushsubscribers Datensatz aktualisieren marketing.webpushsubscribers.edit
DELETE /webpushsubscribers/:id Datensatz löschen marketing.webpushsubscribers.delete

SDK

import { aYOUne } from '@tolinax/ayoune';
const ay = new aYOUne('pat_your_token');

// Alle abrufen
const list = await ay.marketing.webPushSubscribers.find().limit(10).exec();

// Einzelnen Datensatz
const one = await ay.marketing.webPushSubscribers.findById('OBJECT_ID').exec();

// Erstellen
const created = await ay.marketing.webPushSubscribers.create({ name: 'Foo' });

Weiterführend