aYOUne
← Marketing API

Experiments

Singular: Experiment — Base-URL: https://marketing-api.ayoune.app — Zugriff: CRUD — Maschinenlesbare Beschreibung (JSON · YAML)

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": {
    "_id": "6a7019158b6670811970e80f",
    "name": "ACCEPTABLE_AMARANTH_TARFFUL",
    "level": "cta",
    "status": "draft",
    "trafficAllocation": 1,
    "createdBy": "6045f4d25704710012485569",
    "createdAt": "2026-08-03T04:29:09.883Z",
    "updatedAt": "2026-08-03T04:29:09.883Z"
  },
  "meta": {
    "links": [
      {
        "rel": "self",
        "href": "https://marketing-api.ayoune.app/experiments/6a7019158b6670811970e80f",
        "method": "get",
        "title": "GET",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      }
    ],
    "relations": [
      {
        "rel": "Websites",
        "title": "MODEL_WEBSITE",
        "href": "https://api.ayoune.app/cms/websites",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "cms.websites"
      },
      {
        "rel": "WebPages",
        "title": "MODEL_WEBPAGE",
        "href": "https://api.ayoune.app/cms/webpages",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "cms.webpages"
      },
      {
        "rel": "CTAs",
        "title": "MODEL_CTA",
        "href": "https://api.ayoune.app/marketing/ctas",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "marketing.ctas"
      }
    ],
    "debugId": "6a828bc39832d724b26f6a93",
    "errors": [],
    "actions": [
      {
        "rel": "self",
        "action": "COPY",
        "title": "MODEL_EXPERIMENT",
        "href": "https://api.ayoune.app/marketing/experiments/6a7019158b6670811970e80f/copy",
        "method": "post",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      },
      {
        "rel": "self",
        "action": "DELETE",
        "title": "MODEL_EXPERIMENT",
        "href": "https://api.ayoune.app/marketing/experiments/6a7019158b6670811970e80f/copy",
        "method": "post",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      }
    ],
    "version": {
      "host": "2026.36.0",
      "core": "2026.288.0"
    },
    "rateLimit": {
      "limit": "2500",
      "remaining": "1450",
      "reset": "1786943708",
      "resetDate": "Mon Aug 17 2026"
    },
    "responseTime": 144.517127,
    "code": 200,
    "status": "success",
    "error": false
  }
}

Endpunkte

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

SDK

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

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

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

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

Weiterführend