> For the complete documentation index, see [llms.txt](https://docs.ngsurvey.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ngsurvey.com/fr/form-management/tasks/task-items/webhook.md).

# Webhooks

## ☁️ Que sont les Webhooks ?

Les Webhooks sont un excellent moyen d’envoyer le répondant et ses réponses à n’importe quel endpoint API HTTP dès que le répondant a été enregistré dans la base de données ngSurvey.

## 🔅 Propriétés des Webhooks

* **`URL du Webhook`** de l’API REST ou du serveur HTTP qui doit recevoir le post de la charge utile JSON du répondant.
* **`Modèle de transformation de la charge utile`** utilisé pour changer la structure de la charge utile JSON postée en une autre structure d’objet personnalisée.

## 🔤 Format du post

Le répondant et ses réponses sont envoyés sous forme de charge utile au format JSON en utilisant une requête HTTP POST. La charge utile JSON par défaut ci‑dessous peut être personnalisée à l’aide d’un [modèle de transformation de la charge utile](/fr/form-management/tasks/task-items/webhook/webhooks-payload-transform.md).

```javascript
{
  respondent: {
    id: string;
    surveyId: string;
    panelistId: string;
    contextUsername: string
    resumeUId: string;
    resumePageId: string;
    startDate: Date;
    voteDate: Date;
    iPSource: string;
    changeUID: string;
    progressSaveDate: Date;
    languageCode: string;
    timeToEnd: number;
    validated: boolean;        
  },
  answers: [{
      respondentId: string,
      value:string,
      answerId": string,
      answerText": string,
      questionId": string,
      questionAlias": string,
      questionText": string,
      sectionNumber": number
  }],
  visitedPages: [{
    id: string;
    respondentId: string;
    visitTime: string;
  }],
  dataAttributes: [{
    securityItemId: string;
    respondentId: string;
    attributeName: string;
    attributeValue: string;
  }],
  querystring: string
}
```

{% hint style="info" %}
Réponses chiffrées avec [restreint](/fr/data-encryption/data-classification/restricted.md) la classification des données sera envoyée sous forme de message PGP chiffré.&#x20;
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.ngsurvey.com/fr/form-management/tasks/task-items/webhook.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
