---
title: "Retry Metadata Task"
method: POST
path: "/reviews/{review_id}/metadata-tasks/retry"
tags: ["reviews"]
---

# Retry Metadata Task

`POST /reviews/{review_id}/metadata-tasks/retry`

## Request

- Base URL: `https://api.kobaltlabs.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.kobaltlabs.com/reviews/{review_id}/metadata-tasks/retry`
- Auth: none declared

Retry the review's MetadataTask after its ReviewMetadataAgentRun failed.

This intentionally does *not* create a ReviewMetadataAgentRun itself —
dispatch_metadata_run_task (review_reporting_stage_wf) is the only place
one is ever created (see the module docstring on
backend/tasks/review_reporting_stage.py), which is what guarantees
metadata can't start ahead of the reporting it may depend on. This
endpoint only clears the failed run's agent_run_id, under the same
row lock dispatch_metadata_run_task uses for its own check-then-write, and
then re-dispatches the stage workflow so it re-evaluates the review from
scratch — which also means a retry picks up any ReviewReportingTask
created since the task was last dispatched, not just the metadata agent
in isolation. Only retryable once the prior run reached FAILED; a
pending or completed run has nothing to retry.

## Path parameters

- `review_id` string, uuid, required

## Response `200`

Successful Response

- MetadataTaskStatusResponse: The review's MetadataTask (singleton) returned by GET /reviews/{review_id}/metadata-tasks, joined to its agent run so the response carries run status, the before/after custom-field changeset for visualization, and the run's rationale (per-field explanations, proposed key dates, and truncated thinking).
  - `task_id` string, uuid, required
  - `instructions` string, required
  - `set_key_dates` boolean, required
  - `set_vendor_fields` boolean, required
  - `auto_apply_key_dates` boolean, required
  - `status` 'pending' | 'completed', required
  - `agent_run_id` string, uuid, nullable
  - `agent_run_status` 'pending' | 'running' | 'completed' | 'failed'
  - `custom_field_changeset` CustomFieldsChangeset
    - `before` CustomFieldWithValueOutput[], required
      - `definition` union, required
        - CustomFieldDropdownDefinition
          - `custom_field_id` string, uuid, nullable
          - `name` string, nullable
          - `description` string, nullable
          - `custom_field_type` 'INHERENT_RISK_LEVEL' | 'RESIDUAL_RISK_LEVEL' | 'CRITICALITY' | 'LIFECYCLE_STATUS'
          - `entity_type` 'VENDOR' | 'CANONICAL' | 'SERVICE' | 'ISSUE' | 'DISCLOSURE' | 'CONTRACT' | 'CONTACT'
          - `order_index` integer, nullable
          - `archived_at` string, date-time, nullable
          - `custom_field_definition_type` 'DROPDOWN'
          - `options` CustomFieldOptionDefinition[]
            - `option_id` string, uuid, nullable
            - `label` string, nullable
            - `hex_color` string, nullable
            - `order_index` integer, nullable
        - CustomFieldFreeTextDefinition
          - `custom_field_id` string, uuid, nullable
          - `name` string, nullable
          - `description` string, nullable
          - `custom_field_type` 'INHERENT_RISK_LEVEL' | 'RESIDUAL_RISK_LEVEL' | 'CRITICALITY' | 'LIFECYCLE_STATUS'
          - `entity_type` 'VENDOR' | 'CANONICAL' | 'SERVICE' | 'ISSUE' | 'DISCLOSURE' | 'CONTRACT' | 'CONTACT'
          - `order_index` integer, nullable
          - `archived_at` string, date-time, nullable
          - `custom_field_definition_type` 'FREE_TEXT'
        - CustomFieldNumberDefinition
          - `custom_field_id` string, uuid, nullable
          - `name` string, nullable
          - `description` string, nullable
          - `custom_field_type` 'INHERENT_RISK_LEVEL' | 'RESIDUAL_RISK_LEVEL' | 'CRITICALITY' | 'LIFECYCLE_STATUS'
          - `entity_type` 'VENDOR' | 'CANONICAL' | 'SERVICE' | 'ISSUE' | 'DISCLOSURE' | 'CONTRACT' | 'CONTACT'
          - `order_index` integer, nullable
          - `archived_at` string, date-time, nullable
          - `custom_field_definition_type` 'NUMBER'
        - CustomFieldDateDefinition
          - `custom_field_id` string, uuid, nullable
          - `name` string, nullable
          - `description` string, nullable
          - `custom_field_type` 'INHERENT_RISK_LEVEL' | 'RESIDUAL_RISK_LEVEL' | 'CRITICALITY' | 'LIFECYCLE_STATUS'
          - `entity_type` 'VENDOR' | 'CANONICAL' | 'SERVICE' | 'ISSUE' | 'DISCLOSURE' | 'CONTRACT' | 'CONTACT'
          - `order_index` integer, nullable
          - `archived_at` string, date-time, nullable
          - `custom_field_definition_type` 'DATE'
        - CustomFieldBooleanDefinition
          - `custom_field_id` string, uuid, nullable
          - `name` string, nullable
          - `description` string, nullable
          - `custom_field_type` 'INHERENT_RISK_LEVEL' | 'RESIDUAL_RISK_LEVEL' | 'CRITICALITY' | 'LIFECYCLE_STATUS'
          - `entity_type` 'VENDOR' | 'CANONICAL' | 'SERVICE' | 'ISSUE' | 'DISCLOSURE' | 'CONTRACT' | 'CONTACT'
          - `order_index` integer, nullable
          - `archived_at` string, date-time, nullable
          - `custom_field_definition_type` 'BOOLEAN'
        - CustomFieldMultiselectDefinition
          - `custom_field_id` string, uuid, nullable
          - `name` string, nullable
          - `description` string, nullable
          - `custom_field_type` 'INHERENT_RISK_LEVEL' | 'RESIDUAL_RISK_LEVEL' | 'CRITICALITY' | 'LIFECYCLE_STATUS'
          - `entity_type` 'VENDOR' | 'CANONICAL' | 'SERVICE' | 'ISSUE' | 'DISCLOSURE' | 'CONTRACT' | 'CONTACT'
          - `order_index` integer, nullable
          - `archived_at` string, date-time, nullable
          - `custom_field_definition_type` 'MULTISELECT'
          - `options` CustomFieldOptionDefinition[]
            - `option_id` string, uuid, nullable
            - `label` string, nullable
            - `hex_color` string, nullable
            - `order_index` integer, nullable
        - CustomFieldUserDefinition
          - `custom_field_id` string, uuid, nullable
          - `name` string, nullable
          - `description` string, nullable
          - `custom_field_type` 'INHERENT_RISK_LEVEL' | 'RESIDUAL_RISK_LEVEL' | 'CRITICALITY' | 'LIFECYCLE_STATUS'
          - `entity_type` 'VENDOR' | 'CANONICAL' | 'SERVICE' | 'ISSUE' | 'DISCLOSURE' | 'CONTRACT' | 'CONTACT'
          - `order_index` integer, nullable
          - `archived_at` string, date-time, nullable
          - `custom_field_definition_type` 'USER'
        - CustomFieldMultiUserDefinition
          - `custom_field_id` string, uuid, nullable
          - `name` string, nullable
          - `description` string, nullable
          - `custom_field_type` 'INHERENT_RISK_LEVEL' | 'RESIDUAL_RISK_LEVEL' | 'CRITICALITY' | 'LIFECYCLE_STATUS'
          - `entity_type` 'VENDOR' | 'CANONICAL' | 'SERVICE' | 'ISSUE' | 'DISCLOSURE' | 'CONTRACT' | 'CONTACT'
          - `order_index` integer, nullable
          - `archived_at` string, date-time, nullable
          - `custom_field_definition_type` 'MULTI_USER'
      - `value` union
        - CustomFieldDropdownValue
          - `custom_field_id` string, uuid, nullable
          - `custom_field_type` 'INHERENT_RISK_LEVEL' | 'RESIDUAL_RISK_LEVEL' | 'CRITICALITY' | 'LIFECYCLE_STATUS'
          - `name` string, nullable
          - `type` 'DROPDOWN'
          - `option_id` string, uuid, nullable
          - `label` string, nullable
          - `hex_color` string, nullable
          - `order_index` integer, nullable
        - CustomFieldFreeTextValue
          - `custom_field_id` string, uuid, nullable
          - `custom_field_type` 'INHERENT_RISK_LEVEL' | 'RESIDUAL_RISK_LEVEL' | 'CRITICALITY' | 'LIFECYCLE_STATUS'
          - `name` string, nullable
          - `type` 'FREE_TEXT'
          - `text_value` string, nullable
        - CustomFieldNumberValue
          - `custom_field_id` string, uuid, nullable
          - `custom_field_type` 'INHERENT_RISK_LEVEL' | 'RESIDUAL_RISK_LEVEL' | 'CRITICALITY' | 'LIFECYCLE_STATUS'
          - `name` string, nullable
          - `type` 'NUMBER'
          - `number_value` integer, nullable
        - CustomFieldDateValue
          - `custom_field_id` string, uuid, nullable
          - `custom_field_type` 'INHERENT_RISK_LEVEL' | 'RESIDUAL_RISK_LEVEL' | 'CRITICALITY' | 'LIFECYCLE_STATUS'
          - `name` string, nullable
          - `type` 'DATE'
          - `date_value` string, date, nullable
        - CustomFieldBooleanValue
          - `custom_field_id` string, uuid, nullable
          - `custom_field_type` 'INHERENT_RISK_LEVEL' | 'RESIDUAL_RISK_LEVEL' | 'CRITICALITY' | 'LIFECYCLE_STATUS'
          - `name` string, nullable
          - `type` 'BOOLEAN'
          - `boolean_value` boolean, nullable
        - CustomFieldMultiselectValue
          - `custom_field_id` string, uuid, nullable
          - `custom_field_type` 'INHERENT_RISK_LEVEL' | 'RESIDUAL_RISK_LEVEL' | 'CRITICALITY' | 'LIFECYCLE_STATUS'
          - `name` string, nullable
          - `type` 'MULTISELECT'
          - `selected_options` CustomFieldMultiselectOptionValue[]
            - `option_id` string, uuid, nullable
            - `label` string, nullable
            - `hex_color` string, nullable
            - `order_index` integer, nullable
        - CustomFieldUserValue
          - `custom_field_id` string, uuid, nullable
          - `custom_field_type` 'INHERENT_RISK_LEVEL' | 'RESIDUAL_RISK_LEVEL' | 'CRITICALITY' | 'LIFECYCLE_STATUS'
          - `name` string, nullable
          - `type` 'USER'
          - `user_id` string, uuid, nullable
          - `user_first_name` string, nullable
          - `user_last_name` string, nullable
          - `email_address` string, nullable
        - CustomFieldMultiUserValue
          - `custom_field_id` string, uuid, nullable
          - `custom_field_type` 'INHERENT_RISK_LEVEL' | 'RESIDUAL_RISK_LEVEL' | 'CRITICALITY' | 'LIFECYCLE_STATUS'
          - `name` string, nullable
          - `type` 'MULTI_USER'
          - `selected_users` CustomFieldUserRef[]
            - `user_id` string, uuid, nullable
            - `user_first_name` string, nullable
            - `user_last_name` string, nullable
            - `email_address` string, nullable
    - `after` CustomFieldWithValueOutput[], required
      - `definition` union, required
        - CustomFieldDropdownDefinition
          - `custom_field_id` string, uuid, nullable
          - `name` string, nullable
          - `description` string, nullable
          - `custom_field_type` 'INHERENT_RISK_LEVEL' | 'RESIDUAL_RISK_LEVEL' | 'CRITICALITY' | 'LIFECYCLE_STATUS'
          - `entity_type` 'VENDOR' | 'CANONICAL' | 'SERVICE' | 'ISSUE' | 'DISCLOSURE' | 'CONTRACT' | 'CONTACT'
          - `order_index` integer, nullable
          - `archived_at` string, date-time, nullable
          - `custom_field_definition_type` 'DROPDOWN'
          - `options` CustomFieldOptionDefinition[]
            - `option_id` string, uuid, nullable
            - `label` string, nullable
            - `hex_color` string, nullable
            - `order_index` integer, nullable
        - CustomFieldFreeTextDefinition
          - `custom_field_id` string, uuid, nullable
          - `name` string, nullable
          - `description` string, nullable
          - `custom_field_type` 'INHERENT_RISK_LEVEL' | 'RESIDUAL_RISK_LEVEL' | 'CRITICALITY' | 'LIFECYCLE_STATUS'
          - `entity_type` 'VENDOR' | 'CANONICAL' | 'SERVICE' | 'ISSUE' | 'DISCLOSURE' | 'CONTRACT' | 'CONTACT'
          - `order_index` integer, nullable
          - `archived_at` string, date-time, nullable
          - `custom_field_definition_type` 'FREE_TEXT'
        - CustomFieldNumberDefinition
          - `custom_field_id` string, uuid, nullable
          - `name` string, nullable
          - `description` string, nullable
          - `custom_field_type` 'INHERENT_RISK_LEVEL' | 'RESIDUAL_RISK_LEVEL' | 'CRITICALITY' | 'LIFECYCLE_STATUS'
          - `entity_type` 'VENDOR' | 'CANONICAL' | 'SERVICE' | 'ISSUE' | 'DISCLOSURE' | 'CONTRACT' | 'CONTACT'
          - `order_index` integer, nullable
          - `archived_at` string, date-time, nullable
          - `custom_field_definition_type` 'NUMBER'
        - CustomFieldDateDefinition
          - `custom_field_id` string, uuid, nullable
          - `name` string, nullable
          - `description` string, nullable
          - `custom_field_type` 'INHERENT_RISK_LEVEL' | 'RESIDUAL_RISK_LEVEL' | 'CRITICALITY' | 'LIFECYCLE_STATUS'
          - `entity_type` 'VENDOR' | 'CANONICAL' | 'SERVICE' | 'ISSUE' | 'DISCLOSURE' | 'CONTRACT' | 'CONTACT'
          - `order_index` integer, nullable
          - `archived_at` string, date-time, nullable
          - `custom_field_definition_type` 'DATE'
        - CustomFieldBooleanDefinition
          - `custom_field_id` string, uuid, nullable
          - `name` string, nullable
          - `description` string, nullable
          - `custom_field_type` 'INHERENT_RISK_LEVEL' | 'RESIDUAL_RISK_LEVEL' | 'CRITICALITY' | 'LIFECYCLE_STATUS'
          - `entity_type` 'VENDOR' | 'CANONICAL' | 'SERVICE' | 'ISSUE' | 'DISCLOSURE' | 'CONTRACT' | 'CONTACT'
          - `order_index` integer, nullable
          - `archived_at` string, date-time, nullable
          - `custom_field_definition_type` 'BOOLEAN'
        - CustomFieldMultiselectDefinition
          - `custom_field_id` string, uuid, nullable
          - `name` string, nullable
          - `description` string, nullable
          - `custom_field_type` 'INHERENT_RISK_LEVEL' | 'RESIDUAL_RISK_LEVEL' | 'CRITICALITY' | 'LIFECYCLE_STATUS'
          - `entity_type` 'VENDOR' | 'CANONICAL' | 'SERVICE' | 'ISSUE' | 'DISCLOSURE' | 'CONTRACT' | 'CONTACT'
          - `order_index` integer, nullable
          - `archived_at` string, date-time, nullable
          - `custom_field_definition_type` 'MULTISELECT'
          - `options` CustomFieldOptionDefinition[]
            - `option_id` string, uuid, nullable
            - `label` string, nullable
            - `hex_color` string, nullable
            - `order_index` integer, nullable
        - CustomFieldUserDefinition
          - `custom_field_id` string, uuid, nullable
          - `name` string, nullable
          - `description` string, nullable
          - `custom_field_type` 'INHERENT_RISK_LEVEL' | 'RESIDUAL_RISK_LEVEL' | 'CRITICALITY' | 'LIFECYCLE_STATUS'
          - `entity_type` 'VENDOR' | 'CANONICAL' | 'SERVICE' | 'ISSUE' | 'DISCLOSURE' | 'CONTRACT' | 'CONTACT'
          - `order_index` integer, nullable
          - `archived_at` string, date-time, nullable
          - `custom_field_definition_type` 'USER'
        - CustomFieldMultiUserDefinition
          - `custom_field_id` string, uuid, nullable
          - `name` string, nullable
          - `description` string, nullable
          - `custom_field_type` 'INHERENT_RISK_LEVEL' | 'RESIDUAL_RISK_LEVEL' | 'CRITICALITY' | 'LIFECYCLE_STATUS'
          - `entity_type` 'VENDOR' | 'CANONICAL' | 'SERVICE' | 'ISSUE' | 'DISCLOSURE' | 'CONTRACT' | 'CONTACT'
          - `order_index` integer, nullable
          - `archived_at` string, date-time, nullable
          - `custom_field_definition_type` 'MULTI_USER'
      - `value` union
        - CustomFieldDropdownValue
          - `custom_field_id` string, uuid, nullable
          - `custom_field_type` 'INHERENT_RISK_LEVEL' | 'RESIDUAL_RISK_LEVEL' | 'CRITICALITY' | 'LIFECYCLE_STATUS'
          - `name` string, nullable
          - `type` 'DROPDOWN'
          - `option_id` string, uuid, nullable
          - `label` string, nullable
          - `hex_color` string, nullable
          - `order_index` integer, nullable
        - CustomFieldFreeTextValue
          - `custom_field_id` string, uuid, nullable
          - `custom_field_type` 'INHERENT_RISK_LEVEL' | 'RESIDUAL_RISK_LEVEL' | 'CRITICALITY' | 'LIFECYCLE_STATUS'
          - `name` string, nullable
          - `type` 'FREE_TEXT'
          - `text_value` string, nullable
        - CustomFieldNumberValue
          - `custom_field_id` string, uuid, nullable
          - `custom_field_type` 'INHERENT_RISK_LEVEL' | 'RESIDUAL_RISK_LEVEL' | 'CRITICALITY' | 'LIFECYCLE_STATUS'
          - `name` string, nullable
          - `type` 'NUMBER'
          - `number_value` integer, nullable
        - CustomFieldDateValue
          - `custom_field_id` string, uuid, nullable
          - `custom_field_type` 'INHERENT_RISK_LEVEL' | 'RESIDUAL_RISK_LEVEL' | 'CRITICALITY' | 'LIFECYCLE_STATUS'
          - `name` string, nullable
          - `type` 'DATE'
          - `date_value` string, date, nullable
        - CustomFieldBooleanValue
          - `custom_field_id` string, uuid, nullable
          - `custom_field_type` 'INHERENT_RISK_LEVEL' | 'RESIDUAL_RISK_LEVEL' | 'CRITICALITY' | 'LIFECYCLE_STATUS'
          - `name` string, nullable
          - `type` 'BOOLEAN'
          - `boolean_value` boolean, nullable
        - CustomFieldMultiselectValue
          - `custom_field_id` string, uuid, nullable
          - `custom_field_type` 'INHERENT_RISK_LEVEL' | 'RESIDUAL_RISK_LEVEL' | 'CRITICALITY' | 'LIFECYCLE_STATUS'
          - `name` string, nullable
          - `type` 'MULTISELECT'
          - `selected_options` CustomFieldMultiselectOptionValue[]
            - `option_id` string, uuid, nullable
            - `label` string, nullable
            - `hex_color` string, nullable
            - `order_index` integer, nullable
        - CustomFieldUserValue
          - `custom_field_id` string, uuid, nullable
          - `custom_field_type` 'INHERENT_RISK_LEVEL' | 'RESIDUAL_RISK_LEVEL' | 'CRITICALITY' | 'LIFECYCLE_STATUS'
          - `name` string, nullable
          - `type` 'USER'
          - `user_id` string, uuid, nullable
          - `user_first_name` string, nullable
          - `user_last_name` string, nullable
          - `email_address` string, nullable
        - CustomFieldMultiUserValue
          - `custom_field_id` string, uuid, nullable
          - `custom_field_type` 'INHERENT_RISK_LEVEL' | 'RESIDUAL_RISK_LEVEL' | 'CRITICALITY' | 'LIFECYCLE_STATUS'
          - `name` string, nullable
          - `type` 'MULTI_USER'
          - `selected_users` CustomFieldUserRef[]
            - `user_id` string, uuid, nullable
            - `user_first_name` string, nullable
            - `user_last_name` string, nullable
            - `email_address` string, nullable
  - `field_explanations` MetadataFieldExplanation[]
    - `custom_field_id` string, uuid, required
    - `explanation` string, required
  - `proposed_key_dates` ProposedKeyDate[]
    - `key_date_type` 'termination_notice' | 'renewal' | 'review' | 'other', required
    - `date` string, date, required
    - `label` string, required
    - `explanation` string, nullable
    - `replaces_key_date_id` string, uuid, nullable
    - `interval_years` integer
  - `thinking` string, nullable
  - `summary` string, nullable

