Using "Add to List" REST API - POST not supported | Community
Skip to main content
December 19, 2018
Solved

Using "Add to List" REST API - POST not supported

  • December 19, 2018
  • 1 reply
  • 4512 views

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?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Steven_Vanderb3

Should be "/v1/lists/...." instead of "/v1/list/....."

http://developers.marketo.com/rest-api/endpoint-reference/lead-database-endpoint-reference/#/Static_Lists/addLeadsToList…

1 reply

SanfordWhiteman
Level 10
December 20, 2018

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?

December 20, 2018

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"}]}' \

  ******.mktorest.com/rest/v1/list/1156/leads.json?access_token=*************

{"requestId":"5bf8#167cc4552b6","success":false,"errors":[{"code":"605","message":"Request method 'POST' not supported"}]}

Steven_Vanderb3
Adobe Employee
Steven_Vanderb3Adobe EmployeeAccepted solution
Adobe Employee
December 20, 2018