# Surveys: submission.created

URL: https://www.digia.tech/docs/developer/reference/webhooks/submission-created

The submission.created webhook: the payload Digia sends when the app submits a survey answer.

Digia sends `submission.created` when the app sends a submission, such as a survey answer. Tick **Submission created** in the webhook settings to receive it.

Setup, headers and signature check are onWebhooks .

## Payload

```json
{
  "event": "submission.created",
  "test": false,
  "submission": {
    "submissionId": "6745a1c29f1e2b3c4d5e6f70",
    "projectId": "6712f0a19c3b4d5e6f708192",
    "campaignKey": "nps-survey",
    "deviceId": "8f3c2a1e-4b5d-4e6f-9a7b-1c2d3e4f5a6b",
    "userId": "user-123",
    "submissionType": "survey",
    "payload": {
      "templateVersion": "v1",
      "completion": { "answeredCount": 4, "totalCount": 5 },
      "responses": [
        {
          "blockId": "b_mi4k8z3qx7k2p",
          "blockType": "nps",
          "title": "How likely are you to recommend us to a friend?",
          "value": 9
        },
        {
          "blockId": "b_mi4k8z9d2fh0w",
          "blockType": "single_select",
          "title": "What do you use the app for most?",
          "value": "opt_mi4k8za1k9f3c",
          "valueLabel": "Ordering medicines",
          "comment": "Mostly for my parents"
        },
        {
          "blockId": "b_mi4k8zf7m3q8e",
          "blockType": "multi_select",
          "title": "Which features do you use?",
          "value": ["opt_mi4k8zg2p7d1x", "opt_mi4k8zg5w0b6r"],
          "valueLabel": ["Refill reminders", "Lab reports"]
        },
        {
          "blockId": "b_mi4k8zk8t4n2j",
          "blockType": "long_text",
          "title": "Anything we can do better?",
          "value": "Delivery tracking could be clearer."
        }
      ]
    },
    "computed": {
      "durationMs": 42150,
      "npsBucket": "promoter"
    }
  },
  "occurredAt": "2026-12-02T10:15:00.123Z"
}
```

| Field | Meaning | `test` | Always `false` . Survey tests in the dashboard do not send this event. | `occurredAt` | When the user finished, in ISO 8601 UTC. | `submission.submissionId` | The ID of the submission. | `submission.projectId` | The ID of your project. | `submission.campaignKey` | The key of the campaign, as shown in the dashboard. | `submission.deviceId` | The device that sent it. | `submission.userId` | The user ID your app set with `setUserId` , or `null` . | `submission.submissionType` | `survey` , `quiz` , `spin_wheel` , `scratch_card` or `generic` . | `submission.payload` | The answers. See below. | `submission.computed` | Values worked out from the answers. See below. 

## Survey answers

| Field | Meaning | `payload.templateVersion` | The version of this shape. Now `v1` . | `payload.completion.answeredCount` | How many questions the user answered. | `payload.completion.totalCount` | How many questions the survey has. Welcome and info screens are not counted. | `payload.responses` | One item per answered question, in survey order. Skipped questions are left out. | `computed.durationMs` | How long the user took to finish, in milliseconds. | `computed.npsBucket` | `promoter` (9 to 10), `passive` (7 to 8) or `detractor` (0 to 6). Only sent when the survey has an NPS question. 

Each item in `responses` :

| Field | Meaning | `blockId` | The ID of the question, such as `b_mi4k8z3qx7k2p` . Digia makes it when the question is added, and it stays the same when you edit the question. It is random, so you cannot choose or predict it. A copied question gets a new one. | `blockType` | The kind of question, such as `nps` , `rating` , `single_select` , `multi_select` , `short_text` , `long_text` , `number` , `email` or `date` . | `title` | The question text the user saw. | `value` | The answer. A number for `nps` , `rating` and `number` . An option ID, such as `opt_mi4k8za1k9f3c` , for single choice. A list of option IDs for multiple choice. Text for everything else. | `valueLabel` | Choice questions only. The option text the user saw, or a list of them. | `comment` | Only when the user added a comment. 

Use `blockId` and `value` in your logic. Use `title` and `valueLabel` for display, since you can edit them later in the dashboard.
