Skip to content
aYOUne
← ads API

AdStrategyTemplates

Singular: AdStrategyTemplate — Base URL: https://ads-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": {
    "season": {
      "from": "12-01",
      "to": "01-06"
    },
    "_id": "6ab109213e4ac8da655633e5",
    "key": "advent",
    "kind": "season",
    "createdAt": "2026-09-21T10:38:25.514Z",
    "isActive": true,
    "name": "Advent",
    "nameTranslations": {
      "de": "Advent",
      "en": "Advent"
    },
    "note": "Derselbe Tagesbogen in der Adventsfarbwelt: Tannengruen, Kerzengold, ein warmes Rot. Das Fenster laeuft ueber den Jahreswechsel (01.12. bis 06.01.).",
    "sequences": [
      {
        "key": "tagesbogen",
        "steps": [
          {
            "anchor": {
              "sun": "sunrise",
              "offsetMin": -20
            },
            "durationMs": 600000,
            "kind": "wake",
            "blocks": [
              "light-front",
              "stars",
              "mountain",
              "horizon",
              "sun-arc"
            ],
            "tokens": {
              "ritual-sky": "linear-gradient(180deg,#0b1a14 0%,#3a2a18 58%,#c8a15a 100%)"
            },
            "labelKey": "ads.ritual.wake",
            "direction": "ltr"
          },
          {
            "anchor": {
              "at": "12:00"
            },
            "durationMs": 180000,
            "kind": "noon",
            "blocks": [
              "sun-zenith",
              "mountain"
            ],
            "tokens": {
              "ritual-sky": "linear-gradient(180deg,#123024 0%,#6b5a30 55%,#c8a15a 100%)"
            },
            "labelKey": "ads.ritual.noon",
            "direction": "ltr"
          },
          {
            "anchor": {
              "repeat": "hourly",
              "notBefore": "09:00",
              "notAfter": "22:00"
            },
            "durationMs": 20000,
            "kind": "hour",
            "blocks": [
              "clock",
              "pulse"
            ],
            "labelKey": "ads.ritual.hour"
          },
          {
            "anchor": {
              "sun": "sunset",
              "offsetMin": -90,
              "notBefore": "16:30"
            },
            "durationMs": 600000,
            "kind": "evening",
            "blocks": [
              "ball",
              "mountain",
              "horizon",
              "moon"
            ],
            "tokens": {
              "ritual-sky": "linear-gradient(180deg,#0b1a14 0%,#5a1f1f 52%,#8f2c2c 100%)"
            },
            "labelKey": "ads.ritual.evening",
            "direction": "ltr"
          },
          {
            "anchor": {
              "sun": "sunset",
              "offsetMin": 60
            },
            "durationMs": 300000,
            "kind": "sleep",
            "blocks": [
              "light-front",
              "stars",
              "mountain",
              "horizon",
              "moon"
            ],
            "tokens": {
              "ritual-sky": "linear-gradient(180deg,#050a08 0%,#0b1a14 66%,#2a1410 100%)"
            },
            "labelKey": "ads.ritual.sleep",
            "direction": "rtl"
          },
          {
            "anchor": {
              "sun": "sunset",
              "offsetMin": 90
            },
            "kind": "night",
            "blocks": [
              "stars",
              "clock",
              "pulse"
            ],
            "tokens": {
              "ritual-sky": "#050a08"
            },
            "labelKey": "ads.ritual.night"
          }
        ]
      }
    ],
    "shares": [],
    "sortOrder": 20,
    "updatedAt": "2026-10-25T19:30:35.275Z"
  },
  "meta": {
    "links": [
      {
        "rel": "self",
        "href": "https://ads-api.ayoune.app/adstrategytemplates/6ab109213e4ac8da655633e5",
        "method": "get",
        "title": "GET",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      }
    ],
    "relations": [],
    "debugId": "6adec32ad2df978dd0a1691c",
    "errors": [],
    "actions": [
      {
        "rel": "self",
        "action": "COPY",
        "title": "MODEL_ADSTRATEGYTEMPLATE",
        "href": "https://api.ayoune.app/ads/adstrategytemplates/6ab109213e4ac8da655633e5/copy",
        "method": "post",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      },
      {
        "rel": "self",
        "action": "DELETE",
        "title": "MODEL_ADSTRATEGYTEMPLATE",
        "href": "https://api.ayoune.app/ads/adstrategytemplates/6ab109213e4ac8da655633e5",
        "method": "delete",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      }
    ],
    "version": {
      "host": "2026.16.0",
      "core": "2026.388.0"
    },
    "rateLimit": {
      "limit": "10000",
      "remaining": "9855",
      "reset": "1792987409",
      "resetDate": "Mon Oct 26 2026"
    },
    "responseTime": 93.014658,
    "code": 200,
    "status": "success",
    "error": false
  }
}

Endpoints

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

SDK

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

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

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

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

See also