Surveys webhooks

The survey answers webhook payload contains the following properties.

Because all texts in the surveys can be localized, we don't send actual text values, but question and answer IDs. You can find the IDs on the Developer info screen.

Payload

{
  "type": "webhook:newsurveyanswer",
  "data": {
    "projectCode": "YOUR WORKSPACE CODE",
    "surveyId": "SURVEY ID - GUID",
    "authorName": "John Smith", // if provided to PF
    "authorEmail": "john@example.com", // if provided to PF
    "authorUsername": "username",
	"answers": [
      { // QUESTION TYPE - EMOTICONS
        "questionId": "e6bd895a-09a4-4bbc-981e-57cadb0a5135",
        "answer": "๐Ÿ˜„"
      },
      { // QUESTION TYPE - NPS
        "questionId": "bf06b03a-6898-4553-82ba-045cd2b6a3ac",
        "answer": 9
      },
      { // QUESTION TYPE - NUMERIC SCALE
        "questionId": "570175a5-326d-4f77-9df9-ec5c2163a697",
        "answer": 1
      },
      { // QUESTION TYPE - SINGLE_LINE TEXT
        "questionId": "0391b74c-0c89-4edc-801b-90cc5b0f10a4",
        "answer": "This is awesome!"
      },
      { // QUESTION TYPE - MULTI-LINE TEXT
        "questionId": "280df468-c018-4513-8f25-5131c94e5499",
        "answer": "Dear authors,\nI want to thank you! You have the best support team ever!!!\n\nYour customer Mike"
      },
      { // QUESTION TYPE - MULTIPLE CHOICE
        "questionId": "3757cbd3-fb32-41e1-9bf0-d19e11e14033",
        "answer": [
          "fe67dc10-f61c-4ceb-8141-816686c38d27",
          "6f34299f-8be1-414d-b559-eff2fb5646b3"
        ]
      },
      { // QUESTION TYPE - SINGLE CHOICE
        "questionId": "70306ce8-abe2-4fab-92cd-c5bd841fd62d",
        "answer": "34cca511-9f3c-4592-b76d-450a2ec2b3a6"
      },
      { // QUESTION TYPE - MESSAGE TO USERS (no user input possible here)
        "questionId": "59c72947-4c50-40fe-9988-aa16ad12a9e0"
      },
      { // QUESTION TYPE - MULTIPLE CHOICE with _other_ option selected
        "questionId": "1022c827-81ca-4e48-b841-161d4fd94974",
        "answer": [
          "ffea37de-9b5e-4bde-943b-89337a35540c",
          "other"
        ],
        "other": "This is simply the best option."
      },
      { // QUESTION TYPE - SINGLE CHOICE with _other_ option selected
        "questionId": "4eb0d384-9519-4c0e-b764-8f439e38d8fb",
        "answer": "other",
        "other": "Single choice is not enugh!\n\n\n\n\nTrust me!"
      }
    ]
  }
}