0

I am trying to create content folders using REST API using post method(POST /asset/v1/content/categories).I have used the below request body am i am successful when i am trying to insert one folder per request.

Host: https://www.exacttargetapis.com
POST /asset/v1/content/categories
Content-Type: application/json Authorization: Bearer YOUR_ACCESS_TOKEN
{ "Name" : "My Pictures", "ParentId" : 99 }

However I am trying to insert multiple folders in a single request by sending the data in an array like the below request and i am unsuccessful:

Host: https://www.exacttargetapis.com
POST /asset/v1/content/categories
Content-Type: application/json Authorization: Bearer YOUR_ACCESS_TOKEN
[
{ "Name" : "My Pictures", "ParentId" : 99 }
{ "Name" : "My Pictures1", "ParentId" : 99 }
]

I tried multiple ways but I keep failing. Has anyone come across this scenario.

Regards, Rumi.

  • I don't know if multiple categories are supported. But, I see a syntax error in your json. Your array elements should be separated by commas. – David Devoy Mar 19 '18 at 18:48
0

From everything I have seen, this endpoint can only be used to create a single category/folder per call.

Your above call body was missing a comma after the first object - but even adding that it still failed. I sincerely think this will only do one at a time.

Creates a category (folder) in Content Builder.

More details here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.