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

# Webhook Handler

`POST JOB_UPDATED` (webhook)

## Acknowledgement `200`

Successful Response

- JobUpdatedEvent
  - `type` 'JOB_UPDATED'
  - `payload` union, required
    - ClassifierJobRead
      - `job_id` string, required: RQ job ID
      - `job_type` 'classifier', required: Type of the job
      - `project_id` integer, required: Project ID associated with the job
      - `status` 'queued' | 'finished' | 'failed' | 'started' | 'deferred' | 'scheduled' | 'stopped' | 'canceled', required
      - `status_message` string, nullable: Status message
      - `current_step` integer, required: Current step in the job process
      - `steps` string[], required: Total number of steps in the job process
      - `input` ClassifierJobInput, required
        - `project_id` integer, required: Project ID associated with the job
        - `task_type` 'training' | 'evaluation' | 'inference', required
        - `model_type` 'document' | 'sentence' | 'span', required
        - `task_parameters` union, required: Specific parameters for the ClassifierJob w.r.t it's type
          - ClassifierTrainingParams
            - `tag_ids` integer[], required: IDs of document tags that select the dataset's source documents
            - `user_ids` integer[], required: IDs of annotators whose annotations should be used for sentence and span classification; ignored for document classification
            - `merge_children_into_parent` boolean, required: Whether annotations of descendant codes should count toward their selected parent code; only applies to sentence and span classification
            - `lora_enabled` boolean, required: Whether to train with a LoRA adapter
            - `lora_rank` integer, required: Rank of the LoRA update matrices
            - `lora_alpha` integer, required: Scaling factor applied to LoRA updates
            - `lora_dropout` number, required: Dropout probability applied inside LoRA layers
            - `freeze_base_model` boolean, required: Freeze pretrained base-model weights. Without LoRA, only classifier layers are trained; LoRA requires this setting
            - `epochs` integer, required: Number of training epochs
            - `batch_size` integer, required: Training batch size
            - `early_stopping` boolean, required: Whether to use early stopping
            - `early_stopping_patience` integer, required: Number of validation epochs without improvement before stopping
            - `train_test_split` number, required: Fraction of selected training data reserved for validation
            - `base_learning_rate` number, required: Peak learning rate for the pretrained base model
            - `head_learning_rate` number, required: Peak learning rate for the classifier head and, when enabled, LoRA adapter parameters
            - `warmup_fraction` number, required: Fraction of optimizer steps used to increase each learning rate linearly from zero to its peak before linear decay
            - `weight_decay` number, required: Weight decay
            - `dropout` number, required: Model dropout rate
            - `chunk_size` integer, required: Token chunk size
            - `precision` union, required: Lightning training precision
              - …
            - `averaging` 'micro' | 'macro', required
            - `task_type` 'training', required: The type of the Classifier Task
            - `classifier_name` string, required: Name of the model to train
            - `base_name` string, required: Name of the base model
            - `class_ids` integer[], required: List of class IDs to train on (tag or code)
          - ClassifierEvaluationParams
            - `tag_ids` integer[], required: IDs of document tags that select the dataset's source documents
            - `user_ids` integer[], required: IDs of annotators whose annotations should be used for sentence and span classification; ignored for document classification
            - `merge_children_into_parent` boolean, required: Whether annotations of descendant codes should count toward their selected parent code; only applies to sentence and span classification
            - `task_type` 'evaluation', required: The type of the Classifier Task
            - `classifier_id` integer, required: ID of the model to evaluate
            - `averaging` 'micro' | 'macro'
          - ClassifierInferenceParams
            - `task_type` 'inference', required: The type of the Classifier Task
            - `classifier_id` integer, required: ID of the model to use for inference
            - `sdoc_ids` integer[], required: List of SourceDocument IDs to apply the classifier on
            - `delete_existing_work` boolean, required: Delete existing span/sent annotations or tags before creating new ones
      - `output` ClassifierJobOutput
        - `task_type` 'training' | 'evaluation' | 'inference', required
        - `task_output` union, required: Specific outputs for the ClassifierJob w.r.t it's type
          - ClassifierTrainingOutput
            - `task_type` 'training', required: The type of the Classifier Task
            - `classifier` ClassifierRead, required
              - …
          - ClassifierEvaluationOutput
            - `task_type` 'evaluation', required: The type of the Classifier Task
            - `evaluation` ClassifierEvaluationRead, required
              - …
          - ClassifierInferenceOutput
            - `task_type` 'inference', required: The type of the Classifier Task
            - `result_statistics` ClassifierData[], required: Statistics of the inference results
              - …
            - `total_affected_docs` integer, required: Number of SourceDocuments successfully affected by the classifier
      - `created` string, date-time, required: Created timestamp of the job
      - `finished` string, date-time, nullable: Finished timestamp of the job
    - COTARefinementJobRead
      - `job_id` string, required: RQ job ID
      - `job_type` 'cota_refinement', required: Type of the job
      - `project_id` integer, required: Project ID associated with the job
      - `status` 'queued' | 'finished' | 'failed' | 'started' | 'deferred' | 'scheduled' | 'stopped' | 'canceled', required
      - `status_message` string, nullable: Status message
      - `current_step` integer, required: Current step in the job process
      - `steps` string[], required: Total number of steps in the job process
      - `input` COTARefinementJobInput, required
        - `project_id` integer, required: Project ID associated with the job
        - `cota_id` integer, required: ID of the COTA that is used in the COTARefinementJob
        - `hyperparams` COTARefinementHyperparameters
          - `cem_training_epochs` integer: Number of epochs to train the Concept Embedding Model
          - `cem_dimensions` integer: Number of dimensions of the Concept Embedding Model
      - `output` unknown
      - `created` string, date-time, required: Created timestamp of the job
      - `finished` string, date-time, nullable: Finished timestamp of the job
    - CrawlerJobRead
      - `job_id` string, required: RQ job ID
      - `job_type` 'crawler', required: Type of the job
      - `project_id` integer, required: Project ID associated with the job
      - `status` 'queued' | 'finished' | 'failed' | 'started' | 'deferred' | 'scheduled' | 'stopped' | 'canceled', required
      - `status_message` string, nullable: Status message
      - `current_step` integer, required: Current step in the job process
      - `steps` string[], required: Total number of steps in the job process
      - `input` CrawlerJobInput, required
        - `project_id` integer, required: The ID of the Project to import the crawled data.
        - `settings` ProcessingSettings, required
          - `extract_images` boolean, required: Whether to extract images from the documents
          - `pages_per_chunk` integer, required: Number of pages to chunk the documents into
          - `keyword_number` integer, required: Number of keywords to extract
          - `keyword_deduplication_threshold` number, required: Threshold for keyword deduplication (0.0 - 1.0)
          - `keyword_max_ngram_size` integer, required: Maximum n-gram size for keyword extraction
          - `language` 'auto' | 'de' | 'en' | 'it', required
          - `model` string, required: Large Language Model to use for processing
        - `urls` string[], required: List of URLs to crawl.
      - `output` CrawlerJobOutput
        - `crawled_data_zip` string, path, required
      - `created` string, date-time, required: Created timestamp of the job
      - `finished` string, date-time, nullable: Finished timestamp of the job
    - DuplicateFinderJobRead
      - `job_id` string, required: RQ job ID
      - `job_type` 'duplicate_finder', required: Type of the job
      - `project_id` integer, required: Project ID associated with the job
      - `status` 'queued' | 'finished' | 'failed' | 'started' | 'deferred' | 'scheduled' | 'stopped' | 'canceled', required
      - `status_message` string, nullable: Status message
      - `current_step` integer, required: Current step in the job process
      - `steps` string[], required: Total number of steps in the job process
      - `input` DuplicateFinderInput, required
        - `project_id` integer, required: Project ID associated with the job
        - `max_different_words` integer, required: Number of different words allowed between duplicates
        - `tag_id` integer, nullable, required: Tag id to filter source documents. If not provided, all source documents are considered.
      - `output` DuplicateFinderOutput
        - `duplicates` array[], required: List of found duplicate clusters
          - integer[]
      - `created` string, date-time, required: Created timestamp of the job
      - `finished` string, date-time, nullable: Finished timestamp of the job
    - ExportJobRead
      - `job_id` string, required: RQ job ID
      - `job_type` 'export', required: Type of the job
      - `project_id` integer, required: Project ID associated with the job
      - `status` 'queued' | 'finished' | 'failed' | 'started' | 'deferred' | 'scheduled' | 'stopped' | 'canceled', required
      - `status_message` string, nullable: Status message
      - `current_step` integer, required: Current step in the job process
      - `steps` string[], required: Total number of steps in the job process
      - `input` ExportJobInput, required
        - `project_id` integer, required: Project ID associated with the job
        - `export_job_type` 'ALL_DATA' | 'ALL_USERS' | 'ALL_SDOCS' | 'ALL_CODES' | 'ALL_TAGS' | 'ALL_FOLDERS' | 'ALL_SPAN_ANNOTATIONS' | 'ALL_SENTENCE_ANNOTATIONS' | 'ALL_BBOX_ANNOTATIONS' | 'ALL_MEMOS' | 'ALL_PROJECT_METADATA' | 'ALL_WHITEBOARDS' | 'ALL_TIMELINE_ANALYSES' | 'ALL_COTA' | 'SELECTED_SDOCS' | 'SELECTED_SPAN_ANNOTATIONS' | 'SELECTED_SENTENCE_ANNOTATIONS' | 'SELECTED_BBOX_ANNOTATIONS' | 'SELECTED_MEMOS' | 'SELECTED_WHITEBOARDS' | 'SELECTED_TIMELINE_ANALYSES' | 'SELECTED_COTA', required
        - `specific_export_job_parameters` union, required: Specific parameters for the export job w.r.t it's type
          - ExportSelectedSdocsParams
            - `export_job_type` 'SELECTED_SDOCS', required: The type of the export job (what to export)
            - `sdoc_ids` integer[], required: IDs of the source documents to export
          - ExportSelectedSpanAnnotationsParams
            - `export_job_type` 'SELECTED_SPAN_ANNOTATIONS', required: The type of the export job (what to export)
            - `span_annotation_ids` integer[], required: IDs of the span annotations to export
          - ExportSelectedSentenceAnnotationsParams
            - `export_job_type` 'SELECTED_SENTENCE_ANNOTATIONS', required: The type of the export job (what to export)
            - `sentence_annotation_ids` integer[], required: IDs of the sentence annotations to export
          - ExportSelectedBboxAnnotationsParams
            - `export_job_type` 'SELECTED_BBOX_ANNOTATIONS', required: The type of the export job (what to export)
            - `bbox_annotation_ids` integer[], required: IDs of the bbox annotations to export
          - ExportSelectedMemosParams
            - `export_job_type` 'SELECTED_MEMOS', required: The type of the export job (what to export)
            - `memo_ids` integer[], required: IDs of the memos to export
          - ExportSelectedWhiteboardsParams
            - `export_job_type` 'SELECTED_WHITEBOARDS', required: The type of the export job (what to export)
            - `whiteboard_ids` integer[], required: IDs of the whiteboards to export
          - ExportSelectedTimelineAnalysesParams
            - `export_job_type` 'SELECTED_TIMELINE_ANALYSES', required: The type of the export job (what to export)
            - `timeline_analysis_ids` integer[], required: IDs of the timeline analyses to export
          - ExportSelectedCotaParams
            - `export_job_type` 'SELECTED_COTA', required: The type of the export job (what to export)
            - `cota_ids` integer[], required: IDs of the cota to export
      - `output` ExportJobOutput
        - `results_url` string, nullable: URL to download the results when done.
      - `created` string, date-time, required: Created timestamp of the job
      - `finished` string, date-time, nullable: Finished timestamp of the job
    - ImportJobRead
      - `job_id` string, required: RQ job ID
      - `job_type` 'import', required: Type of the job
      - `project_id` integer, required: Project ID associated with the job
      - `status` 'queued' | 'finished' | 'failed' | 'started' | 'deferred' | 'scheduled' | 'stopped' | 'canceled', required
      - `status_message` string, nullable: Status message
      - `current_step` integer, required: Current step in the job process
      - `steps` string[], required: Total number of steps in the job process
      - `input` ImportJobInput, required
        - `project_id` integer, required: Project ID associated with the job
        - `import_job_type` 'PROJECT' | 'CODES' | 'TAGS' | 'FOLDERS' | 'BBOX_ANNOTATIONS' | 'SPAN_ANNOTATIONS' | 'SENTENCE_ANNOTATIONS' | 'USERS' | 'PROJECT_METADATA' | 'WHITEBOARDS' | 'TIMELINE_ANALYSES' | 'COTA' | 'MEMOS' | 'DOCUMENTS', required
        - `user_id` integer, required: ID of the User, who started the job.
        - `file_name` string, required: The name to the file that is used for the import job
      - `output` unknown
      - `created` string, date-time, required: Created timestamp of the job
      - `finished` string, date-time, nullable: Finished timestamp of the job
    - LlmAssistantJobRead
      - `job_id` string, required: RQ job ID
      - `job_type` 'llm_assistant', required: Type of the job
      - `project_id` integer, required: Project ID associated with the job
      - `status` 'queued' | 'finished' | 'failed' | 'started' | 'deferred' | 'scheduled' | 'stopped' | 'canceled', required
      - `status_message` string, nullable: Status message
      - `current_step` integer, required: Current step in the job process
      - `steps` string[], required: Total number of steps in the job process
      - `input` LLMAssistantJobInput, required
        - `project_id` integer, required: Project ID associated with the job
        - `task_type` 'TAGGING' | 'METADATA_EXTRACTION' | 'ANNOTATION' | 'SENTENCE_ANNOTATION', required
        - `specific_task_parameters` union, required: Specific parameters for the LLMAssistantJob w.r.t it's type
          - TaggingParams
            - `task_type` 'TAGGING', required: The type of the LLM Assistant task
            - `sdoc_ids` integer[], required: IDs of the source documents to analyse
            - `tag_ids` integer[], required: IDs of the tags to use for the document tagging
          - MetadataExtractionParams
            - `task_type` 'METADATA_EXTRACTION', required: The type of the LLM Assistant task
            - `sdoc_ids` integer[], required: IDs of the source documents to analyse
            - `project_metadata_ids` integer[], required: IDs of the project metadata to use for the metadata extraction
          - AnnotationParams
            - `task_type` 'ANNOTATION', required: The type of the LLM Assistant task
            - `sdoc_ids` integer[], required: IDs of the source documents to analyse
            - `code_ids` integer[], required: IDs of the codes to use for the annotation
            - `delete_existing_annotations` boolean: Delete existing annotations before creating new ones
          - SentenceAnnotationParams
            - `task_type` 'SENTENCE_ANNOTATION', required: The type of the LLM Assistant task
            - `sdoc_ids` integer[], required: IDs of the source documents to analyse
            - `code_ids` integer[], required: IDs of the codes to use for the sentence annotation
            - `delete_existing_annotations` boolean: Delete existing annotations before creating new ones
        - `approach_type` 'LLM_ZERO_SHOT' | 'LLM_FEW_SHOT', required
        - `specific_approach_parameters` union, required: Specific parameters for the approach w.r.t it's type
          - ZeroShotParams
            - `approach_type` 'LLM_ZERO_SHOT', required: The approach of the LLM Assistant job
            - `prompts` LLMAssistantPromptTemplates[], required: The prompt templates to use for the job
              - …
            - `model` string, required: Large Language Model to use for the job
          - FewShotParams
            - `approach_type` 'LLM_FEW_SHOT', required: The approach of the LLM Assistant job
            - `prompts` LLMAssistantPromptTemplates[], required: The prompt templates to use for the job
              - …
            - `model` string, required: Large Language Model to use for the job
        - `strategy_type` 'TAGGING_DEFAULT' | 'METADATA_DEFAULT' | 'SENTENCE_ANNOTATION_DEFAULT' | 'NER_INLINE_TAGS' | 'CONTEXT_ANCHORED_FUZZY_MATCHING', required
        - `specific_strategy_parameters` union, required: Specific parameters for the strategy w.r.t it's type
          - DefaultStrategyParams: Params for single-strategy tasks (tagging, metadata, sentence annotation).
            - `strategy_type` 'TAGGING_DEFAULT' | 'METADATA_DEFAULT' | 'SENTENCE_ANNOTATION_DEFAULT', required: The strategy to ground the LLM output in the document
          - NERInlineTagStrategyParams
            - `strategy_type` 'NER_INLINE_TAGS', required: The strategy to ground the LLM output in the document
          - FuzzyGroundingStrategyParams
            - `strategy_type` 'CONTEXT_ANCHORED_FUZZY_MATCHING', required: The strategy to ground the LLM output in the document
            - `fuzzy_threshold` number: Minimum similarity ratio (0-1) for fuzzy grounding of extracted quotes
            - `context_before_chars` integer: Number of context characters the LLM should provide before the quote
            - `context_after_chars` integer: Number of context characters the LLM should provide after the quote
            - `chunk_size_tokens` integer: Size of document chunks (in tokens) sent to the LLM
            - `chunk_overlap_tokens` integer: Overlap (in tokens) between consecutive chunks
      - `output` LLMAssistantJobOutput
        - `task_type` 'TAGGING' | 'METADATA_EXTRACTION' | 'ANNOTATION' | 'SENTENCE_ANNOTATION', required
        - `specific_task_result` union, required: Specific result for the LLMAssistantJob w.r.t it's type
          - TaggingLLMAssistantJobResult
            - `task_type` 'TAGGING', required: The type of the LLM Assistant task
            - `results` TaggingResult[], required: The tagging results, one per document
              - …
          - MetadataExtractionLLMAssistantJobResult
            - `task_type` 'METADATA_EXTRACTION', required: The type of the LLM Assistant task
            - `results` MetadataExtractionResult[], required: The metadata extraction results, one per document
              - …
          - AnnotationLLMAssistantJobResult
            - `task_type` 'ANNOTATION', required: The type of the LLM Assistant task
            - `results` AnnotationResult[], required: The annotation results, one per document
              - …
          - SentenceAnnotationLLMAssistantJobResult
            - `task_type` 'SENTENCE_ANNOTATION', required: The type of the LLM Assistant task
            - `results` SentenceAnnotationResult[], required: The sentence annotation results, one per document
              - …
      - `created` string, date-time, required: Created timestamp of the job
      - `finished` string, date-time, nullable: Finished timestamp of the job
    - MlJobRead
      - `job_id` string, required: RQ job ID
      - `job_type` 'ml', required: Type of the job
      - `project_id` integer, required: Project ID associated with the job
      - `status` 'queued' | 'finished' | 'failed' | 'started' | 'deferred' | 'scheduled' | 'stopped' | 'canceled', required
      - `status_message` string, nullable: Status message
      - `current_step` integer, required: Current step in the job process
      - `steps` string[], required: Total number of steps in the job process
      - `input` MLJobInput, required
        - `project_id` integer, required: The ID of the Project to analyse
        - `ml_job_type` 'QUOTATION_ATTRIBUTION' | 'TAG_RECOMMENDATION' | 'COREFERENCE_RESOLUTION' | 'DOCUMENT_EMBEDDING' | 'SENTENCE_EMBEDDING', required
        - `specific_ml_job_parameters` union, required: Specific parameters for the MLJob w.r.t it's type
          - QuotationAttributionParams
            - `ml_job_type` 'QUOTATION_ATTRIBUTION', required: The type of the MLJob
            - `recompute` boolean: Whether to recompute already processed documents
          - DocTagRecommendationParams
            - `ml_job_type` 'TAG_RECOMMENDATION', required: The type of the MLJob
            - `multi_class` boolean: Tags are mutually exclusive if `False`
            - `tag_ids` integer[]: Tags to consider. If empty, all tags applied to any document are considered.
            - `method` 'SIMPLE' | 'KNN' | 'EXCLUSIVE'
          - CoreferenceResolutionParams
            - `ml_job_type` 'COREFERENCE_RESOLUTION', required: The type of the MLJob
            - `recompute` boolean: Whether to recompute already processed documents
          - DocumentEmbeddingParams
            - `ml_job_type` 'DOCUMENT_EMBEDDING', required: The type of the MLJob
            - `recompute` boolean: Whether to recompute already processed documents
          - SentenceEmbeddingParams
            - `ml_job_type` 'SENTENCE_EMBEDDING', required: The type of the MLJob
            - `recompute` boolean: Whether to recompute already processed documents
      - `output` unknown
      - `created` string, date-time, required: Created timestamp of the job
      - `finished` string, date-time, nullable: Finished timestamp of the job
    - PerspectivesJobRead
      - `job_id` string, required: RQ job ID
      - `job_type` 'perspectives', required: Type of the job
      - `project_id` integer, required: Project ID associated with the job
      - `status` 'queued' | 'finished' | 'failed' | 'started' | 'deferred' | 'scheduled' | 'stopped' | 'canceled', required
      - `status_message` string, nullable: Status message
      - `current_step` integer, required: Current step in the job process
      - `steps` string[], required: Total number of steps in the job process
      - `input` PerspectivesJobInput, required
        - `project_id` integer, required: Project ID associated with the job
        - `aspect_id` integer, required: ID of the aspect associated with the PerspectivesJob. -1 if not applicable.
        - `perspectives_job_type` 'create_aspect' | 'add_missing_docs_to_aspect' | 'create_cluster_with_name' | 'create_cluster_with_sdocs' | 'remove_cluster' | 'merge_clusters' | 'split_cluster' | 'change_cluster' | 'refine_model' | 'reset_model' | 'recompute_cluster_title_and_description', required
        - `parameters` union, required: Parameters for the PerspectivesJob. The type depends on the PerspectivesJobType.
          - CreateAspectParams
            - `perspectives_job_type` 'create_aspect', required: Type of the PerspectivesJob
          - AddMissingDocsToAspectParams
            - `perspectives_job_type` 'add_missing_docs_to_aspect', required: Type of the PerspectivesJob
          - CreateClusterWithNameParams
            - `perspectives_job_type` 'create_cluster_with_name', required: Type of the PerspectivesJob
            - `create_dto` ClusterCreate, required
              - …
          - CreateClusterWithSdocsParams
            - `perspectives_job_type` 'create_cluster_with_sdocs', required: Type of the PerspectivesJob
            - `sdoc_ids` integer[], required: List of source document IDs to include in the cluster.
          - RemoveClusterParams
            - `perspectives_job_type` 'remove_cluster', required: Type of the PerspectivesJob
            - `cluster_id` integer, required: ID of the cluster to remove.
          - MergeClustersParams
            - `perspectives_job_type` 'merge_clusters', required: Type of the PerspectivesJob
            - `cluster_to_keep` integer, required: ID of the cluster to keep after merging.
            - `cluster_to_merge` integer, required: ID of the cluster to delete after merging.
          - SplitClusterParams
            - `perspectives_job_type` 'split_cluster', required: Type of the PerspectivesJob
            - `cluster_id` integer, required: ID of the cluster to split.
            - `split_into` integer, nullable, required: Number of clusters to split the cluster into. Must be greater than 1. If not set, the cluster will be split automatically.
          - ChangeClusterParams
            - `perspectives_job_type` 'change_cluster', required: Type of the PerspectivesJob
            - `sdoc_ids` integer[], required: List of source document IDs to change the cluster for.
            - `cluster_id` integer, required: ID of the cluster to change to. (-1 will be treated as 'removing' the documents / marking them as outliers)
          - RefineModelParams
            - `perspectives_job_type` 'refine_model', required: Type of the PerspectivesJob
          - ResetModelParams
            - `perspectives_job_type` 'reset_model', required: Type of the PerspectivesJob
          - RecomputeClusterTitleAndDescriptionParams
            - `perspectives_job_type` 'recompute_cluster_title_and_description', required: Type of the PerspectivesJob
            - `cluster_id` integer, required: ID of the cluster to recompute title and description for.
      - `output` unknown
      - `created` string, date-time, required: Created timestamp of the job
      - `finished` string, date-time, nullable: Finished timestamp of the job

---

[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/e498207e29f4?raw)
