aYOUne
← Configuration API

MessageTemplates

Singular: MessageTemplate — Base URL: https://config-api.ayoune.app — Access: CRUD

play_circle 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": "6a618e431b493936213c41f6",
    "entityType": "Consumers",
    "eventType": "consumer.portal-invited",
    "channel": "email",
    "locale": "de",
    "subject": "Ihr Zugang zum Kundenportal",
    "body": "<p>Hallo {{name}},</p><p>Sie wurden zum Kundenportal eingeladen. Legen Sie jetzt Ihr Passwort fest, um Ihren Zugang zu aktivieren:</p><p><a href=\"{{setPasswordUrl}}\" style=\"display:inline-block;padding:12px 24px;background:#111827;color:#fff;text-decoration:none;border-radius:6px\">Passwort festlegen</a></p><p style=\"color:#6b7280;font-size:14px\">Oder kopieren Sie diesen Link in Ihren Browser:<br>{{setPasswordUrl}}</p><p style=\"color:#6b7280;font-size:14px\">Der Link ist 7 Tage gültig. Falls Sie diese Einladung nicht erwartet haben, können Sie diese E-Mail ignorieren.</p>",
    "format": "html",
    "active": true,
    "createdAt": "2026-07-23T03:45:07.779Z",
    "updatedAt": "2026-07-23T03:45:07.779Z"
  },
  "meta": {
    "links": [
      {
        "rel": "self",
        "href": "https://config-api.ayoune.app/messagetemplates/6a618e431b493936213c41f6",
        "method": "get",
        "title": "GET",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      }
    ],
    "relations": [],
    "debugId": "6a62df41f27d6098834b2e6f",
    "errors": [],
    "actions": [
      {
        "rel": "self",
        "action": "COPY",
        "title": "MODEL_MESSAGETEMPLATE",
        "href": "https://api.ayoune.app/config/messagetemplates/6a618e431b493936213c41f6/copy",
        "method": "post",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      },
      {
        "rel": "self",
        "action": "DELETE",
        "title": "MODEL_MESSAGETEMPLATE",
        "href": "https://api.ayoune.app/config/messagetemplates/6a618e431b493936213c41f6/copy",
        "method": "post",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      }
    ],
    "version": {
      "host": "2026.95.0",
      "core": "2026.258.0"
    },
    "rateLimit": {
      "limit": "2500",
      "remaining": "77",
      "reset": "1784865648",
      "resetDate": "Fri Jul 24 2026"
    },
    "responseTime": 128.899942,
    "code": 200,
    "status": "success",
    "error": false
  }
}

Endpoints

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

SDK

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

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

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

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

See also