POST or PATCH to an already existing internal Do Not Call List dncList

Hi everyone,
I'm trying to make a Data Action for updating our internal Master DNC List.
I really thought POST was the way to go, however, If I use the POST method, then I get a 400 malformed error.

If I use PATCH /api/v2/outbound/dncLists/${input.dncListId}/phonenumbers this works fine.
If I use POST /api/v2/outbound/dncLists/${input.dncListId}/phonenumbers then I get a 400 malformed syntax error
Execute: The request could not be understood by the server due to malformed syntax.

  • REST call for action execute failed. Message: Request to backend service failed. Response from web service: {"message":"The request could not be understood by the server due to malformed syntax.","code":"bad.request","status":400,

For those that have worked with DNC Lists and Data Actions, Is PATCH the preferred way ? I just really thought I should be using POST, but I can't seem to get that to work.

Thanks in advance for any advice you have,

Bill W

I agree that POST seems to be the correct way to add to the list. Playing with the API explorer, it looks like you need to have the body be a JSON array, like this:

[
  "1-222-333-4444"
]

I got a similar looking error if my body was

"1-222-333-4444"

If you can't get things working in API explorer then I would open up a support case to understand how this API is supposed to be used.

--Jason

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.