Skip to content
aYOUne
← Marketing API

MarketingCampaigns

Singular: MarketingCampaign — 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": "6affc34a9a9a88706877eb84",
    "name": "COMPETITIVE_ORANGE_SAN HILL",
    "createdBy": "6045f4d25704710012485569",
    "shares": [],
    "createdAt": "2026-11-20T03:49:30.433Z",
    "updatedAt": "2026-11-20T03:49:30.433Z"
  },
  "meta": {
    "links": [
      {
        "rel": "self",
        "href": "https://marketing-api.ayoune.app/marketingcampaigns/6affc34a9a9a88706877eb84",
        "method": "get",
        "title": "GET",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      }
    ],
    "relations": [
      {
        "rel": "Coupons",
        "title": "MODEL_COUPON",
        "href": "https://api.ayoune.app/marketing/coupons",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "marketing.coupons"
      }
    ],
    "debugId": "6affc34a9a9a88706877ebb3",
    "errors": [],
    "actions": [
      {
        "rel": "self",
        "action": "COPY",
        "title": "MODEL_MARKETINGCAMPAIGN",
        "href": "https://api.ayoune.app/marketing/marketingcampaigns/6affc34a9a9a88706877eb84/copy",
        "method": "post",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      },
      {
        "rel": "self",
        "action": "DELETE",
        "title": "MODEL_MARKETINGCAMPAIGN",
        "href": "https://api.ayoune.app/marketing/marketingcampaigns/6affc34a9a9a88706877eb84",
        "method": "delete",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      }
    ],
    "version": {
      "host": "2026.38.0",
      "core": "2026.388.0"
    },
    "rateLimit": {
      "limit": "10000",
      "remaining": "8796",
      "reset": "1795149787",
      "resetDate": "Fri Nov 20 2026"
    },
    "responseTime": 198.03111,
    "code": 200,
    "status": "success",
    "error": false
  }
}

Endpoints

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

SDK

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

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

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

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

See also