---
title: "Webhook Handler"
method: POST
path: "EXPERIMENT_CREATED"
---

# Webhook Handler

`POST EXPERIMENT_CREATED` (webhook)

## Acknowledgement `200`

Successful Response

- ExperimentCreatedEvent
  - `type` 'EXPERIMENT_CREATED'
  - `payload` ExperimentRead, required
    - `name` string, required: Name of the experiment
    - `task_type` 'TAGGING' | 'METADATA_EXTRACTION' | 'ANNOTATION' | 'SENTENCE_ANNOTATION', required: What an LLM does with the documents (and what a prompt is for).
    - `sdoc_ids` integer[], required: IDs of the documents of the experiment
    - `code_ids` integer[], required: IDs of the codes of the experiment
    - `id` integer, required: ID of the experiment
    - `project_id` integer, required: Project the experiment belongs to
    - `gold_user_id` integer, nullable, required: ID of the gold annotator; null if the gold annotator was deleted, then the experiment keeps its runs and their scores, but cannot start runs or refresh scores
    - `created` string, date-time, required: Created timestamp of the experiment
    - `updated` string, date-time, required: Updated timestamp of the experiment
    - `runs` ExperimentRunRead[], required: The runs of the experiment, in the order of creation
      - `experiment_id` integer, required: ID of the experiment of the run
      - `name` string, required: Name of the run, unique per experiment; the run writes into the virtual user <experiment name>-<run name>
      - `prompt_version_id` integer, required: ID of the prompt version of the run: a version of the experiment's task whose codes equal the experiment's codes
      - `model` string, required: Large Language Model to run the prompt with
      - `id` integer, required: ID of the run
      - `sdoc_ids` integer[], required: IDs of the documents the run ran on
      - `virtual_user_id` integer, required: ID of the virtual user the run writes its annotations into
      - `user_id` integer, nullable, required: ID of the user who started the run
      - `status` 'queued' | 'finished' | 'failed' | 'started' | 'deferred' | 'scheduled' | 'stopped' | 'canceled', required
      - `job_id` string, nullable, required: ID of the job of the run
      - `started` string, date-time, nullable, required: When the job of the run started
      - `finished` string, date-time, nullable, required: When the job of the run ended
      - `scores` ExperimentRunScores[], required: The stored agreement with the gold annotator, one entry per scoring; empty until the run finished
        - `scoring` 'exact' | 'constituents', required: How the annotations of two annotators are split into scoring units.
        - `num_units` integer, required: Number of units that carry a code on at least one side
        - `total` AgreementScore, required
          - `true_positives` integer, required: Units that carry the code in the reference and in the comparison
          - `false_positives` integer, required: Units that carry the code in the comparison only
          - `false_negatives` integer, required: Units that carry the code in the reference only
          - `precision` number, nullable, required: TP / (TP + FP), null if there are no positive predictions
          - `recall` number, nullable, required: TP / (TP + FN), null if the reference has no positives
          - `f1` number, nullable, required: 2 TP / (2 TP + FP + FN), null if all counts are zero
        - `code_scores` AgreementCodeScore[], required: Scores per code, in the order of the experiment's codes
          - `true_positives` integer, required: Units that carry the code in the reference and in the comparison
          - `false_positives` integer, required: Units that carry the code in the comparison only
          - `false_negatives` integer, required: Units that carry the code in the reference only
          - `precision` number, nullable, required: TP / (TP + FP), null if there are no positive predictions
          - `recall` number, nullable, required: TP / (TP + FN), null if the reference has no positives
          - `f1` number, nullable, required: 2 TP / (2 TP + FP + FN), null if all counts are zero
          - `code_id` integer, required: ID of the Code the scores refer to
      - `scores_computed` string, date-time, nullable, required: When the stored agreement was computed
      - `created` string, date-time, required: Created timestamp of the run
      - `updated` string, date-time, required: Updated timestamp of the run

---

[API](https://skmtc.dev/uhh-lt/apis/discourse-analysis-tool-suite-api.md) - [All operations](https://skmtc.dev/uhh-lt/apis/discourse-analysis-tool-suite-api/llms.txt) - [OpenAPI document](https://skmtc.dev/uhh-lt/apis/discourse-analysis-tool-suite-api/revisions/580e0f51dd5b?raw)
