Skip to content
aYOUne
← Marketing API

WebPushSubscribers

Singular: WebPushSubscriber — Base URL: https://marketing-api.ayoune.app — Access: CRUD — Machine-readable spec (JSON · YAML)

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": {
    "_id": "65e0b151121b7d48fe1594b1",
    "isDraft": true,
    "createdBy": "6045f4d25704710012485569",
    "last_active": "2024-02-29T16:31:13.553Z",
    "createdAt": "2024-02-29T16:31:13.554Z",
    "updatedAt": "2024-02-29T16:31:13.554Z",
    "shares": []
  },
  "meta": {
    "links": [
      {
        "rel": "self",
        "href": "https://marketing-api.ayoune.app/webpushsubscribers/65e0b151121b7d48fe1594b1",
        "method": "get",
        "title": "GET",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      }
    ],
    "relations": [
      {
        "rel": "Consumers",
        "title": "MODEL_CONSUMER",
        "href": "https://api.ayoune.app/crm/consumers",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "crm.consumers"
      }
    ],
    "debugId": "6aded0b725c052497e7aa101",
    "errors": [],
    "actions": [
      {
        "rel": "self",
        "action": "COPY",
        "title": "MODEL_WEBPUSHSUBSCRIBER",
        "href": "https://api.ayoune.app/marketing/webpushsubscribers/65e0b151121b7d48fe1594b1/copy",
        "method": "post",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      },
      {
        "rel": "self",
        "action": "DELETE",
        "title": "MODEL_WEBPUSHSUBSCRIBER",
        "href": "https://api.ayoune.app/marketing/webpushsubscribers/65e0b151121b7d48fe1594b1",
        "method": "delete",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      }
    ],
    "version": {
      "host": "2026.38.0",
      "core": "2026.388.0"
    },
    "rateLimit": {
      "limit": "10000",
      "remaining": "9062",
      "reset": "1792990581",
      "resetDate": "Mon Oct 26 2026"
    },
    "responseTime": 93.899215,
    "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