← Marketing API
Newsletters
Singular: Newsletter — Base-URL: https://marketing-api.ayoune.app — Zugriff: CRUD
Jetzt ausprobieren
beta
Response (live)
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": {
"canceled": {
"value": false,
"when": "2024-02-29T16:30:51.196Z"
},
"_id": "65e0b13b121b7d48fe1592b6",
"name": "",
"promotional": true,
"editor": "6045f4d25704710012485569",
"attachments": [],
"subscribers": [],
"subscriber": 0,
"opens": 0,
"openrate": 0,
"clicks": 0,
"clickrate": 0,
"bounces": 0,
"bouncerate": 0,
"autoSend": false,
"sent": false,
"status": "draft",
"progress": 0,
"realSubscribers": 0,
"cleanedSubscribers": 0,
"createdBy": "6045f4d25704710012485569",
"links": [],
"createdAt": "2024-02-29T16:30:51.197Z",
"updatedAt": "2024-02-29T16:30:51.197Z"
},
"meta": {
"links": [
{
"rel": "self",
"href": "https://marketing-api.ayoune.app/newsletters/65e0b13b121b7d48fe1592b6",
"method": "get",
"title": "GET",
"types": [
"application/json",
"application/yaml",
"text/csv"
]
}
],
"relations": [
{
"rel": "Consumers",
"title": "MODEL_CONSUMER",
"href": "https://api.ayoune.app/crm/consumers",
"method": "get",
"types": [
"application/json",
"application/yaml",
"text/csv"
],
"right": "crm.consumers"
},
{
"rel": "EMailTemplates",
"title": "MODEL_EMAILTEMPLATE",
"href": "https://api.ayoune.app/config/emailtemplates",
"method": "get",
"types": [
"application/json",
"application/yaml",
"text/csv"
],
"right": "config.emailtemplates"
},
{
"rel": "Mails",
"title": "MODEL_MAIL",
"href": "https://api.ayoune.app/config/mails",
"method": "get",
"types": [
"application/json",
"application/yaml",
"text/csv"
],
"right": "config.mails"
},
{
"rel": "ConsumerLists",
"title": "MODEL_CONSUMERLIST",
"href": "https://api.ayoune.app/crm/consumerlists",
"method": "get",
"types": [
"application/json",
"application/yaml",
"text/csv"
],
"right": "crm.consumerlists"
},
{
"rel": "ConsumerLists",
"title": "MODEL_CONSUMERLIST",
"href": "https://api.ayoune.app/crm/consumerlists",
"method": "get",
"types": [
"application/json",
"application/yaml",
"text/csv"
],
"right": "crm.consumerlists"
},
{
"rel": "NewsletterTypes",
"title": "MODEL_NEWSLETTERTYPE",
"href": "https://api.ayoune.app/config/newslettertypes",
"method": "get",
"types": [
"application/json",
"application/yaml",
"text/csv"
],
"right": "config.newslettertypes"
}
],
"debugId": "6a6194abf78ad61f1990f3e2",
"errors": [],
"actions": [
{
"rel": "self",
"action": "COPY",
"title": "MODEL_NEWSLETTER",
"href": "https://api.ayoune.app/marketing/newsletters/65e0b13b121b7d48fe1592b6/copy",
"method": "post",
"types": [
"application/json",
"application/yaml",
"text/csv"
]
},
{
"rel": "self",
"action": "DELETE",
"title": "MODEL_NEWSLETTER",
"href": "https://api.ayoune.app/marketing/newsletters/65e0b13b121b7d48fe1592b6/copy",
"method": "post",
"types": [
"application/json",
"application/yaml",
"text/csv"
]
}
],
"version": {
"host": "2026.24.4",
"core": "2026.257.1"
},
"rateLimit": {
"limit": "2500",
"remaining": "1906",
"reset": "1784783437",
"resetDate": "Thu Jul 23 2026"
},
"responseTime": 67.701788,
"code": 200,
"status": "success",
"error": false
}
}
Endpunkte
| Methode | Path | Beschreibung | Right |
|---|---|---|---|
| GET | /newsletters |
Liste mit Filtern/Paginierung | marketing.newsletters.view |
| GET | /newsletters/:id |
Einzelner Datensatz | marketing.newsletters.view |
| POST | /newsletters |
Neuen Datensatz erstellen | marketing.newsletters.new |
| PUT | /newsletters |
Datensatz aktualisieren | marketing.newsletters.edit |
| DELETE | /newsletters/:id |
Datensatz löschen | marketing.newsletters.delete |
SDK
import { aYOUne } from '@tolinax/ayoune';
const ay = new aYOUne('pat_your_token');
// Alle abrufen
const list = await ay.marketing.newsletters.find().limit(10).exec();
// Einzelnen Datensatz
const one = await ay.marketing.newsletters.findById('OBJECT_ID').exec();
// Erstellen
const created = await ay.marketing.newsletters.create({ name: 'Foo' });