SOLVED

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

Go to solution
Anonymous
Not applicable

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

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?

Tags (2)
1 ACCEPTED SOLUTION

Accepted Solutions
Steven_Vanderb3
Marketo Employee

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

4 REPLIES 4
SanfordWhiteman
Level 10 - Community Moderator

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

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?

Anonymous
Not applicable

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

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

Steven_Vanderb3
Marketo Employee

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

Anonymous
Not applicable

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

Thank you - turns out that was the issue.