Hi,
I'm trying to use the "Add to List" REST API to add People to a list in Marketo using:
POST /rest/v1/lists/1156/leads.json
{
"input":[
{
"id": "1005065"
},
{
"id": "1007149"
}
]
}
I'm getting the following 605 error:
{
"requestId": "13e2b#167c8a54915",
"success": false,
"errors": [
{
"code": "605",
"message": "Request method 'POST' not supported"
}
]
}
The API doc specifically states to use POST and I've double checked that the role assigned to my API user has Read/Write to Person/Asset etc. I tried GET and it just returns the contents of the list, as expected. Is there a different method I should be using to add People to a static list?
Solved! Go to Solution.
Should be "/v1/lists/...." instead of "/v1/list/....."
Can't repro this. Are you absolutely positive your HTTP library isn't substituting something else for the method "POST" -- like with a special character -- by accident?
Same result from cURL?
I'm using Postman to submit the HTTPS request. I did get the same result with cURL:
michaelburstein$ curl --header "Content-Type: application/json" \
--request POST \
--data '{"input":[{"id": "1005065"},{"id": "1007149"}]}' \
https://******.mktorest.com/rest/v1/list/1156/leads.json?access_token=*************
{"requestId":"5bf8#167cc4552b6","success":false,"errors":[{"code":"605","message":"Request method 'POST' not supported"}]}
Should be "/v1/lists/...." instead of "/v1/list/....."
Thank you - turns out that was the issue.