{
  "openapi": "3.1.2",
  "info": {
    "title": "Postio REST API",
    "version": "0.1.0",
    "description": "PRD §7.6의 경로·권한, 서비스 공개 반환형, 공통 오류 원본에서 생성한 개발 계약입니다. 실제 계정·배포 환경과 SDK 생성 결과는 아직 검증 중입니다."
  },
  "servers": [
    {
      "url": "/api/v1"
    }
  ],
  "paths": {
    "/accounts": {
      "get": {
        "summary": "연결된 채널 목록",
        "operationId": "get_accounts",
        "security": [
          {
            "bearerApiKey": []
          }
        ],
        "x-required-scope": "accounts:read",
        "x-response-schema-complete": true,
        "parameters": [
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "description": "API 키가 여러 워크스페이스에 속하면 필수입니다.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "요청이 완료됐습니다.",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "accounts": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Account"
                      }
                    }
                  },
                  "required": [
                    "accounts"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "워크스페이스의 분당 REST 요청 한도를 넘었습니다.",
            "headers": {
              "Retry-After": {
                "description": "다시 시도할 때까지 기다릴 양의 정수 초",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "공통 오류",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/accounts/{id}": {
      "delete": {
        "summary": "채널 연결 해제 (기록은 남김)",
        "operationId": "delete_accounts_id",
        "security": [
          {
            "bearerApiKey": []
          }
        ],
        "x-required-scope": "accounts:write",
        "x-response-schema-complete": true,
        "parameters": [
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "description": "API 키가 여러 워크스페이스에 속하면 필수입니다.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Postio의 로컬 연결과 저장 토큰을 해제했습니다. 공급자 앱 권한 취소 완료를 뜻하지 않습니다. 채널 설정에서 앱 권한을 별도로 확인해 주세요. PRD §7.10.",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              },
              "X-Provider-Revocation": {
                "description": "not_attempted는 외부 취소 미시도, unconfirmed는 공급자 정책 결과 확인 불가입니다. 로컬 해제는 모두 완료됩니다.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "not_attempted",
                    "unconfirmed"
                  ]
                }
              },
              "X-Provider-Revocation-Reason": {
                "description": "not_attempted일 때만 반환합니다. Facebook 앱 전체 승인 취소는 차단하며 Instagram Login·Threads는 공식 지원 미확인입니다.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "app_wide_grant",
                    "not_verified",
                    "not_configured",
                    "already_disconnected"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "워크스페이스의 분당 REST 요청 한도를 넘었습니다.",
            "headers": {
              "Retry-After": {
                "description": "다시 시도할 때까지 기다릴 양의 정수 초",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "공통 오류",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/platforms": {
      "get": {
        "summary": "채널 규격 (레지스트리)",
        "operationId": "get_platforms",
        "security": [
          {
            "bearerApiKey": []
          }
        ],
        "x-required-scope": "accounts:read",
        "x-response-schema-complete": true,
        "parameters": [
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "description": "API 키가 여러 워크스페이스에 속하면 필수입니다.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "요청이 완료됐습니다.",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "platforms": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Platform"
                      }
                    }
                  },
                  "required": [
                    "platforms"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "워크스페이스의 분당 REST 요청 한도를 넘었습니다.",
            "headers": {
              "Retry-After": {
                "description": "다시 시도할 때까지 기다릴 양의 정수 초",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "공통 오류",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/posts/validate": {
      "post": {
        "summary": "미리 검사 (올리지 않음)",
        "operationId": "post_posts_validate",
        "security": [
          {
            "bearerApiKey": []
          }
        ],
        "x-required-scope": "posts:read",
        "x-response-schema-complete": true,
        "parameters": [
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "description": "API 키가 여러 워크스페이스에 속하면 필수입니다.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "요청이 완료됐습니다.",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "valid": {
                      "const": true
                    },
                    "scheduledAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "targets": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "accountId": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "platform": {
                            "$ref": "#/components/schemas/PlatformId"
                          }
                        },
                        "required": [
                          "accountId",
                          "platform"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "valid",
                    "scheduledAt",
                    "targets"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "워크스페이스의 분당 REST 요청 한도를 넘었습니다.",
            "headers": {
              "Retry-After": {
                "description": "다시 시도할 때까지 기다릴 양의 정수 초",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "공통 오류",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "content": {
                    "type": "string"
                  },
                  "accountIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "minItems": 1,
                    "uniqueItems": true
                  },
                  "mediaIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "uniqueItems": true
                  },
                  "options": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "object",
                      "properties": {
                        "content": {
                          "type": "string"
                        },
                        "title": {
                          "type": "string"
                        },
                        "privacy": {
                          "type": "string",
                          "enum": [
                            "public",
                            "unlisted",
                            "private"
                          ]
                        },
                        "tags": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      },
                      "required": [],
                      "additionalProperties": false
                    }
                  },
                  "scheduledAt": {
                    "type": "string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "content",
                  "accountIds"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/posts": {
      "post": {
        "summary": "발행·예약·임시 저장. `Idempotency-Key` 헤더 권장",
        "operationId": "post_posts",
        "security": [
          {
            "bearerApiKey": []
          }
        ],
        "x-required-scope": "posts:write",
        "x-response-schema-complete": true,
        "parameters": [
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "description": "API 키가 여러 워크스페이스에 속하면 필수입니다.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            }
          }
        ],
        "responses": {
          "202": {
            "description": "요청을 접수했습니다.",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostCreatedResult"
                }
              }
            }
          },
          "429": {
            "description": "워크스페이스의 분당 REST 요청 한도를 넘었습니다.",
            "headers": {
              "Retry-After": {
                "description": "다시 시도할 때까지 기다릴 양의 정수 초",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "공통 오류",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "content": {
                    "type": "string"
                  },
                  "accountIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "minItems": 1,
                    "uniqueItems": true
                  },
                  "mediaIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "uniqueItems": true
                  },
                  "options": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "object",
                      "properties": {
                        "content": {
                          "type": "string"
                        },
                        "title": {
                          "type": "string"
                        },
                        "privacy": {
                          "type": "string",
                          "enum": [
                            "public",
                            "unlisted",
                            "private"
                          ]
                        },
                        "tags": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      },
                      "required": [],
                      "additionalProperties": false
                    }
                  },
                  "scheduledAt": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "queueSlot": {
                    "type": "boolean"
                  },
                  "isDraft": {
                    "type": "boolean"
                  },
                  "force": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "content",
                  "accountIds"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      },
      "get": {
        "summary": "발행 기록",
        "operationId": "get_posts",
        "security": [
          {
            "bearerApiKey": []
          }
        ],
        "x-required-scope": "posts:read",
        "x-response-schema-complete": true,
        "parameters": [
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "description": "API 키가 여러 워크스페이스에 속하면 필수입니다.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "platform",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "instagram",
                "threads",
                "facebook",
                "tiktok",
                "youtube",
                "telegram",
                "bluesky"
              ]
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "createdVia",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "mcp",
                "rest",
                "dashboard"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "요청이 완료됐습니다.",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "posts": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/PostSummary"
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "posts",
                    "nextCursor"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "워크스페이스의 분당 REST 요청 한도를 넘었습니다.",
            "headers": {
              "Retry-After": {
                "description": "다시 시도할 때까지 기다릴 양의 정수 초",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "공통 오류",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/posts/{id}": {
      "get": {
        "summary": "발행 결과 (채널별 상태·2단계 지표 포함)",
        "operationId": "get_posts_id",
        "security": [
          {
            "bearerApiKey": []
          }
        ],
        "x-required-scope": "posts:read",
        "x-response-schema-complete": true,
        "parameters": [
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "description": "API 키가 여러 워크스페이스에 속하면 필수입니다.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "요청이 완료됐습니다.",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostDetail"
                }
              }
            }
          },
          "429": {
            "description": "워크스페이스의 분당 REST 요청 한도를 넘었습니다.",
            "headers": {
              "Retry-After": {
                "description": "다시 시도할 때까지 기다릴 양의 정수 초",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "공통 오류",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "patch": {
        "summary": "예약·임시 글 수정",
        "operationId": "patch_posts_id",
        "security": [
          {
            "bearerApiKey": []
          }
        ],
        "x-required-scope": "posts:write",
        "x-response-schema-complete": true,
        "parameters": [
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "description": "API 키가 여러 워크스페이스에 속하면 필수입니다.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "요청이 완료됐습니다.",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostUpdateResult"
                }
              }
            }
          },
          "429": {
            "description": "워크스페이스의 분당 REST 요청 한도를 넘었습니다.",
            "headers": {
              "Retry-After": {
                "description": "다시 시도할 때까지 기다릴 양의 정수 초",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "공통 오류",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "content": {
                    "type": "string"
                  },
                  "accountIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "minItems": 1,
                    "uniqueItems": true
                  },
                  "mediaIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "uniqueItems": true
                  },
                  "options": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "object",
                      "properties": {
                        "content": {
                          "type": "string"
                        },
                        "title": {
                          "type": "string"
                        },
                        "privacy": {
                          "type": "string",
                          "enum": [
                            "public",
                            "unlisted",
                            "private"
                          ]
                        },
                        "tags": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      },
                      "required": [],
                      "additionalProperties": false
                    }
                  },
                  "scheduledAt": {
                    "type": "string",
                    "format": "date-time"
                  }
                },
                "required": [],
                "additionalProperties": false,
                "minProperties": 1
              }
            }
          }
        }
      },
      "delete": {
        "summary": "삭제 (예약·임시는 완전 삭제, 발행된 글은 채널에서 지우고 `cancelled`)",
        "operationId": "delete_posts_id",
        "security": [
          {
            "bearerApiKey": []
          }
        ],
        "x-required-scope": "posts:write",
        "x-response-schema-complete": true,
        "parameters": [
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "description": "API 키가 여러 워크스페이스에 속하면 필수입니다.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "요청을 접수했습니다.",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "draft",
                        "scheduled",
                        "publishing",
                        "published",
                        "partial",
                        "failed",
                        "cancelled"
                      ]
                    },
                    "targets": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/DeleteTarget"
                      }
                    }
                  },
                  "required": [
                    "id",
                    "status",
                    "targets"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "204": {
            "description": "요청이 완료됐습니다.",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              }
            }
          },
          "429": {
            "description": "워크스페이스의 분당 REST 요청 한도를 넘었습니다.",
            "headers": {
              "Retry-After": {
                "description": "다시 시도할 때까지 기다릴 양의 정수 초",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "공통 오류",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/posts/{id}/metrics/refresh": {
      "post": {
        "summary": "연결된 발행 글의 지표 수동 새로고침 (2단계)",
        "operationId": "post_posts_id_metrics_refresh",
        "security": [
          {
            "bearerApiKey": []
          }
        ],
        "x-required-scope": "posts:read",
        "x-response-schema-complete": true,
        "parameters": [
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "description": "API 키가 여러 워크스페이스에 속하면 필수입니다.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "요청이 완료됐습니다.",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "post": {
                      "$ref": "#/components/schemas/PostDetail"
                    },
                    "refresh": {
                      "type": "object",
                      "properties": {
                        "eligible": {
                          "type": "integer"
                        },
                        "ready": {
                          "type": "integer"
                        },
                        "notFound": {
                          "type": "integer"
                        },
                        "error": {
                          "type": "integer"
                        },
                        "deferred": {
                          "type": "integer"
                        },
                        "stale": {
                          "type": "integer"
                        },
                        "failed": {
                          "type": "integer"
                        }
                      },
                      "required": [
                        "eligible",
                        "ready",
                        "notFound",
                        "error",
                        "deferred",
                        "stale",
                        "failed"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "post",
                    "refresh"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "워크스페이스의 분당 REST 요청 한도를 넘었습니다.",
            "headers": {
              "Retry-After": {
                "description": "다시 시도할 때까지 기다릴 양의 정수 초",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "공통 오류",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/posts/{id}/publish": {
      "post": {
        "summary": "예약·임시 글 지금 발행",
        "operationId": "post_posts_id_publish",
        "security": [
          {
            "bearerApiKey": []
          }
        ],
        "x-required-scope": "posts:write",
        "x-response-schema-complete": true,
        "parameters": [
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "description": "API 키가 여러 워크스페이스에 속하면 필수입니다.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "요청을 접수했습니다.",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostWriteResult"
                }
              }
            }
          },
          "429": {
            "description": "워크스페이스의 분당 REST 요청 한도를 넘었습니다.",
            "headers": {
              "Retry-After": {
                "description": "다시 시도할 때까지 기다릴 양의 정수 초",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "공통 오류",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "force": {
                    "const": true
                  }
                },
                "required": [
                  "force"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/posts/{id}/retry": {
      "post": {
        "summary": "실패한 채널만 재시도",
        "operationId": "post_posts_id_retry",
        "security": [
          {
            "bearerApiKey": []
          }
        ],
        "x-required-scope": "posts:write",
        "x-response-schema-complete": true,
        "parameters": [
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "description": "API 키가 여러 워크스페이스에 속하면 필수입니다.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "요청을 접수했습니다.",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostWriteResult"
                }
              }
            }
          },
          "429": {
            "description": "워크스페이스의 분당 REST 요청 한도를 넘었습니다.",
            "headers": {
              "Retry-After": {
                "description": "다시 시도할 때까지 기다릴 양의 정수 초",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "공통 오류",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/media/presign": {
      "post": {
        "summary": "업로드 주소 발급 (`fileName`, `contentType`, `bytes`)",
        "operationId": "post_media_presign",
        "security": [
          {
            "bearerApiKey": []
          }
        ],
        "x-required-scope": "posts:write",
        "x-response-schema-complete": true,
        "parameters": [
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "description": "API 키가 여러 워크스페이스에 속하면 필수입니다.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "리소스를 만들었습니다.",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "uploadUrl": {
                      "type": "string",
                      "format": "uri"
                    },
                    "uploadPath": {
                      "type": "string"
                    },
                    "uploadToken": {
                      "type": "string"
                    },
                    "expiresAt": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "uploadUrl",
                    "uploadPath",
                    "uploadToken",
                    "expiresAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "워크스페이스의 분당 REST 요청 한도를 넘었습니다.",
            "headers": {
              "Retry-After": {
                "description": "다시 시도할 때까지 기다릴 양의 정수 초",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "공통 오류",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "fileName": {
                    "type": "string"
                  },
                  "contentType": {
                    "type": "string"
                  },
                  "bytes": {
                    "type": "integer",
                    "minimum": 1
                  }
                },
                "required": [
                  "fileName",
                  "contentType",
                  "bytes"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/media/{id}/complete": {
      "post": {
        "summary": "업로드 완료 확인",
        "operationId": "post_media_id_complete",
        "security": [
          {
            "bearerApiKey": []
          }
        ],
        "x-required-scope": "posts:write",
        "x-response-schema-complete": true,
        "parameters": [
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "description": "API 키가 여러 워크스페이스에 속하면 필수입니다.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "요청이 완료됐습니다.",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReadyMedia"
                }
              }
            }
          },
          "429": {
            "description": "워크스페이스의 분당 REST 요청 한도를 넘었습니다.",
            "headers": {
              "Retry-After": {
                "description": "다시 시도할 때까지 기다릴 양의 정수 초",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "공통 오류",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/media/from-url": {
      "post": {
        "summary": "URL로 가져오기",
        "operationId": "post_media_from_url",
        "security": [
          {
            "bearerApiKey": []
          }
        ],
        "x-required-scope": "posts:write",
        "x-response-schema-complete": true,
        "parameters": [
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "description": "API 키가 여러 워크스페이스에 속하면 필수입니다.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "리소스를 만들었습니다.",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReadyMedia"
                }
              }
            }
          },
          "429": {
            "description": "워크스페이스의 분당 REST 요청 한도를 넘었습니다.",
            "headers": {
              "Retry-After": {
                "description": "다시 시도할 때까지 기다릴 양의 정수 초",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "공통 오류",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "format": "uri"
                  }
                },
                "required": [
                  "url"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/media/{id}": {
      "delete": {
        "summary": "안 쓰는 미디어 삭제",
        "operationId": "delete_media_id",
        "security": [
          {
            "bearerApiKey": []
          }
        ],
        "x-required-scope": "posts:write",
        "x-response-schema-complete": true,
        "parameters": [
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "description": "API 키가 여러 워크스페이스에 속하면 필수입니다.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "요청을 접수했습니다.",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "status": {
                      "const": "deleting"
                    }
                  },
                  "required": [
                    "id",
                    "status"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "204": {
            "description": "요청이 완료됐습니다.",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              }
            }
          },
          "429": {
            "description": "워크스페이스의 분당 REST 요청 한도를 넘었습니다.",
            "headers": {
              "Retry-After": {
                "description": "다시 시도할 때까지 기다릴 양의 정수 초",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "공통 오류",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/quota": {
      "get": {
        "summary": "이번 달 남은 발행 수, 채널별 하루 한도",
        "operationId": "get_quota",
        "security": [
          {
            "bearerApiKey": []
          }
        ],
        "x-required-scope": "posts:read",
        "x-response-schema-complete": true,
        "parameters": [
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "description": "API 키가 여러 워크스페이스에 속하면 필수입니다.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "요청이 완료됐습니다.",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "monthly": {
                      "$ref": "#/components/schemas/MonthlyQuota"
                    },
                    "dailyLimits": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/DailyQuota"
                      }
                    }
                  },
                  "required": [
                    "monthly",
                    "dailyLimits"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "워크스페이스의 분당 REST 요청 한도를 넘었습니다.",
            "headers": {
              "Retry-After": {
                "description": "다시 시도할 때까지 기다릴 양의 정수 초",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "공통 오류",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/queue-slots": {
      "get": {
        "summary": "반복 큐 슬롯 규칙 목록 (2단계)",
        "operationId": "get_queue_slots",
        "security": [
          {
            "bearerApiKey": []
          }
        ],
        "x-required-scope": "posts:read",
        "x-response-schema-complete": true,
        "parameters": [
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "description": "API 키가 여러 워크스페이스에 속하면 필수입니다.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "요청이 완료됐습니다.",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "rules": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/QueueSlotRule"
                      }
                    }
                  },
                  "required": [
                    "rules"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "워크스페이스의 분당 REST 요청 한도를 넘었습니다.",
            "headers": {
              "Retry-After": {
                "description": "다시 시도할 때까지 기다릴 양의 정수 초",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "공통 오류",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "반복 큐 슬롯 규칙 만들기 (2단계)",
        "operationId": "post_queue_slots",
        "security": [
          {
            "bearerApiKey": []
          }
        ],
        "x-required-scope": "posts:write",
        "x-response-schema-complete": true,
        "parameters": [
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "description": "API 키가 여러 워크스페이스에 속하면 필수입니다.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "리소스를 만들었습니다.",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "rule": {
                      "$ref": "#/components/schemas/QueueSlotRule"
                    }
                  },
                  "required": [
                    "rule"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "워크스페이스의 분당 REST 요청 한도를 넘었습니다.",
            "headers": {
              "Retry-After": {
                "description": "다시 시도할 때까지 기다릴 양의 정수 초",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "공통 오류",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "weekdays": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 7
                    },
                    "minItems": 1,
                    "maxItems": 7,
                    "uniqueItems": true
                  },
                  "localTime": {
                    "type": "string",
                    "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
                  },
                  "startsOn": {
                    "type": "string",
                    "format": "date"
                  },
                  "endsOn": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date"
                  }
                },
                "required": [
                  "weekdays",
                  "localTime",
                  "startsOn"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/queue-slots/{id}": {
      "patch": {
        "summary": "요일·시각·기간·일시 중지 변경 (2단계)",
        "operationId": "patch_queue_slots_id",
        "security": [
          {
            "bearerApiKey": []
          }
        ],
        "x-required-scope": "posts:write",
        "x-response-schema-complete": true,
        "parameters": [
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "description": "API 키가 여러 워크스페이스에 속하면 필수입니다.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "요청이 완료됐습니다.",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "rule": {
                      "$ref": "#/components/schemas/QueueSlotRule"
                    }
                  },
                  "required": [
                    "rule"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "워크스페이스의 분당 REST 요청 한도를 넘었습니다.",
            "headers": {
              "Retry-After": {
                "description": "다시 시도할 때까지 기다릴 양의 정수 초",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "공통 오류",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "weekdays": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 7
                    },
                    "minItems": 1,
                    "maxItems": 7,
                    "uniqueItems": true
                  },
                  "localTime": {
                    "type": "string",
                    "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
                  },
                  "startsOn": {
                    "type": "string",
                    "format": "date"
                  },
                  "endsOn": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date"
                  },
                  "paused": {
                    "type": "boolean"
                  }
                },
                "required": [],
                "additionalProperties": false,
                "minProperties": 1
              }
            }
          }
        }
      },
      "delete": {
        "summary": "반복 규칙 폐기 (2단계)",
        "operationId": "delete_queue_slots_id",
        "security": [
          {
            "bearerApiKey": []
          }
        ],
        "x-required-scope": "posts:write",
        "x-response-schema-complete": true,
        "parameters": [
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "description": "API 키가 여러 워크스페이스에 속하면 필수입니다.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "요청이 완료됐습니다.",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              }
            }
          },
          "429": {
            "description": "워크스페이스의 분당 REST 요청 한도를 넘었습니다.",
            "headers": {
              "Retry-After": {
                "description": "다시 시도할 때까지 기다릴 양의 정수 초",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "공통 오류",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/webhooks": {
      "get": {
        "summary": "고객 웹훅 구독 목록 (2단계)",
        "operationId": "get_webhooks",
        "security": [
          {
            "bearerApiKey": []
          }
        ],
        "x-required-scope": "webhooks:read",
        "x-response-schema-complete": true,
        "parameters": [
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "description": "API 키가 여러 워크스페이스에 속하면 필수입니다.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "요청이 완료됐습니다.",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "subscriptions": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/WebhookSubscription"
                      }
                    }
                  },
                  "required": [
                    "subscriptions"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "워크스페이스의 분당 REST 요청 한도를 넘었습니다.",
            "headers": {
              "Retry-After": {
                "description": "다시 시도할 때까지 기다릴 양의 정수 초",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "공통 오류",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "고객 웹훅 구독 등록 (2단계)",
        "operationId": "post_webhooks",
        "security": [
          {
            "bearerApiKey": []
          }
        ],
        "x-required-scope": "webhooks:write",
        "x-response-schema-complete": true,
        "parameters": [
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "description": "API 키가 여러 워크스페이스에 속하면 필수입니다.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "리소스를 만들었습니다.",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "subscription": {
                      "$ref": "#/components/schemas/WebhookSubscription"
                    },
                    "secret": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "subscription",
                    "secret"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "워크스페이스의 분당 REST 요청 한도를 넘었습니다.",
            "headers": {
              "Retry-After": {
                "description": "다시 시도할 때까지 기다릴 양의 정수 초",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "공통 오류",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "format": "uri"
                  },
                  "eventTypes": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "post.published",
                        "post.partial",
                        "post.failed",
                        "connection.disconnected"
                      ]
                    },
                    "minItems": 1,
                    "maxItems": 4,
                    "uniqueItems": true
                  }
                },
                "required": [
                  "url",
                  "eventTypes"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/webhooks/{id}": {
      "patch": {
        "summary": "주소·이벤트·상태 변경/비밀값 교체 (2단계)",
        "operationId": "patch_webhooks_id",
        "security": [
          {
            "bearerApiKey": []
          }
        ],
        "x-required-scope": "webhooks:write",
        "x-response-schema-complete": true,
        "parameters": [
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "description": "API 키가 여러 워크스페이스에 속하면 필수입니다.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "요청이 완료됐습니다.",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "subscription": {
                      "$ref": "#/components/schemas/WebhookSubscription"
                    },
                    "secret": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "subscription"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "워크스페이스의 분당 REST 요청 한도를 넘었습니다.",
            "headers": {
              "Retry-After": {
                "description": "다시 시도할 때까지 기다릴 양의 정수 초",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "공통 오류",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "format": "uri"
                  },
                  "eventTypes": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "post.published",
                        "post.partial",
                        "post.failed",
                        "connection.disconnected"
                      ]
                    },
                    "minItems": 1,
                    "maxItems": 4,
                    "uniqueItems": true
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "active",
                      "paused"
                    ]
                  },
                  "rotateSecret": {
                    "type": "boolean"
                  }
                },
                "required": [],
                "additionalProperties": false,
                "minProperties": 1
              }
            }
          }
        }
      },
      "delete": {
        "summary": "구독 폐기 (2단계)",
        "operationId": "delete_webhooks_id",
        "security": [
          {
            "bearerApiKey": []
          }
        ],
        "x-required-scope": "webhooks:write",
        "x-response-schema-complete": true,
        "parameters": [
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "description": "API 키가 여러 워크스페이스에 속하면 필수입니다.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "요청이 완료됐습니다.",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              }
            }
          },
          "429": {
            "description": "워크스페이스의 분당 REST 요청 한도를 넘었습니다.",
            "headers": {
              "Retry-After": {
                "description": "다시 시도할 때까지 기다릴 양의 정수 초",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "공통 오류",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/webhooks/{id}/deliveries": {
      "get": {
        "summary": "구독의 전달·시도 기록 (2단계)",
        "operationId": "get_webhooks_id_deliveries",
        "security": [
          {
            "bearerApiKey": []
          }
        ],
        "x-required-scope": "webhooks:read",
        "x-response-schema-complete": true,
        "parameters": [
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "description": "API 키가 여러 워크스페이스에 속하면 필수입니다.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "pending",
                "sending",
                "delivered",
                "failed"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "요청이 완료됐습니다.",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "deliveries": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/WebhookDelivery"
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "deliveries",
                    "nextCursor"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "워크스페이스의 분당 REST 요청 한도를 넘었습니다.",
            "headers": {
              "Retry-After": {
                "description": "다시 시도할 때까지 기다릴 양의 정수 초",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "공통 오류",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/webhooks/{id}/deliveries/{deliveryId}/retry": {
      "post": {
        "summary": "실패 전달 수동 재전송 (2단계)",
        "operationId": "post_webhooks_id_deliveries_deliveryId_retry",
        "security": [
          {
            "bearerApiKey": []
          }
        ],
        "x-required-scope": "webhooks:write",
        "x-response-schema-complete": true,
        "parameters": [
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "description": "API 키가 여러 워크스페이스에 속하면 필수입니다.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "deliveryId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          }
        ],
        "responses": {
          "202": {
            "description": "요청을 접수했습니다.",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "deliveryId": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "sending",
                        "delivered",
                        "failed"
                      ]
                    },
                    "alreadyAccepted": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "deliveryId",
                    "status",
                    "alreadyAccepted"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "워크스페이스의 분당 REST 요청 한도를 넘었습니다.",
            "headers": {
              "Retry-After": {
                "description": "다시 시도할 때까지 기다릴 양의 정수 초",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "공통 오류",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/automations/instagram-dm-backfills/preview": {
      "get": {
        "summary": "소유 미디어 과거 댓글 한 페이지 미리보기 (외부 발송 차단)",
        "operationId": "get_automations_instagram_dm_backfills_preview",
        "security": [
          {
            "bearerApiKey": []
          }
        ],
        "x-required-scope": "automations:read",
        "x-response-schema-complete": true,
        "parameters": [
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "description": "API 키가 여러 워크스페이스에 속하면 필수입니다.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "ruleId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "mediaId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_]{1,255}$"
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024
            }
          }
        ],
        "responses": {
          "200": {
            "description": "요청이 완료됐습니다.",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ordinal": {
                            "type": "integer"
                          },
                          "commentId": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9_]{1,255}$"
                          },
                          "commenterId": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "prepared",
                              "excluded"
                            ]
                          },
                          "reason": {
                            "type": "string",
                            "enum": [
                              "eligible",
                              "invalid_time",
                              "window_expired",
                              "after_request",
                              "missing_author",
                              "own_comment",
                              "comment_unavailable",
                              "rule_mismatch",
                              "follower_unknown",
                              "buttons_unverified",
                              "duplicate_comment",
                              "duplicate_author"
                            ]
                          }
                        },
                        "required": [
                          "ordinal",
                          "commentId",
                          "commenterId",
                          "createdAt",
                          "status",
                          "reason"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "externalSendEnabled": {
                      "const": false
                    },
                    "blockReason": {
                      "const": "provider_policy_unverified"
                    }
                  },
                  "required": [
                    "items",
                    "nextCursor",
                    "externalSendEnabled",
                    "blockReason"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "워크스페이스의 분당 REST 요청 한도를 넘었습니다.",
            "headers": {
              "Retry-After": {
                "description": "다시 시도할 때까지 기다릴 양의 정수 초",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "공통 오류",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/automations/instagram-dm-backfills": {
      "get": {
        "summary": "최근 과거 댓글 준비 작업 목록",
        "operationId": "get_automations_instagram_dm_backfills",
        "security": [
          {
            "bearerApiKey": []
          }
        ],
        "x-required-scope": "automations:read",
        "x-response-schema-complete": true,
        "parameters": [
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "description": "API 키가 여러 워크스페이스에 속하면 필수입니다.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "요청이 완료됐습니다.",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "jobs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "accountId": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "ruleId": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "mediaId": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9_]{1,255}$"
                          },
                          "requestId": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "preparing",
                              "paused",
                              "ready"
                            ]
                          },
                          "version": {
                            "type": "integer"
                          },
                          "requestedAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "scanned": {
                            "type": "integer"
                          },
                          "prepared": {
                            "type": "integer"
                          },
                          "excluded": {
                            "type": "integer"
                          }
                        },
                        "required": [
                          "id",
                          "accountId",
                          "ruleId",
                          "mediaId",
                          "requestId",
                          "status",
                          "version",
                          "requestedAt",
                          "updatedAt",
                          "scanned",
                          "prepared",
                          "excluded"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "externalSendEnabled": {
                      "const": false
                    },
                    "blockReason": {
                      "const": "provider_policy_unverified"
                    }
                  },
                  "required": [
                    "jobs",
                    "externalSendEnabled",
                    "blockReason"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "워크스페이스의 분당 REST 요청 한도를 넘었습니다.",
            "headers": {
              "Retry-After": {
                "description": "다시 시도할 때까지 기다릴 양의 정수 초",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "공통 오류",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "과거 댓글 준비 명시적 요청 (외부 발송 차단)",
        "operationId": "post_automations_instagram_dm_backfills",
        "security": [
          {
            "bearerApiKey": []
          }
        ],
        "x-required-scope": "automations:write",
        "x-response-schema-complete": true,
        "parameters": [
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "description": "API 키가 여러 워크스페이스에 속하면 필수입니다.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "리소스를 만들었습니다.",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "job": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "accountId": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "ruleId": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "mediaId": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9_]{1,255}$"
                        },
                        "requestId": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "preparing",
                            "paused",
                            "ready"
                          ]
                        },
                        "version": {
                          "type": "integer"
                        },
                        "requestedAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "scanned": {
                          "type": "integer"
                        },
                        "prepared": {
                          "type": "integer"
                        },
                        "excluded": {
                          "type": "integer"
                        }
                      },
                      "required": [
                        "id",
                        "accountId",
                        "ruleId",
                        "mediaId",
                        "requestId",
                        "status",
                        "version",
                        "requestedAt",
                        "updatedAt",
                        "scanned",
                        "prepared",
                        "excluded"
                      ],
                      "additionalProperties": false
                    },
                    "externalSendEnabled": {
                      "const": false
                    },
                    "blockReason": {
                      "const": "provider_policy_unverified"
                    }
                  },
                  "required": [
                    "job",
                    "externalSendEnabled",
                    "blockReason"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "워크스페이스의 분당 REST 요청 한도를 넘었습니다.",
            "headers": {
              "Retry-After": {
                "description": "다시 시도할 때까지 기다릴 양의 정수 초",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "공통 오류",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "ruleId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "mediaId": {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9_]{1,255}$"
                  },
                  "requestId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "confirmed": {
                    "const": true
                  }
                },
                "required": [
                  "ruleId",
                  "mediaId",
                  "requestId",
                  "confirmed"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/automations/instagram-dm-backfills/{id}": {
      "get": {
        "summary": "준비 작업 집계·순서별 결과 조회",
        "operationId": "get_automations_instagram_dm_backfills_id",
        "security": [
          {
            "bearerApiKey": []
          }
        ],
        "x-required-scope": "automations:read",
        "x-response-schema-complete": true,
        "parameters": [
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "description": "API 키가 여러 워크스페이스에 속하면 필수입니다.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "afterOrdinal",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "요청이 완료됐습니다.",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "job": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "accountId": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "ruleId": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "mediaId": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9_]{1,255}$"
                        },
                        "requestId": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "preparing",
                            "paused",
                            "ready"
                          ]
                        },
                        "version": {
                          "type": "integer"
                        },
                        "requestedAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "scanned": {
                          "type": "integer"
                        },
                        "prepared": {
                          "type": "integer"
                        },
                        "excluded": {
                          "type": "integer"
                        }
                      },
                      "required": [
                        "id",
                        "accountId",
                        "ruleId",
                        "mediaId",
                        "requestId",
                        "status",
                        "version",
                        "requestedAt",
                        "updatedAt",
                        "scanned",
                        "prepared",
                        "excluded"
                      ],
                      "additionalProperties": false
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ordinal": {
                            "type": "integer"
                          },
                          "commentId": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9_]{1,255}$"
                          },
                          "commenterId": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "prepared",
                              "excluded"
                            ]
                          },
                          "reason": {
                            "type": "string",
                            "enum": [
                              "eligible",
                              "invalid_time",
                              "window_expired",
                              "after_request",
                              "missing_author",
                              "own_comment",
                              "comment_unavailable",
                              "rule_mismatch",
                              "follower_unknown",
                              "buttons_unverified",
                              "duplicate_comment",
                              "duplicate_author"
                            ]
                          }
                        },
                        "required": [
                          "ordinal",
                          "commentId",
                          "commenterId",
                          "createdAt",
                          "status",
                          "reason"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "nextOrdinal": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "externalSendEnabled": {
                      "const": false
                    },
                    "blockReason": {
                      "const": "provider_policy_unverified"
                    }
                  },
                  "required": [
                    "job",
                    "items",
                    "nextOrdinal",
                    "externalSendEnabled",
                    "blockReason"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "워크스페이스의 분당 REST 요청 한도를 넘었습니다.",
            "headers": {
              "Retry-After": {
                "description": "다시 시도할 때까지 기다릴 양의 정수 초",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "공통 오류",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "patch": {
        "summary": "다음 페이지 준비·중지·재개",
        "operationId": "patch_automations_instagram_dm_backfills_id",
        "security": [
          {
            "bearerApiKey": []
          }
        ],
        "x-required-scope": "automations:write",
        "x-response-schema-complete": true,
        "parameters": [
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "description": "API 키가 여러 워크스페이스에 속하면 필수입니다.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "요청이 완료됐습니다.",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "job": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "accountId": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "ruleId": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "mediaId": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9_]{1,255}$"
                        },
                        "requestId": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "preparing",
                            "paused",
                            "ready"
                          ]
                        },
                        "version": {
                          "type": "integer"
                        },
                        "requestedAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "scanned": {
                          "type": "integer"
                        },
                        "prepared": {
                          "type": "integer"
                        },
                        "excluded": {
                          "type": "integer"
                        }
                      },
                      "required": [
                        "id",
                        "accountId",
                        "ruleId",
                        "mediaId",
                        "requestId",
                        "status",
                        "version",
                        "requestedAt",
                        "updatedAt",
                        "scanned",
                        "prepared",
                        "excluded"
                      ],
                      "additionalProperties": false
                    },
                    "externalSendEnabled": {
                      "const": false
                    },
                    "blockReason": {
                      "const": "provider_policy_unverified"
                    }
                  },
                  "required": [
                    "job",
                    "externalSendEnabled",
                    "blockReason"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "워크스페이스의 분당 REST 요청 한도를 넘었습니다.",
            "headers": {
              "Retry-After": {
                "description": "다시 시도할 때까지 기다릴 양의 정수 초",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "공통 오류",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "action": {
                    "type": "string",
                    "enum": [
                      "advance",
                      "pause",
                      "resume"
                    ]
                  }
                },
                "required": [
                  "action"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/automations/instagram-dm-rules": {
      "get": {
        "summary": "Instagram 댓글→DM 규칙 목록 (2단계)",
        "operationId": "get_automations_instagram_dm_rules",
        "security": [
          {
            "bearerApiKey": []
          }
        ],
        "x-required-scope": "automations:read",
        "x-response-schema-complete": true,
        "parameters": [
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "description": "API 키가 여러 워크스페이스에 속하면 필수입니다.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "요청이 완료됐습니다.",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "rules": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/InstagramDmRule"
                      }
                    }
                  },
                  "required": [
                    "rules"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "워크스페이스의 분당 REST 요청 한도를 넘었습니다.",
            "headers": {
              "Retry-After": {
                "description": "다시 시도할 때까지 기다릴 양의 정수 초",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "공통 오류",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "초안 규칙 만들기 (2단계)",
        "operationId": "post_automations_instagram_dm_rules",
        "security": [
          {
            "bearerApiKey": []
          }
        ],
        "x-required-scope": "automations:write",
        "x-response-schema-complete": true,
        "parameters": [
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "description": "API 키가 여러 워크스페이스에 속하면 필수입니다.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "리소스를 만들었습니다.",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "rule": {
                      "$ref": "#/components/schemas/InstagramDmRule"
                    }
                  },
                  "required": [
                    "rule"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "워크스페이스의 분당 REST 요청 한도를 넘었습니다.",
            "headers": {
              "Retry-After": {
                "description": "다시 시도할 때까지 기다릴 양의 정수 초",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "공통 오류",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "accountId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "mediaId": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "pattern": "^[A-Za-z0-9_]{1,255}$"
                  },
                  "mediaScope": {
                    "type": "string",
                    "enum": [
                      "specific",
                      "all_posts",
                      "next_post"
                    ]
                  },
                  "matchMode": {
                    "type": "string",
                    "enum": [
                      "keyword",
                      "all_comments"
                    ]
                  },
                  "followerCondition": {
                    "type": "string",
                    "enum": [
                      "any",
                      "follower",
                      "non_follower"
                    ]
                  },
                  "dmButtons": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "title": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 20
                        },
                        "url": {
                          "type": "string",
                          "format": "uri",
                          "pattern": "^https://"
                        }
                      },
                      "required": [
                        "title",
                        "url"
                      ],
                      "additionalProperties": false
                    },
                    "maxItems": 3
                  },
                  "keyword": {
                    "type": "string"
                  },
                  "publicReplyText": {
                    "type": "string"
                  },
                  "dmText": {
                    "type": "string"
                  }
                },
                "required": [
                  "accountId",
                  "publicReplyText",
                  "dmText"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/automations/instagram-dm-runs": {
      "get": {
        "summary": "Instagram 댓글→DM 실행 결과 (2단계)",
        "operationId": "get_automations_instagram_dm_runs",
        "security": [
          {
            "bearerApiKey": []
          }
        ],
        "x-required-scope": "automations:read",
        "x-response-schema-complete": true,
        "parameters": [
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "description": "API 키가 여러 워크스페이스에 속하면 필수입니다.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "ruleId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "요청이 완료됐습니다.",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "runs": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/InstagramDmRun"
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "runs",
                    "nextCursor"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "워크스페이스의 분당 REST 요청 한도를 넘었습니다.",
            "headers": {
              "Retry-After": {
                "description": "다시 시도할 때까지 기다릴 양의 정수 초",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "공통 오류",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/automations/instagram-dm-rules/{id}": {
      "patch": {
        "summary": "규칙 내용·상태 변경 또는 폐기 (2단계)",
        "operationId": "patch_automations_instagram_dm_rules_id",
        "security": [
          {
            "bearerApiKey": []
          }
        ],
        "x-required-scope": "automations:write",
        "x-response-schema-complete": true,
        "parameters": [
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "description": "API 키가 여러 워크스페이스에 속하면 필수입니다.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "요청이 완료됐습니다.",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "rule": {
                      "$ref": "#/components/schemas/InstagramDmRule"
                    }
                  },
                  "required": [
                    "rule"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "워크스페이스의 분당 REST 요청 한도를 넘었습니다.",
            "headers": {
              "Retry-After": {
                "description": "다시 시도할 때까지 기다릴 양의 정수 초",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "공통 오류",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "mediaId": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "pattern": "^[A-Za-z0-9_]{1,255}$"
                  },
                  "mediaScope": {
                    "type": "string",
                    "enum": [
                      "specific",
                      "all_posts",
                      "next_post"
                    ]
                  },
                  "matchMode": {
                    "type": "string",
                    "enum": [
                      "keyword",
                      "all_comments"
                    ]
                  },
                  "followerCondition": {
                    "type": "string",
                    "enum": [
                      "any",
                      "follower",
                      "non_follower"
                    ]
                  },
                  "dmButtons": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "title": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 20
                        },
                        "url": {
                          "type": "string",
                          "format": "uri",
                          "pattern": "^https://"
                        }
                      },
                      "required": [
                        "title",
                        "url"
                      ],
                      "additionalProperties": false
                    },
                    "maxItems": 3
                  },
                  "keyword": {
                    "type": "string"
                  },
                  "publicReplyText": {
                    "type": "string"
                  },
                  "dmText": {
                    "type": "string"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "active",
                      "paused",
                      "revoked"
                    ]
                  }
                },
                "required": [],
                "additionalProperties": false,
                "minProperties": 1
              }
            }
          }
        }
      }
    },
    "/accounts/{id}/media/{mediaId}/comments": {
      "get": {
        "summary": "소유 Instagram 게시물의 최상위 댓글 한 페이지 (2단계)",
        "operationId": "get_accounts_id_media_mediaId_comments",
        "security": [
          {
            "bearerApiKey": []
          }
        ],
        "x-required-scope": "comments:read",
        "x-response-schema-complete": true,
        "parameters": [
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "description": "API 키가 여러 워크스페이스에 속하면 필수입니다.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "mediaId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_]{1,255}$"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024
            }
          }
        ],
        "responses": {
          "200": {
            "description": "요청이 완료됐습니다.",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "comments": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/InstagramComment"
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "comments",
                    "nextCursor"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "워크스페이스의 분당 REST 요청 한도를 넘었습니다.",
            "headers": {
              "Retry-After": {
                "description": "다시 시도할 때까지 기다릴 양의 정수 초",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "공통 오류",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/accounts/{id}/media/{mediaId}/comments/{commentId}/actions": {
      "post": {
        "summary": "수동 답글·숨김·숨김 해제 의도 (2단계)",
        "operationId": "post_accounts_id_media_mediaId_comments_commentId_actions",
        "security": [
          {
            "bearerApiKey": []
          }
        ],
        "x-required-scope": "comments:write",
        "x-response-schema-complete": true,
        "parameters": [
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "description": "API 키가 여러 워크스페이스에 속하면 필수입니다.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "mediaId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_]{1,255}$"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_]{1,255}$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 200,
              "pattern": "^[\\x20-\\x7e]+$"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "요청을 접수했습니다.",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "action": {
                      "$ref": "#/components/schemas/InstagramCommentAction"
                    }
                  },
                  "required": [
                    "action"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "워크스페이스의 분당 REST 요청 한도를 넘었습니다.",
            "headers": {
              "Retry-After": {
                "description": "다시 시도할 때까지 기다릴 양의 정수 초",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "공통 오류",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "action": {
                    "type": "string",
                    "enum": [
                      "reply",
                      "hide",
                      "unhide"
                    ]
                  },
                  "replyText": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 10000
                  }
                },
                "required": [
                  "action"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/comment-actions/{id}": {
      "get": {
        "summary": "수동 댓글 작업 결과 (2단계)",
        "operationId": "get_comment_actions_id",
        "security": [
          {
            "bearerApiKey": []
          }
        ],
        "x-required-scope": "comments:read",
        "x-response-schema-complete": true,
        "parameters": [
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "description": "API 키가 여러 워크스페이스에 속하면 필수입니다.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "요청이 완료됐습니다.",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "action": {
                      "$ref": "#/components/schemas/InstagramCommentAction"
                    }
                  },
                  "required": [
                    "action"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "워크스페이스의 분당 REST 요청 한도를 넘었습니다.",
            "headers": {
              "Retry-After": {
                "description": "다시 시도할 때까지 기다릴 양의 정수 초",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "요청 추적 식별자"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "공통 오류",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerApiKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "워크스페이스 API 키"
      }
    },
    "schemas": {
      "PlatformId": {
        "type": "string",
        "enum": [
          "instagram",
          "threads",
          "facebook",
          "tiktok",
          "youtube",
          "telegram",
          "bluesky"
        ]
      },
      "PostTargetState": {
        "type": "object",
        "properties": {
          "accountId": {
            "type": "string",
            "format": "uuid"
          },
          "platform": {
            "$ref": "#/components/schemas/PlatformId"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "publishing",
              "published",
              "failed",
              "cancelled"
            ]
          }
        },
        "required": [
          "accountId",
          "platform",
          "status"
        ],
        "additionalProperties": false
      },
      "PostTargetSummary": {
        "type": "object",
        "properties": {
          "accountId": {
            "type": "string",
            "format": "uuid"
          },
          "platform": {
            "$ref": "#/components/schemas/PlatformId"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "publishing",
              "published",
              "failed",
              "cancelled"
            ]
          },
          "metrics": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/PostMetric"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "accountId",
          "platform",
          "status",
          "metrics"
        ],
        "additionalProperties": false
      },
      "PostTargetDetail": {
        "type": "object",
        "properties": {
          "accountId": {
            "type": "string",
            "format": "uuid"
          },
          "platform": {
            "$ref": "#/components/schemas/PlatformId"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "publishing",
              "published",
              "failed",
              "cancelled"
            ]
          },
          "externalUrl": {
            "type": [
              "string",
              "null"
            ]
          },
          "errorCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "retryBlockedReason": {
            "type": [
              "string",
              "null"
            ]
          },
          "attempts": {
            "type": "integer"
          },
          "publishedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "deletePending": {
            "type": "boolean"
          },
          "deleteErrorCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "needsReview": {
            "type": "boolean"
          },
          "metrics": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/PostMetric"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "accountId",
          "platform",
          "status",
          "externalUrl",
          "errorCode",
          "retryBlockedReason",
          "attempts",
          "publishedAt",
          "deletePending",
          "deleteErrorCode",
          "needsReview",
          "metrics"
        ],
        "additionalProperties": false
      },
      "PostMetric": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "collecting",
              "ready",
              "error",
              "not_found",
              "unsupported"
            ]
          },
          "capabilities": {
            "type": "object",
            "properties": {
              "views": {
                "type": "string",
                "enum": [
                  "supported",
                  "unsupported",
                  "unverified"
                ]
              },
              "likes": {
                "type": "string",
                "enum": [
                  "supported",
                  "unsupported",
                  "unverified"
                ]
              },
              "comments": {
                "type": "string",
                "enum": [
                  "supported",
                  "unsupported",
                  "unverified"
                ]
              },
              "shares": {
                "type": "string",
                "enum": [
                  "supported",
                  "unsupported",
                  "unverified"
                ]
              }
            },
            "required": [
              "views",
              "likes",
              "comments",
              "shares"
            ],
            "additionalProperties": false
          },
          "values": {
            "type": "object",
            "properties": {
              "views": {
                "type": [
                  "integer",
                  "null"
                ],
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "likes": {
                "type": [
                  "integer",
                  "null"
                ],
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "comments": {
                "type": [
                  "integer",
                  "null"
                ],
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "shares": {
                "type": [
                  "integer",
                  "null"
                ],
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "quotes": {
                "type": [
                  "integer",
                  "null"
                ],
                "minimum": 0,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "views",
              "likes",
              "comments",
              "shares",
              "quotes"
            ],
            "additionalProperties": false
          },
          "collectedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "lastAttemptAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "lastErrorCode": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "provider_unavailable",
              "post_not_found",
              "invalid_target",
              null
            ]
          }
        },
        "required": [
          "status",
          "capabilities",
          "values",
          "collectedAt",
          "lastAttemptAt",
          "lastErrorCode"
        ],
        "additionalProperties": false
      },
      "PostCreatedResult": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "scheduled",
              "publishing",
              "published",
              "partial",
              "failed",
              "cancelled"
            ]
          },
          "targets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PostTargetState"
            }
          },
          "scheduledAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "queueSlotRuleId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          }
        },
        "required": [
          "id",
          "status",
          "targets"
        ],
        "additionalProperties": false
      },
      "PostWriteResult": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "scheduled",
              "publishing",
              "published",
              "partial",
              "failed",
              "cancelled"
            ]
          },
          "targets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PostTargetState"
            }
          }
        },
        "required": [
          "id",
          "status",
          "targets"
        ],
        "additionalProperties": false
      },
      "PostUpdateResult": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "scheduled",
              "publishing",
              "published",
              "partial",
              "failed",
              "cancelled"
            ]
          },
          "targets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PostTargetState"
            }
          },
          "scheduledAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "status",
          "scheduledAt",
          "targets"
        ],
        "additionalProperties": false
      },
      "PostSummary": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "content": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "scheduled",
              "publishing",
              "published",
              "partial",
              "failed",
              "cancelled"
            ]
          },
          "scheduledAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "publishedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "createdVia": {
            "type": "string",
            "enum": [
              "mcp",
              "rest",
              "dashboard"
            ]
          },
          "targets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PostTargetSummary"
            }
          }
        },
        "required": [
          "id",
          "content",
          "status",
          "scheduledAt",
          "createdAt",
          "publishedAt",
          "createdVia",
          "targets"
        ],
        "additionalProperties": false
      },
      "PostDetail": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "content": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "scheduled",
              "publishing",
              "published",
              "partial",
              "failed",
              "cancelled"
            ]
          },
          "scheduledAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "publishedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "createdVia": {
            "type": "string",
            "enum": [
              "mcp",
              "rest",
              "dashboard"
            ]
          },
          "targets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PostTargetDetail"
            }
          },
          "options": {
            "type": "object",
            "additionalProperties": true
          },
          "mediaIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        },
        "required": [
          "id",
          "content",
          "status",
          "scheduledAt",
          "createdAt",
          "publishedAt",
          "createdVia",
          "targets",
          "options",
          "mediaIds"
        ],
        "additionalProperties": false
      },
      "DeleteTarget": {
        "type": "object",
        "properties": {
          "accountId": {
            "type": "string",
            "format": "uuid"
          },
          "platform": {
            "$ref": "#/components/schemas/PlatformId"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "publishing",
              "published",
              "failed",
              "cancelled"
            ]
          },
          "deletePending": {
            "type": "boolean"
          },
          "deleteErrorCode": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "accountId",
          "platform",
          "status",
          "deletePending",
          "deleteErrorCode"
        ],
        "additionalProperties": false
      },
      "QueueSlotRule": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "weekdays": {
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "localTime": {
            "type": "string"
          },
          "startsOn": {
            "type": "string",
            "format": "date"
          },
          "endsOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "paused": {
            "type": "boolean"
          },
          "revokedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "weekdays",
          "localTime",
          "startsOn",
          "endsOn",
          "paused",
          "revokedAt",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "Account": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "platform": {
            "$ref": "#/components/schemas/PlatformId"
          },
          "handle": {
            "type": [
              "string",
              "null"
            ]
          },
          "displayName": {
            "type": [
              "string",
              "null"
            ]
          },
          "avatarUrl": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "expiring",
              "expired",
              "restricted"
            ]
          },
          "lastCheckedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "platform",
          "handle",
          "displayName",
          "avatarUrl",
          "status",
          "lastCheckedAt"
        ],
        "additionalProperties": false
      },
      "PlatformLimits": {
        "type": "object",
        "properties": {
          "textCountMode": {
            "type": "string",
            "enum": [
              "grapheme"
            ]
          },
          "textLimit": {
            "type": "integer"
          },
          "mediaCaptionLimit": {
            "type": "integer"
          },
          "textMaxBytes": {
            "type": "integer"
          },
          "imageMax": {
            "type": "integer"
          },
          "videoMax": {
            "type": "integer"
          },
          "mediaMax": {
            "type": "integer"
          },
          "textOnly": {
            "type": "boolean"
          },
          "titleLimit": {
            "type": "integer"
          },
          "titleRequired": {
            "type": "boolean"
          },
          "supportedMimeTypes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "maxMediaBytes": {
            "type": "integer"
          },
          "supportedImageMimeTypes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "maxMediaBytesByMimeType": {
            "type": "object",
            "additionalProperties": {
              "type": "integer"
            }
          },
          "imageMinAspectRatio": {
            "type": "number"
          },
          "imageMaxAspectRatio": {
            "type": "number"
          },
          "imageMinWidth": {
            "type": "integer"
          },
          "imageMaxWidth": {
            "type": "integer"
          }
        },
        "required": [
          "textCountMode",
          "textLimit",
          "imageMax",
          "videoMax",
          "textOnly"
        ],
        "additionalProperties": false
      },
      "Platform": {
        "type": "object",
        "properties": {
          "platform": {
            "$ref": "#/components/schemas/PlatformId"
          },
          "label": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "live",
              "beta",
              "soon",
              "off"
            ]
          },
          "verified": {
            "type": "boolean"
          },
          "limits": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PlatformLimits"
              },
              {
                "type": "null"
              }
            ]
          },
          "note": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "platform",
          "label",
          "status",
          "verified",
          "limits",
          "note"
        ],
        "additionalProperties": false
      },
      "ReadyMedia": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "const": "ready"
          },
          "mimeType": {
            "type": "string"
          },
          "bytes": {
            "type": "integer"
          },
          "width": {
            "type": "integer"
          },
          "height": {
            "type": "integer"
          },
          "durationMs": {
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "status",
          "mimeType",
          "bytes",
          "width",
          "height",
          "durationMs"
        ],
        "additionalProperties": false
      },
      "MonthlyQuota": {
        "type": "object",
        "properties": {
          "plan": {
            "type": "string"
          },
          "limit": {
            "type": [
              "integer",
              "null"
            ]
          },
          "used": {
            "type": "integer"
          },
          "remaining": {
            "type": [
              "integer",
              "null"
            ]
          },
          "resetsAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "provisional": {
            "const": true
          }
        },
        "required": [
          "plan",
          "limit",
          "used",
          "remaining",
          "resetsAt",
          "provisional"
        ],
        "additionalProperties": false
      },
      "DailyQuota": {
        "type": "object",
        "properties": {
          "platform": {
            "$ref": "#/components/schemas/PlatformId"
          },
          "limit": {
            "type": [
              "integer",
              "null"
            ]
          },
          "remaining": {
            "type": "null"
          }
        },
        "required": [
          "platform",
          "limit",
          "remaining"
        ],
        "additionalProperties": false
      },
      "WebhookSubscription": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "eventTypes": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "post.published",
                "post.partial",
                "post.failed",
                "connection.disconnected"
              ]
            }
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "paused",
              "revoked"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "revokedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "url",
          "eventTypes",
          "status",
          "createdAt",
          "updatedAt",
          "revokedAt"
        ],
        "additionalProperties": false
      },
      "WebhookDelivery": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "eventId": {
            "type": "string",
            "format": "uuid"
          },
          "eventType": {
            "type": "string",
            "enum": [
              "post.published",
              "post.partial",
              "post.failed",
              "connection.disconnected"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "sending",
              "delivered",
              "failed"
            ]
          },
          "attempts": {
            "type": "integer"
          },
          "lastStatusCode": {
            "type": [
              "integer",
              "null"
            ]
          },
          "lastErrorCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "nextAttemptAt": {
            "type": "string",
            "format": "date-time"
          },
          "deliveredAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "attemptHistory": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "attemptInCycle": {
                  "type": "integer"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "sending",
                    "delivered",
                    "retry_scheduled",
                    "failed",
                    "unknown"
                  ]
                },
                "httpStatus": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "errorCode": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "startedAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "finishedAt": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                }
              },
              "required": [
                "attemptInCycle",
                "status",
                "httpStatus",
                "errorCode",
                "startedAt",
                "finishedAt"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "id",
          "eventId",
          "eventType",
          "status",
          "attempts",
          "lastStatusCode",
          "lastErrorCode",
          "nextAttemptAt",
          "deliveredAt",
          "createdAt",
          "updatedAt",
          "attemptHistory"
        ],
        "additionalProperties": false
      },
      "InstagramDmRule": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "accountId": {
            "type": "string",
            "format": "uuid"
          },
          "mediaId": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^[A-Za-z0-9_]{1,255}$"
          },
          "mediaScope": {
            "type": "string",
            "enum": [
              "specific",
              "all_posts",
              "next_post"
            ]
          },
          "matchMode": {
            "type": "string",
            "enum": [
              "keyword",
              "all_comments"
            ]
          },
          "followerCondition": {
            "type": "string",
            "enum": [
              "any",
              "follower",
              "non_follower"
            ]
          },
          "dmButtons": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "title": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 20
                },
                "url": {
                  "type": "string",
                  "format": "uri",
                  "pattern": "^https://"
                }
              },
              "required": [
                "title",
                "url"
              ],
              "additionalProperties": false
            },
            "maxItems": 3
          },
          "keyword": {
            "type": "string"
          },
          "publicReplyText": {
            "type": "string"
          },
          "dmText": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "active",
              "paused",
              "revoked"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "activatedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "accountId",
          "mediaId",
          "mediaScope",
          "matchMode",
          "followerCondition",
          "dmButtons",
          "keyword",
          "publicReplyText",
          "dmText",
          "status",
          "createdAt",
          "updatedAt",
          "activatedAt"
        ],
        "additionalProperties": false
      },
      "InstagramDmRun": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "ruleId": {
            "type": "string",
            "format": "uuid"
          },
          "accountId": {
            "type": "string",
            "format": "uuid"
          },
          "commentId": {
            "type": "string"
          },
          "commenterId": {
            "type": "string"
          },
          "publicReply": {
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "pending",
                  "sending",
                  "sent",
                  "failed",
                  "unknown"
                ]
              },
              "externalId": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "errorCode": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "status",
              "externalId",
              "errorCode"
            ],
            "additionalProperties": false
          },
          "privateReply": {
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "pending",
                  "sending",
                  "sent",
                  "failed",
                  "unknown"
                ]
              },
              "externalId": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "errorCode": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "status",
              "externalId",
              "errorCode"
            ],
            "additionalProperties": false
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "ruleId",
          "accountId",
          "commentId",
          "commenterId",
          "publicReply",
          "privateReply",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "InstagramComment": {
        "type": "object",
        "properties": {
          "commentId": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_]{1,255}$"
          },
          "text": {
            "type": "string"
          },
          "commenterId": {
            "type": [
              "string",
              "null"
            ]
          },
          "hidden": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "parentId": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "commentId",
          "text",
          "commenterId",
          "hidden",
          "parentId",
          "createdAt"
        ],
        "additionalProperties": false
      },
      "InstagramCommentAction": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "accountId": {
            "type": "string",
            "format": "uuid"
          },
          "mediaId": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_]{1,255}$"
          },
          "commentId": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_]{1,255}$"
          },
          "action": {
            "type": "string",
            "enum": [
              "reply",
              "hide",
              "unhide"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "sending",
              "sent",
              "failed",
              "unknown"
            ]
          },
          "externalReplyId": {
            "type": [
              "string",
              "null"
            ]
          },
          "errorCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "accountId",
          "mediaId",
          "commentId",
          "action",
          "status",
          "externalReplyId",
          "errorCode",
          "createdAt"
        ],
        "additionalProperties": false
      },
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "unauthenticated",
                  "invalid_api_key",
                  "api_key_revoked",
                  "api_key_expired",
                  "verification_required",
                  "forbidden_scope",
                  "invalid_params",
                  "workspace_required",
                  "validation_failed",
                  "content_too_long",
                  "content_too_large",
                  "media_required",
                  "media_too_many",
                  "media_mixed",
                  "media_type_not_supported",
                  "media_too_large",
                  "media_aspect_ratio",
                  "media_width_out_of_range",
                  "media_too_short",
                  "media_too_long",
                  "media_not_found",
                  "media_not_ready",
                  "media_expired",
                  "media_file_invalid",
                  "media_in_use",
                  "upload_link_invalid",
                  "upload_link_expired",
                  "upload_link_full",
                  "media_url_invalid",
                  "media_url_blocked",
                  "media_url_unreachable",
                  "scheduled_at_invalid",
                  "scheduled_at_range",
                  "queue_slot_taken",
                  "queue_slot_rule_not_found",
                  "queue_slot_rule_revoked",
                  "queue_slot_unavailable",
                  "account_not_connected",
                  "account_has_active_work",
                  "account_expired",
                  "account_restricted",
                  "platform_not_ready",
                  "duplicate_post",
                  "idempotency_key_reused",
                  "post_not_editable",
                  "post_changed",
                  "post_not_found",
                  "webhook_not_found",
                  "webhook_revoked",
                  "webhook_delivery_not_found",
                  "webhook_subscription_inactive",
                  "webhook_delivery_not_retryable",
                  "instagram_dm_backfill_not_found",
                  "instagram_dm_backfill_conflict",
                  "instagram_dm_rule_not_found",
                  "instagram_dm_rule_not_editable",
                  "instagram_dm_not_approved",
                  "instagram_dm_permission_missing",
                  "instagram_comments_not_approved",
                  "instagram_comments_permission_missing",
                  "instagram_comment_not_found",
                  "instagram_comment_not_replyable",
                  "instagram_comment_provider_unavailable",
                  "instagram_comment_action_not_found",
                  "publish_in_flight",
                  "nothing_to_retry",
                  "quota_exceeded",
                  "rate_limited",
                  "internal_error"
                ]
              },
              "message": {
                "type": "string"
              },
              "platform": {
                "type": "string"
              },
              "field": {
                "type": "string"
              },
              "limit": {
                "type": "number"
              },
              "actual": {
                "type": "number"
              },
              "resetsAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "plan": {
                "type": "string"
              },
              "provisional": {
                "type": "boolean"
              }
            },
            "required": [
              "code",
              "message"
            ],
            "additionalProperties": false
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                },
                "platform": {
                  "type": "string"
                },
                "field": {
                  "type": "string"
                },
                "limit": {
                  "type": "number"
                },
                "actual": {
                  "type": "number"
                }
              },
              "required": [
                "code",
                "message",
                "platform"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "error"
        ],
        "additionalProperties": false
      }
    }
  }
}
