Zum Inhalt springen
aYOUne
← Konfiguration API

MailTypes

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

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": "6a85dce2b0c00f8afe95a6be",
    "isGlobal": true,
    "key": "wiki",
    "label": "Wissensseiten-Versand",
    "label_en": "Knowledge page delivery",
    "description": "Versand einer Wissensseite per Mail.",
    "namespace": "business",
    "channel": "email",
    "category": "system",
    "contentDocType": "wiki",
    "layoutDocType": "wiki",
    "active": true,
    "systemLocked": true,
    "isDraft": true,
    "createdAt": "2026-08-19T16:42:10.067Z",
    "updatedAt": "2026-08-19T16:42:10.067Z",
    "shares": []
  },
  "meta": {
    "links": [
      {
        "rel": "self",
        "href": "https://config-api.ayoune.app/mailtypes/6a85dce2b0c00f8afe95a6be",
        "method": "get",
        "title": "GET",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      }
    ],
    "relations": [
      {
        "rel": "EMailTemplates",
        "title": "MODEL_EMAILTEMPLATE",
        "href": "https://api.ayoune.app/config/emailtemplates",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "config.emailtemplates"
      }
    ],
    "debugId": "6ac9b2622493408cc113ada1",
    "errors": [],
    "actions": [
      {
        "rel": "self",
        "action": "COPY",
        "title": "MODEL_MAILTYPE",
        "href": "https://api.ayoune.app/config/mailtypes/6a85dce2b0c00f8afe95a6be/copy",
        "method": "post",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      },
      {
        "rel": "self",
        "action": "DELETE",
        "title": "MODEL_MAILTYPE",
        "href": "https://api.ayoune.app/config/mailtypes/6a85dce2b0c00f8afe95a6be",
        "method": "delete",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      }
    ],
    "version": {
      "host": "2026.170.1",
      "core": "2026.368.0"
    },
    "rateLimit": {
      "limit": "10000",
      "remaining": "9217",
      "reset": "1791604919",
      "resetDate": "Sat Oct 10 2026"
    },
    "responseTime": 205.517036,
    "code": 200,
    "status": "success",
    "error": false
  }
}

Endpunkte

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

SDK

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

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

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

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

Weiterführend