## Other responses

- `422`: Validation Error

## Changes

- **2026-09-08** `9fe2fb8a3631`: 16 info
  - added the optional property `custom_field_changeset/anyOf[subschema #1: CustomFieldsChangeset]/after/items/definition/anyOf[subschema #1: CustomFieldDropdownDefinition]/archived_at` to the response with the `200` status
  - added the optional property `custom_field_changeset/anyOf[subschema #1: CustomFieldsChangeset]/after/items/definition/anyOf[subschema #2: CustomFieldFreeTextDefinition]/archived_at` to the response with the `200` status
  - added the optional property `custom_field_changeset/anyOf[subschema #1: CustomFieldsChangeset]/after/items/definition/anyOf[subschema #3: CustomFieldNumberDefinition]/archived_at` to the response with the `200` status
  - added the optional property `custom_field_changeset/anyOf[subschema #1: CustomFieldsChangeset]/after/items/definition/anyOf[subschema #4: CustomFieldDateDefinition]/archived_at` to the response with the `200` status
  - …12 more

[Operation history](https://skmtc.dev/kobaltlabs/apis/fastapi/changes/reviews/:review_id/metadata-tasks/retry/post.md)

---

[API](https://skmtc.dev/kobaltlabs/apis/fastapi.md) - [All operations](https://skmtc.dev/kobaltlabs/apis/fastapi/llms.txt) - [OpenAPI document](https://skmtc.dev/kobaltlabs/apis/fastapi/revisions/8587332d5e43?raw)
