/v1/assets
Legt ein Bild an und liefert eine signierte Upload-Adresse (zwei Stunden gültig). Die Datei geht per PUT mit ihrem Content-Type direkt an upload.url — ohne API-Key. Danach POST /v1/assets/{id}/complete. Erlaubt: PNG, JPEG, WebP, GIF, AVIF, SVG, bis 25 MB. Scope full.
Body-Parameter
| Name | Typ | Pflicht | Beschreibung |
|---|---|---|---|
| filename | string | erforderlich | Dateiname, nur zur Anzeige. z. B. buehne.jpg |
| content_type | string | erforderlich | MIME-Typ der Datei. z. B. image/jpeg |
Request · Next.js
const res = await fetch(`https://api.newsletterkit.ventureon.io/v1/assets`, {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.NEWSLETTERKIT_API_KEY}`,
"Content-Type": "application/json",
"Idempotency-Key": crypto.randomUUID(),
},
body: JSON.stringify({
filename: "buehne.jpg",
content_type: "image/jpeg",
}),
});
const data = await res.json();Response 200
{
"data": {
"id": "b7f0b1a6-…",
"status": "pending",
"filename": "buehne.jpg",
"url": null,
"upload": { "url": "https://…/storage/v1/object/upload/sign/asset-uploads/…?token=…", "method": "PUT", "headers": { "Content-Type": "image/jpeg" } }
},
"request_id": "…"
}