{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/metricool/json-schema/metricool-approval-tasks-decision-request-schema.json",
  "title": "ApprovalTasksDecisionRequest",
  "description": "A reviewer's approve/reject decision applied to one or more of their tasks, possibly across several brands.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/metricool-approval-task-api-service-api-openapi.yml#/components/schemas/ApprovalTasksDecisionRequest",
  "required": [
    "posts",
    "status"
  ],
  "type": "object",
  "properties": {
    "posts": {
      "maxItems": 100,
      "minItems": 0,
      "type": "array",
      "description": "The posts to decide on. One target for a single action, several for bulk. At most 100 targets per call: a longer list is rejected with a 400 rather than truncated, so a decision is never applied to only part of what was sent. A target missing its brand or post id is rejected the same way, for the same reason.",
      "items": {
        "$ref": "#/$defs/ApprovalTaskDecisionTarget"
      }
    },
    "status": {
      "minLength": 1,
      "type": "string",
      "description": "The decision, applied to every listed post.",
      "enum": [
        "approved",
        "rejected"
      ]
    },
    "note": {
      "type": "string",
      "description": "Optional note; used only when rejecting. Attached as a post note and included in the rejection email to each post's creator."
    }
  },
  "$defs": {
    "ApprovalTaskDecisionTarget": {
      "required": [
        "blogId",
        "postId"
      ],
      "type": "object",
      "properties": {
        "blogId": {
          "type": "integer",
          "description": "Id of the brand the post belongs to.",
          "format": "int32"
        },
        "postId": {
          "type": "integer",
          "description": "Id of the post.",
          "format": "int32"
        }
      },
      "description": "One post to decide on, as it appears on the task list."
    }
  }
}