Re: REST API: Create static lists in programs and Email Templates

MariaT
Level 1

I'm trying to create a static list inside the program

 

Program:

{
"id": 1010,
"name": "ProgramWebRequest",
"description": "Program for campaigns",
"createdAt": "2025-12-05T12:28:39Z+0000",
"updatedAt": "2025-12-05T12:28:39Z+0000",
"url": "",
"type": "Default",
"channel": "Web Request",
"folder": {
"type": "Folder",
"value": 71,
"folderName": "MyFolder"
},
"status": "",
"workspace": "Default",
"tags": [],
"costs": []
}
]

 

cURL command:

curl --location '[HOST]/rest/asset/v1/staticLists.json
' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'folder={"id": 1010, "type": "Program"}' \
--data-urlencode 'name=List API'

response:
{
"requestId": "cada#19aee8d28ab",
"success": false,
"warnings": [],
"errors": [
 {
"code": "610",
"message": "Requested resource not found"
 }
 ]
}
 
What is the reason it is not possible? I tried also with other channels: Email Send and Online Advertising
 
I have similar problems when creating Email Template.

Folder 83:
{
"name": "Design Folder API",
"description": "email templates",
"createdAt": "2025-12-05T11:56:10Z+0000",
"updatedAt": "2025-12-05T11:56:10Z+0000",
"url": "",
"folderId": {
"id": 83,
"type": "Folder"
},
"folderType": "Email Template",
"parent": {
"id": 27,
"type": "Folder"
},
"path": "/Design Studio/Default/Emails/Templates/Design Folder API",
"isArchive": false,
"isSystem": false,
"accessZoneId": 1,
"workspace": "Default",
"id": 83
}

 

cURL command:

curl --location '[HOST]/rest/asset/v1/emailTemplates.json
' \
--form 'name="Email Template API"' \
--form 'folder="{\"id\":83,\"type\":\"Folder\"}"' \
--form 'content=@"/path/to/template1.html"'

 

response is similar:

{
"requestId": "1403f#19aee6a0fd9",
"success": false,
"warnings": [],
"errors": [
{
"code": "610",
"message": "Requested resource not found"
}
]
}
4 REPLIES 4
SanfordWhiteman
Level 10 - Community Moderator

The first issue I see is you have an extra line break in your cURL command.

 

The second issue you’ll encounter when you fix that one is you can’t put a Static List in a Folder, only in a Program.

MariaT
Level 1

I think the extra line break is just the matter of Postman export. And I'm trying to put the Static List in the Program, not in a Folder. Is there something wrong with my Program?

SanfordWhiteman
Level 10 - Community Moderator

Postman doesn't export broken code unless the request itself is broken, and the 610 error is exactly what you’d get with an extra line break. Fix the line break, then we'll continue.

SanfordWhiteman
Level 10 - Community Moderator

When posting code, you must use the syntax highlighter (“Insert/Edit Code Sample”) for it to be readable. I edited your post this time.