Search code examples
circuit-sdk

USER.SUBMIT_FORM_DATA: Event filter Fails for UPDATE Outgoing WebHook call


I can register events with USER.SUBMIT_FORM_DATA no problem, also I can Update (PUT) all the other event filters without errors. USER.SUBMIT_FORM_DATA fails when using PUT to update. Reproduced error in PowerShell, Curl and Postman. I also noticed Swagger does not have USER.SUBMIT_FORM_DATA available in the array. This is what's available:

CONVERSATION.CREATE

CONVERSATION.UPDATE

CONVERSATION.ADD_ITEM

CONVERSATION.UPDATE_ITEM

USER.USER_UPDATED

USER.USER_SETTING_UPDATED

Request:

curl -L -X PUT 'https://circuitsandbox.net/rest/v2/webhooks/IdHere' \
-H 'accept: application/json' \
-H 'authorization: Bearer Token\
-H 'content-type: application/x-www-form-urlencoded' \
--data-urlencode 'url=https://webhook.site/IdHere' \
--data-urlencode 'filter=USER.SUBMIT_FORM_DATA'

Error:

{
    "errorDescription": "the request contains invalid data",
    "validationErrors": [
        "The request array with name ::= [filter] and content value ::=[USER.SUBMIT_FORM_DATA]does not match the expression ::= [CONVERSATION.CREATE||CONVERSATION.UPDATE||CONVERSATION.ADD_ITEM||CONVERSATION.UPDATE_ITEM||USER.USER_UPDATED||USER.USER_SETTING_UPDATED]."
    ],
    "errorCode": "400"
}

Solution

  • Sorry, that is a bug in the endpoint, I added a fix which will be available with the next release.