aYOUne
← Configuration API

NotificationPolicies

Singular: NotificationPolicy — Base URL: https://config-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": {
    "conditions": {
      "userRoles": []
    },
    "autoEnrich": {
      "consumer": true,
      "self": true
    },
    "_id": "6a618e431b493936213c41b1",
    "name": "AI Approval Approved",
    "entityType": "AIApprovalRequests",
    "eventType": "approved",
    "channels": [
      "internal_chat"
    ],
    "active": true,
    "order": 97,
    "createdAt": "2026-07-23T03:45:07.639Z",
    "updatedAt": "2026-07-23T03:45:07.639Z"
  },
  "meta": {
    "links": [
      {
        "rel": "self",
        "href": "https://config-api.ayoune.app/notificationpolicies/6a618e431b493936213c41b1",
        "method": "get",
        "title": "GET",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      }
    ],
    "relations": [],
    "debugId": "6a62df44f27d6098834b2f03",
    "errors": [],
    "actions": [
      {
        "rel": "self",
        "action": "COPY",
        "title": "MODEL_NOTIFICATIONPOLICY",
        "href": "https://api.ayoune.app/config/notificationpolicies/6a618e431b493936213c41b1/copy",
        "method": "post",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      },
      {
        "rel": "self",
        "action": "DELETE",
        "title": "MODEL_NOTIFICATIONPOLICY",
        "href": "https://api.ayoune.app/config/notificationpolicies/6a618e431b493936213c41b1/copy",
        "method": "post",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      }
    ],
    "version": {
      "host": "2026.95.0",
      "core": "2026.258.0"
    },
    "rateLimit": {
      "limit": "2500",
      "remaining": "65",
      "reset": "1784865648",
      "resetDate": "Fri Jul 24 2026"
    },
    "responseTime": 179.245578,
    "code": 200,
    "status": "success",
    "error": false
  }
}

Endpoints

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

SDK

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

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

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

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

See also