aYOUne
← Marketing API

WebPushSubscribers

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

play_circle Try it now beta

Requests are proxied through the consumer-app to *.ayoune.app. Tokens stay in your browser and are forwarded per call.

Example response (recorded) sample

A real, previously recorded GET /:id response of this endpoint — not the live call above. Sensitive fields are masked.

{
  "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
  }
}

Endpoints

MethodPathDescriptionRight
GET /webpushsubscribers List with filters/pagination marketing.webpushsubscribers.view
GET /webpushsubscribers/:id Single record marketing.webpushsubscribers.view
POST /webpushsubscribers Create new record marketing.webpushsubscribers.new
PUT /webpushsubscribers Update record marketing.webpushsubscribers.edit
DELETE /webpushsubscribers/:id Delete record marketing.webpushsubscribers.delete

SDK

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

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

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

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

See also