---
title: "Moderate Content"
method: POST
path: "/moderate/"
tags: ["moderation"]
---

# Moderate Content

`POST /moderate/`

## Request body

- VirtualAgentRequest — Request received by the API worker in the HTTP POST
  - `main_content` union, required
    - MediaMainContent
      - `external_id` string, required
      - `is_user_report` boolean
      - `task_type` string, nullable
      - `value` string, uri, required
      - `type` 'image' | 'video', required
    - TextMainContent
      - `external_id` string, required
      - `is_user_report` boolean
      - `task_type` string, nullable
      - `value` string, required
      - `type` 'text', required
      - `resource_url` string, nullable
      - `mime_type` 'text/markdown' | 'text/plain' | 'text/html', nullable — MIME type of the text content
    - DocumentMainContent
      - `external_id` string, required
      - `is_user_report` boolean
      - `task_type` string, nullable
      - `value` string, uri, required
      - `type` 'document', required
      - `mime_type` 'text/markdown' | 'text/plain' | 'text/html' | 'application/json' | 'application/pdf', required — MIME type of the document content
  - `classification_job_id` string, uuid, nullable
  - `attachments` union[], required
    - union — Attachment adding context to the main content
      - TextAttachment
        - `relation_to_main_media` string — Defines how the attachment is related to the main media, such as being a comment, a post, or a chat
        - `type` 'text'
        - `mime_type` 'text/markdown' | 'text/plain' | 'text/html', required — MIME type of the text content
        - `value` string, required — Text content, limited to 100 KiB
      - LinkAttachment
        - `relation_to_main_media` string — Defines how the attachment is related to the main media, such as being a comment, a post, or a chat
        - `type` 'link'
        - `value` string, uri, required
      - UserReportAttachment
        - `relation_to_main_media` string — Defines how the attachment is related to the main media, such as being a comment, a post, or a chat
        - `type` 'user_report'
        - `value` string, required
      - MetadataAttachment
        - `relation_to_main_media` string — Defines how the attachment is related to the main media, such as being a comment, a post, or a chat
        - `type` 'metadata'
        - `value` string, required
        - `mime_type` 'application/json', required — MIME type of the metadata content
      - ImageAttachment
        - `relation_to_main_media` string — Defines how the attachment is related to the main media, such as being a comment, a post, or a chat
        - `type` 'image'
        - `value` string, uri, required
        - `mime_type` string, nullable — MIME type of the image content
      - VideoAttachment
        - `relation_to_main_media` string — Defines how the attachment is related to the main media, such as being a comment, a post, or a chat
        - `type` 'video'
        - `value` string, uri, required
        - `mime_type` string, nullable — MIME type of the video content
  - `callback_url` string, uri, nullable

## Response `200`

Successful Response

- VirtualAgentQueuedResponse
  - `task_decision_id` string, required — The decision task ID, which has a 'decision' prefix
  - `moderation_job_id` string, required — The decision task ID, which has a 'decision' prefix. This field is deprecated and will be removed in future releases. You should use task_decision_id instead.
  - `external_id` string, nullable — Optional external ID as specified in the request
  - `classification_job_id` string, uuid, nullable, required — The job ID of the initial classification

## Other responses

- `404` — Not found
- `422` — Validation Error

---

[API](https://skmtc.net/unitary/apis/unitary-content-classification-api.md) · [All operations](https://skmtc.net/unitary/apis/unitary-content-classification-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/unitary/unitary-content-classification-api/revisions/5c100d640e2e/schema)
