JavaScript Fetch Request

Use this code snippet to generate content via the ContentDrips API

Add content items to complete the payload (Atleast one content item is required)
1const response = await fetch("https://generate.contentdrips.com/render", {
2 method: "POST",
3 headers: {
4 "Content-Type": "application/json",
5 Authorization: "Bearer YOUR_API_KEY"
6 },
7 body: JSON.stringify({
8 "template_id": "147631",
9 "canvas_background": {
10 "type": "fill",
11 "color": "#f0f9ff"
12 },
13 "output": "png",
14 "content_update": [
15 {
16 "type": "textbox",
17 "label": "quote"
18 },
19 {
20 "type": "textbox",
21 "label": "author"
22 }
23 ]
24})
25});