Skip to content

Commit d4c43ad

Browse files
committed
Use realistic IDs in code examples
1 parent 1e271a4 commit d4c43ad

2 files changed

Lines changed: 128 additions & 126 deletions

File tree

README.md

Lines changed: 48 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ const resp = await loops.createContact({
214214
```json
215215
{
216216
"success": true,
217-
"id": "id_of_contact"
217+
"id": "clw9h3y5a014yl70k9m2n4p8q"
218218
}
219219
```
220220

@@ -278,7 +278,7 @@ const resp = await loops.updateContact({
278278
```json
279279
{
280280
"success": true,
281-
"id": "id_of_contact"
281+
"id": "clw9h3y5a014yl70k9m2n4p8q"
282282
}
283283
```
284284

@@ -894,7 +894,7 @@ const resp = await loops.listTransactionalEmails({ perPage: 15 });
894894
"id": "clfn0k1yg001imo0fdeqg30i8",
895895
"name": "Sign up confirmation",
896896
"draftEmailMessageId": null,
897-
"publishedEmailMessageId": "msg_123",
897+
"publishedEmailMessageId": "clm9x3o5q002yl70a8b3c4d5e",
898898
"transactionalGroupId": null,
899899
"createdAt": "2023-11-06T17:48:07.249Z",
900900
"updatedAt": "2023-11-06T17:48:07.249Z",
@@ -903,9 +903,9 @@ const resp = await loops.listTransactionalEmails({ perPage: 15 });
903903
{
904904
"id": "cll42l54f20i1la0lfooe3z12",
905905
"name": "Password reset",
906-
"draftEmailMessageId": "msg_456",
907-
"publishedEmailMessageId": "msg_789",
908-
"transactionalGroupId": "grp_123",
906+
"draftEmailMessageId": "clm8k2n4p000yl70f6g7h8i9j",
907+
"publishedEmailMessageId": "clm8k2n4p001yl70k1l2m3n4o",
908+
"transactionalGroupId": "clq3b7s9u006yl70p5q6r7s8t",
909909
"createdAt": "2025-02-02T02:56:28.845Z",
910910
"updatedAt": "2025-02-02T02:56:28.845Z",
911911
"dataVariables": [
@@ -934,7 +934,7 @@ Retrieve a single transactional email by ID.
934934
#### Example
935935

936936
```javascript
937-
const resp = await loops.getTransactionalEmail("trans_123");
937+
const resp = await loops.getTransactionalEmail("clfn0k1yg001imo0fdeqg30i8");
938938
```
939939

940940
---
@@ -977,12 +977,12 @@ Update a transactional email by ID. At least one field is required.
977977
#### Example
978978

979979
```javascript
980-
const resp = await loops.updateTransactionalEmail("trans_123", {
980+
const resp = await loops.updateTransactionalEmail("clfn0k1yg001imo0fdeqg30i8", {
981981
name: "Updated name",
982982
});
983983

984-
const resp = await loops.updateTransactionalEmail("trans_123", {
985-
transactionalGroupId: "grp_123",
984+
const resp = await loops.updateTransactionalEmail("clfn0k1yg001imo0fdeqg30i8", {
985+
transactionalGroupId: "clq3b7s9u006yl70p5q6r7s8t",
986986
});
987987
```
988988

@@ -1003,7 +1003,7 @@ Ensure a transactional email has a draft email message. Use [`updateEmailMessage
10031003
#### Example
10041004

10051005
```javascript
1006-
const resp = await loops.ensureTransactionalEmailDraft("trans_123");
1006+
const resp = await loops.ensureTransactionalEmailDraft("clfn0k1yg001imo0fdeqg30i8");
10071007
```
10081008

10091009
---
@@ -1023,7 +1023,7 @@ Publish a transactional email's current draft.
10231023
#### Example
10241024

10251025
```javascript
1026-
const resp = await loops.publishTransactionalEmail("trans_123");
1026+
const resp = await loops.publishTransactionalEmail("clfn0k1yg001imo0fdeqg30i8");
10271027
```
10281028

10291029
---
@@ -1091,7 +1091,7 @@ const resp = await loops.listThemes({ perPage: 15, cursor: "clyo0q4wo01p59fsecyx
10911091
},
10921092
"data": [
10931093
{
1094-
"id": "theme_123",
1094+
"id": "clo1z5q7s004yl70y3z4a5b6c",
10951095
"name": "Default",
10961096
"styles": {
10971097
"backgroundColor": "#ffffff"
@@ -1122,14 +1122,14 @@ Retrieve a single theme by ID.
11221122
#### Example
11231123

11241124
```javascript
1125-
const resp = await loops.getTheme("theme_123");
1125+
const resp = await loops.getTheme("clo1z5q7s004yl70y3z4a5b6c");
11261126
```
11271127

11281128
#### Response
11291129

11301130
```json
11311131
{
1132-
"id": "theme_123",
1132+
"id": "clo1z5q7s004yl70y3z4a5b6c",
11331133
"name": "Default",
11341134
"styles": {
11351135
"backgroundColor": "#ffffff"
@@ -1178,7 +1178,7 @@ const resp = await loops.listComponents({ perPage: 15 });
11781178
},
11791179
"data": [
11801180
{
1181-
"id": "comp_123",
1181+
"id": "clp2a6r8t005yl70d7e8f9g0h",
11821182
"name": "Header",
11831183
"lmx": "<Section>...</Section>"
11841184
}
@@ -1204,14 +1204,14 @@ Retrieve a single component by ID.
12041204
#### Example
12051205

12061206
```javascript
1207-
const resp = await loops.getComponent("comp_123");
1207+
const resp = await loops.getComponent("clp2a6r8t005yl70d7e8f9g0h");
12081208
```
12091209

12101210
#### Response
12111211

12121212
```json
12131213
{
1214-
"id": "comp_123",
1214+
"id": "clp2a6r8t005yl70d7e8f9g0h",
12151215
"name": "Header",
12161216
"lmx": "<Section>...</Section>"
12171217
}
@@ -1255,8 +1255,8 @@ const resp = await loops.listCampaigns({ perPage: 15 });
12551255
},
12561256
"data": [
12571257
{
1258-
"id": "camp_123",
1259-
"emailMessageId": "msg_123",
1258+
"id": "cln0y4p6r003yl70i1j2k3l4m",
1259+
"emailMessageId": "clm9x3o5q002yl70a8b3c4d5e",
12601260
"name": "Spring announcement",
12611261
"status": "Draft",
12621262
"createdAt": "2025-01-01T00:00:00.000Z",
@@ -1301,7 +1301,7 @@ const resp = await loops.createCampaign({ name: "Spring announcement" });
13011301

13021302
const resp = await loops.createCampaign({
13031303
name: "Spring announcement",
1304-
mailingListId: "list_123",
1304+
mailingListId: "cm06f5v0e45nf0ml5754o9cix",
13051305
scheduling: { method: "schedule", timestamp: "2026-06-15T10:00:00.000Z" },
13061306
});
13071307
```
@@ -1310,13 +1310,13 @@ const resp = await loops.createCampaign({
13101310

13111311
```json
13121312
{
1313-
"id": "camp_123",
1313+
"id": "cln0y4p6r003yl70i1j2k3l4m",
13141314
"name": "Spring announcement",
13151315
"status": "Draft",
13161316
"createdAt": "2025-01-01T00:00:00.000Z",
13171317
"updatedAt": "2025-01-01T00:00:00.000Z",
1318-
"emailMessageId": "msg_123",
1319-
"emailMessageContentRevisionId": "rev_123",
1318+
"emailMessageId": "clm9x3o5q002yl70a8b3c4d5e",
1319+
"emailMessageContentRevisionId": "clv8g2x4z012yl70n5o6p7q8r",
13201320
"campaignGroupId": null,
13211321
"mailingListId": null,
13221322
"audienceSegmentId": null,
@@ -1346,19 +1346,19 @@ Retrieve a single campaign by ID.
13461346
#### Example
13471347

13481348
```javascript
1349-
const resp = await loops.getCampaign("camp_123");
1349+
const resp = await loops.getCampaign("cln0y4p6r003yl70i1j2k3l4m");
13501350
```
13511351

13521352
#### Response
13531353

13541354
```json
13551355
{
1356-
"id": "camp_123",
1356+
"id": "cln0y4p6r003yl70i1j2k3l4m",
13571357
"name": "Spring announcement",
13581358
"status": "Draft",
13591359
"createdAt": "2025-01-01T00:00:00.000Z",
13601360
"updatedAt": "2025-01-01T00:00:00.000Z",
1361-
"emailMessageId": "msg_123",
1361+
"emailMessageId": "clm9x3o5q002yl70a8b3c4d5e",
13621362
"campaignGroupId": null,
13631363
"mailingListId": null,
13641364
"audienceSegmentId": null,
@@ -1394,19 +1394,19 @@ Update a draft campaign's name, group, audience, or scheduling. At least one fie
13941394
#### Example
13951395

13961396
```javascript
1397-
const resp = await loops.updateCampaign("camp_123", { name: "Updated name" });
1397+
const resp = await loops.updateCampaign("cln0y4p6r003yl70i1j2k3l4m", { name: "Updated name" });
13981398
```
13991399

14001400
#### Response
14011401

14021402
```json
14031403
{
1404-
"id": "camp_123",
1404+
"id": "cln0y4p6r003yl70i1j2k3l4m",
14051405
"name": "Updated name",
14061406
"status": "Draft",
14071407
"createdAt": "2025-01-01T00:00:00.000Z",
14081408
"updatedAt": "2025-01-02T00:00:00.000Z",
1409-
"emailMessageId": "msg_123",
1409+
"emailMessageId": "clm9x3o5q002yl70a8b3c4d5e",
14101410
"campaignGroupId": null,
14111411
"mailingListId": null,
14121412
"audienceSegmentId": null,
@@ -1444,23 +1444,23 @@ Retrieve an email message, including its compiled LMX content.
14441444
#### Example
14451445

14461446
```javascript
1447-
const resp = await loops.getEmailMessage("msg_123");
1447+
const resp = await loops.getEmailMessage("clm9x3o5q002yl70a8b3c4d5e");
14481448
```
14491449

14501450
#### Response
14511451

14521452
```json
14531453
{
1454-
"id": "msg_123",
1455-
"campaignId": "camp_123",
1454+
"id": "clm9x3o5q002yl70a8b3c4d5e",
1455+
"campaignId": "cln0y4p6r003yl70i1j2k3l4m",
14561456
"subject": "Hello",
14571457
"previewText": "Preview text",
14581458
"fromName": "Loops",
14591459
"fromEmail": "hello",
14601460
"replyToEmail": "",
14611461
"emailFormat": "styled",
14621462
"lmx": "<Email>...</Email>",
1463-
"contentRevisionId": "rev_123",
1463+
"contentRevisionId": "clv8g2x4z012yl70n5o6p7q8r",
14641464
"updatedAt": "2025-01-01T00:00:00.000Z"
14651465
}
14661466
```
@@ -1497,8 +1497,8 @@ Update fields on an email message (subject, preview text, sender, LMX content).
14971497
#### Example
14981498

14991499
```javascript
1500-
const resp = await loops.updateEmailMessage("msg_123", {
1501-
expectedRevisionId: "rev_123",
1500+
const resp = await loops.updateEmailMessage("clm9x3o5q002yl70a8b3c4d5e", {
1501+
expectedRevisionId: "clv8g2x4z012yl70n5o6p7q8r",
15021502
subject: "Hello",
15031503
previewText: "Preview text",
15041504
fromName: "Loops",
@@ -1511,16 +1511,16 @@ const resp = await loops.updateEmailMessage("msg_123", {
15111511

15121512
```json
15131513
{
1514-
"id": "msg_123",
1515-
"campaignId": "camp_123",
1514+
"id": "clm9x3o5q002yl70a8b3c4d5e",
1515+
"campaignId": "cln0y4p6r003yl70i1j2k3l4m",
15161516
"subject": "Hello",
15171517
"previewText": "Preview text",
15181518
"fromName": "Loops",
15191519
"fromEmail": "hello",
15201520
"replyToEmail": "",
15211521
"emailFormat": "styled",
15221522
"lmx": "<Email>...</Email>",
1523-
"contentRevisionId": "rev_456",
1523+
"contentRevisionId": "clv8g2x4z013yl70s9t0u1v2w",
15241524
"updatedAt": "2025-01-02T00:00:00.000Z",
15251525
"warnings": [
15261526
{
@@ -1601,7 +1601,7 @@ Retrieve a single transactional group by ID.
16011601
#### Example
16021602

16031603
```javascript
1604-
const resp = await loops.getTransactionalGroup("grp_123");
1604+
const resp = await loops.getTransactionalGroup("clq3b7s9u006yl70p5q6r7s8t");
16051605
```
16061606

16071607
---
@@ -1622,7 +1622,7 @@ Update a transactional group's name or description. At least one field must be p
16221622
#### Example
16231623

16241624
```javascript
1625-
const resp = await loops.updateTransactionalGroup("grp_123", {
1625+
const resp = await loops.updateTransactionalGroup("clq3b7s9u006yl70p5q6r7s8t", {
16261626
name: "Updated name",
16271627
});
16281628
```
@@ -1663,7 +1663,7 @@ Retrieve a single audience segment by ID.
16631663
#### Example
16641664

16651665
```javascript
1666-
const resp = await loops.getAudienceSegment("seg_123");
1666+
const resp = await loops.getAudienceSegment("clr4c8t0v008yl70x3y4z5a6b");
16671667
```
16681668

16691669
---
@@ -1724,7 +1724,7 @@ Retrieve a single campaign group by ID.
17241724
#### Example
17251725

17261726
```javascript
1727-
const resp = await loops.getCampaignGroup("grp_123");
1727+
const resp = await loops.getCampaignGroup("clq3b7s9u007yl70u9v0w1x2y");
17281728
```
17291729

17301730
---
@@ -1745,7 +1745,7 @@ Update a campaign group's name or description. At least one field must be provid
17451745
#### Example
17461746

17471747
```javascript
1748-
const resp = await loops.updateCampaignGroup("grp_123", {
1748+
const resp = await loops.updateCampaignGroup("clq3b7s9u007yl70u9v0w1x2y", {
17491749
description: "Monthly product updates",
17501750
});
17511751
```
@@ -1770,7 +1770,7 @@ Send a test preview of an email message to one or more addresses.
17701770
#### Example
17711771

17721772
```javascript
1773-
const resp = await loops.sendEmailMessagePreview("msg_123", {
1773+
const resp = await loops.sendEmailMessagePreview("clm9x3o5q002yl70a8b3c4d5e", {
17741774
emails: ["test@example.com"],
17751775
contactProperties: {
17761776
firstName: "Alex",
@@ -1814,7 +1814,7 @@ Retrieve a workflow graph with node type names, connections, and selected displa
18141814
#### Example
18151815

18161816
```javascript
1817-
const resp = await loops.getWorkflow("wf_123");
1817+
const resp = await loops.getWorkflow("cls5d9u1w009yl70c7d8e9f0g");
18181818
```
18191819

18201820
---
@@ -1834,7 +1834,7 @@ Retrieve detailed data for a single workflow node.
18341834
#### Example
18351835

18361836
```javascript
1837-
const resp = await loops.getWorkflowNode("wf_123", "node_456");
1837+
const resp = await loops.getWorkflowNode("cls5d9u1w009yl70c7d8e9f0g", "clt6e0v2x010yl70h1i2j3k4l");
18381838
```
18391839

18401840
---
@@ -1878,7 +1878,7 @@ Finalize an asset after the file has been uploaded to the pre-signed URL.
18781878
#### Example
18791879

18801880
```javascript
1881-
const resp = await loops.completeUpload("asset_123");
1881+
const resp = await loops.completeUpload("clu7f1w3y011yl70m5n6o7p8q");
18821882
```
18831883

18841884
---

0 commit comments

Comments
 (0)