Skip to content
aYOUne
← Marketing API

Experiments

Singular: Experiment — 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": "6aded0ea25c052497e7aac7f",
    "name": "GOTHIC_PLUM_ARVEL CRYNYD",
    "level": "cta",
    "status": "draft",
    "trafficAllocation": 1,
    "createdBy": "6045f4d25704710012485569",
    "shares": [],
    "createdAt": "2026-10-26T04:02:50.633Z",
    "updatedAt": "2026-10-26T04:02:50.633Z"
  },
  "meta": {
    "links": [
      {
        "rel": "self",
        "href": "https://marketing-api.ayoune.app/experiments/6aded0ea25c052497e7aac7f",
        "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"
      },
      {
        "rel": "MarketingCampaigns",
        "title": "MODEL_MARKETINGCAMPAIGN",
        "href": "https://api.ayoune.app/marketing/marketingcampaigns",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "marketing.marketingcampaigns"
      }
    ],
    "debugId": "6aded0eb25c052497e7aaccf",
    "errors": [],
    "actions": [
      {
        "rel": "self",
        "action": "COPY",
        "title": "MODEL_EXPERIMENT",
        "href": "https://api.ayoune.app/marketing/experiments/6aded0ea25c052497e7aac7f/copy",
        "method": "post",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      },
      {
        "rel": "self",
        "action": "DELETE",
        "title": "MODEL_EXPERIMENT",
        "href": "https://api.ayoune.app/marketing/experiments/6aded0ea25c052497e7aac7f",
        "method": "delete",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      }
    ],
    "version": {
      "host": "2026.38.0",
      "core": "2026.388.0"
    },
    "rateLimit": {
      "limit": "10000",
      "remaining": "8916",
      "reset": "1792990581",
      "resetDate": "Mon Oct 26 2026"
    },
    "responseTime": 111.955144,
    "code": 200,
    "status": "success",
    "error": false
  }
}

Endpoints

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

SDK

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

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

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

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

See also