aYOUne
← Marketing API

Channels

Singular: Channel — Base-URL: https://marketing-api.ayoune.app — Zugriff: CRUD

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": {
    "stats": {
      "views": 0,
      "viewTime": 0,
      "videos": 0,
      "images": 0,
      "likes": 0,
      "favorites": 0,
      "dislikes": 0,
      "replies": 0,
      "engagements": 0,
      "shares": 0,
      "clicks": 0,
      "subscribers": 0,
      "following": 0,
      "comments": 0,
      "leads": 0,
      "conversions": 0,
      "conversionRate": 0,
      "clickTroughRate": 0
    },
    "_id": "65e074f27631a977e1babdeb",
    "bot": "ayoune_bot",
    "type": "Facebook",
    "botInstalled": false,
    "settingsLocked": false,
    "active": true,
    "image_url": "",
    "createdBy": "6045f4d25704710012485569",
    "images": [],
    "createdAt": "2024-02-29T12:13:38.611Z",
    "updatedAt": "2024-02-29T12:13:38.611Z"
  },
  "meta": {
    "links": [
      {
        "rel": "self",
        "href": "https://marketing-api.ayoune.app/channels/65e074f27631a977e1babdeb",
        "method": "get",
        "title": "GET",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      }
    ],
    "relations": [
      {
        "rel": "Projects",
        "title": "MODEL_PROJECT",
        "href": "https://api.ayoune.app/pm/projects",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "pm.projects"
      },
      {
        "rel": "ProductGroups",
        "title": "MODEL_PRODUCTGROUP",
        "href": "https://api.ayoune.app/config/productgroups",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "config.productgroups"
      },
      {
        "rel": "ContentCategories",
        "title": "MODEL_CONTENTCATEGORY",
        "href": "https://api.ayoune.app/config/contentcategories",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "config.contentcategories"
      },
      {
        "rel": "Channels",
        "title": "MODEL_CHANNEL",
        "href": "https://api.ayoune.app/marketing/channels",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "marketing.channels"
      },
      {
        "rel": "Credentials",
        "title": "MODEL_CREDENTIAL",
        "href": "https://api.ayoune.app/config/credentials",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "config.credentials"
      },
      {
        "rel": "Websites",
        "title": "MODEL_WEBSITE",
        "href": "https://api.ayoune.app/cms/websites",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "cms.websites"
      }
    ],
    "debugId": "6a61945cf78ad61f1990d55e",
    "errors": [],
    "actions": [
      {
        "rel": "self",
        "action": "COPY",
        "title": "MODEL_CHANNEL",
        "href": "https://api.ayoune.app/marketing/channels/65e074f27631a977e1babdeb/copy",
        "method": "post",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      },
      {
        "rel": "self",
        "action": "DELETE",
        "title": "MODEL_CHANNEL",
        "href": "https://api.ayoune.app/marketing/channels/65e074f27631a977e1babdeb/copy",
        "method": "post",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      }
    ],
    "version": {
      "host": "2026.24.4",
      "core": "2026.257.1"
    },
    "rateLimit": {
      "limit": "2500",
      "remaining": "2353",
      "reset": "1784783437",
      "resetDate": "Thu Jul 23 2026"
    },
    "responseTime": 26.900299,
    "code": 200,
    "status": "success",
    "error": false
  }
}

Endpunkte

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

SDK

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

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

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

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

Weiterführend