{
  "openapi": "3.0.3",
  "info": {
    "title": "Postdot API",
    "description": "The HTTP API for the lightweight, self-hosted Postdot publication orchestrator.",
    "version": "0.1.0"
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "Postdot API key",
        "description": "A user-owned Postdot API key sent as `Authorization: Bearer <token>`. Its project scope is limited by the creator’s current access."
      },
      "sessionCookie": {
        "type": "apiKey",
        "in": "cookie",
        "name": "better-auth.session_token",
        "description": "The Better Auth email/password session cookie used by the web application."
      }
    },
    "schemas": {}
  },
  "security": [
    {
      "bearerAuth": []
    },
    {
      "sessionCookie": []
    }
  ],
  "tags": [
    {
      "name": "System",
      "description": "Service health and runtime information."
    },
    {
      "name": "Access",
      "description": "Instance membership and invitations."
    },
    {
      "name": "Projects",
      "description": "Project lifecycle and access."
    },
    {
      "name": "Channels",
      "description": "Project publication destinations."
    },
    {
      "name": "Posts",
      "description": "Source posts and publication creation."
    },
    {
      "name": "Publications",
      "description": "Publication workflow operations."
    },
    {
      "name": "Taxonomy",
      "description": "Project categories and publication tags."
    },
    {
      "name": "Media",
      "description": "Project media assets and uploads."
    },
    {
      "name": "Settings",
      "description": "Instance-level runtime configuration."
    },
    {
      "name": "Audit",
      "description": "Project audit history."
    },
    {
      "name": "Notifications",
      "description": "Signed-in user notification inboxes with optional project context."
    },
    {
      "name": "Analytics",
      "description": "Provider-neutral publication and execution analytics."
    },
    {
      "name": "Provider Analytics",
      "description": "Persisted provider-owned metric observations."
    }
  ],
  "paths": {
    "/api/recovery/status": {
      "get": {
        "operationId": "getRecoveryStatus",
        "tags": [
          "System"
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "held"
                  ],
                  "properties": {
                    "held": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/health": {
      "get": {
        "operationId": "getHealth",
        "summary": "Check API liveness",
        "tags": [
          "System"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status"
                  ],
                  "properties": {
                    "status": {
                      "type": "string",
                      "const": "ok"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/ready": {
      "get": {
        "operationId": "getReadiness",
        "summary": "Check runtime readiness",
        "tags": [
          "System"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "type": "object",
                      "required": [
                        "status"
                      ],
                      "properties": {
                        "status": {
                          "type": "string",
                          "const": "ready"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "required": [
                        "checks"
                      ],
                      "properties": {
                        "checks": {
                          "type": "object",
                          "required": [
                            "database",
                            "scheduler",
                            "mediaMaintenance",
                            "notifications"
                          ],
                          "properties": {
                            "database": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "const": "ok"
                                },
                                {
                                  "type": "string",
                                  "const": "failed"
                                }
                              ]
                            },
                            "scheduler": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "const": "not_configured"
                                },
                                {
                                  "type": "string",
                                  "const": "idle"
                                },
                                {
                                  "type": "string",
                                  "const": "started"
                                },
                                {
                                  "type": "string",
                                  "const": "running"
                                },
                                {
                                  "type": "string",
                                  "const": "recovering"
                                },
                                {
                                  "type": "string",
                                  "const": "stopped"
                                },
                                {
                                  "type": "string",
                                  "const": "failed"
                                }
                              ]
                            },
                            "mediaMaintenance": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "const": "not_configured"
                                },
                                {
                                  "type": "string",
                                  "const": "idle"
                                },
                                {
                                  "type": "string",
                                  "const": "started"
                                },
                                {
                                  "type": "string",
                                  "const": "running"
                                },
                                {
                                  "type": "string",
                                  "const": "recovering"
                                },
                                {
                                  "type": "string",
                                  "const": "stopped"
                                },
                                {
                                  "type": "string",
                                  "const": "failed"
                                }
                              ]
                            },
                            "notifications": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "const": "not_configured"
                                },
                                {
                                  "type": "string",
                                  "const": "idle"
                                },
                                {
                                  "type": "string",
                                  "const": "started"
                                },
                                {
                                  "type": "string",
                                  "const": "running"
                                },
                                {
                                  "type": "string",
                                  "const": "recovering"
                                },
                                {
                                  "type": "string",
                                  "const": "stopped"
                                },
                                {
                                  "type": "string",
                                  "const": "failed"
                                }
                              ]
                            },
                            "recovery": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "const": "held"
                                },
                                {
                                  "type": "string",
                                  "const": "normal"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Response for status 503",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "type": "object",
                      "required": [
                        "status"
                      ],
                      "properties": {
                        "status": {
                          "type": "string",
                          "const": "not_ready"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "required": [
                        "checks"
                      ],
                      "properties": {
                        "checks": {
                          "type": "object",
                          "required": [
                            "database",
                            "scheduler",
                            "mediaMaintenance",
                            "notifications"
                          ],
                          "properties": {
                            "database": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "const": "ok"
                                },
                                {
                                  "type": "string",
                                  "const": "failed"
                                }
                              ]
                            },
                            "scheduler": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "const": "not_configured"
                                },
                                {
                                  "type": "string",
                                  "const": "idle"
                                },
                                {
                                  "type": "string",
                                  "const": "started"
                                },
                                {
                                  "type": "string",
                                  "const": "running"
                                },
                                {
                                  "type": "string",
                                  "const": "recovering"
                                },
                                {
                                  "type": "string",
                                  "const": "stopped"
                                },
                                {
                                  "type": "string",
                                  "const": "failed"
                                }
                              ]
                            },
                            "mediaMaintenance": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "const": "not_configured"
                                },
                                {
                                  "type": "string",
                                  "const": "idle"
                                },
                                {
                                  "type": "string",
                                  "const": "started"
                                },
                                {
                                  "type": "string",
                                  "const": "running"
                                },
                                {
                                  "type": "string",
                                  "const": "recovering"
                                },
                                {
                                  "type": "string",
                                  "const": "stopped"
                                },
                                {
                                  "type": "string",
                                  "const": "failed"
                                }
                              ]
                            },
                            "notifications": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "const": "not_configured"
                                },
                                {
                                  "type": "string",
                                  "const": "idle"
                                },
                                {
                                  "type": "string",
                                  "const": "started"
                                },
                                {
                                  "type": "string",
                                  "const": "running"
                                },
                                {
                                  "type": "string",
                                  "const": "recovering"
                                },
                                {
                                  "type": "string",
                                  "const": "stopped"
                                },
                                {
                                  "type": "string",
                                  "const": "failed"
                                }
                              ]
                            },
                            "recovery": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "const": "held"
                                },
                                {
                                  "type": "string",
                                  "const": "normal"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/account/avatar": {
      "post": {
        "tags": [
          "Account"
        ],
        "summary": "Replace the signed-in user avatar",
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/octet-stream": {
              "schema": {
                "type": "string",
                "format": "binary"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated personal image URL"
          },
          "400": {
            "description": "Unsupported image"
          },
          "401": {
            "description": "Person session required"
          },
          "403": {
            "description": "Untrusted mutation origin"
          },
          "413": {
            "description": "Image exceeds 5 MB"
          },
          "503": {
            "description": "Avatar storage unavailable"
          }
        },
        "operationId": "postApiAccountAvatar"
      },
      "delete": {
        "tags": [
          "Account"
        ],
        "summary": "Remove the signed-in user avatar",
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "responses": {
          "200": {
            "description": "Avatar removed; the account has no profile image.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    }
                  }
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "401": {
            "description": "An authenticated human session is required."
          },
          "403": {
            "description": "The request origin is not allowed."
          },
          "503": {
            "description": "Avatar storage is unavailable."
          }
        },
        "operationId": "deleteApiAccountAvatar"
      }
    },
    "/api/account/avatars/{id}": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Read a personal avatar inside the authenticated app",
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "responses": {
          "200": {
            "description": "Private PNG, JPEG or WebP image",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "description": "Person session required"
          },
          "404": {
            "description": "Image unavailable"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          }
        ],
        "operationId": "getApiAccountAvatarsById"
      }
    },
    "/api/instance/status": {
      "get": {
        "operationId": "getInstanceSetupStatus",
        "summary": "Check whether first-run instance setup is available",
        "tags": [
          "System"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "setupAvailable"
                  ],
                  "properties": {
                    "setupAvailable": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/access/invitations/{token}": {
      "get": {
        "operationId": "getAccessInvitationPreview",
        "summary": "Preview a public instance invitation",
        "tags": [
          "Access"
        ],
        "security": [],
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "targetEmail",
                    "expiresAt"
                  ],
                  "properties": {
                    "targetEmail": {
                      "type": "string",
                      "minLength": 1
                    },
                    "expiresAt": {
                      "type": "integer",
                      "minimum": 0
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/settings/recovery": {
      "get": {
        "operationId": "getRecoveryState",
        "tags": [
          "Settings"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "held",
                    "hold"
                  ],
                  "properties": {
                    "held": {
                      "type": "boolean"
                    },
                    "hold": {
                      "anyOf": [
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "required": [
                            "version",
                            "token",
                            "createdAt",
                            "reason"
                          ],
                          "properties": {
                            "version": {
                              "type": "number",
                              "const": 1
                            },
                            "token": {
                              "type": "string"
                            },
                            "createdAt": {
                              "type": "string"
                            },
                            "reason": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "const": "restore"
                                },
                                {
                                  "type": "string",
                                  "const": "external_restore"
                                }
                              ]
                            }
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/settings/recovery/resume": {
      "post": {
        "operationId": "resumeAfterRestore",
        "tags": [
          "Settings"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "token",
                  "confirm"
                ],
                "properties": {
                  "token": {
                    "type": "string",
                    "minLength": 1
                  },
                  "confirm": {
                    "type": "boolean",
                    "const": true
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "token",
                  "confirm"
                ],
                "properties": {
                  "token": {
                    "type": "string",
                    "minLength": 1
                  },
                  "confirm": {
                    "type": "boolean",
                    "const": true
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "token",
                  "confirm"
                ],
                "properties": {
                  "token": {
                    "type": "string",
                    "minLength": 1
                  },
                  "confirm": {
                    "type": "boolean",
                    "const": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "held",
                    "hold"
                  ],
                  "properties": {
                    "held": {
                      "type": "boolean"
                    },
                    "hold": {
                      "anyOf": [
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "required": [
                            "version",
                            "token",
                            "createdAt",
                            "reason"
                          ],
                          "properties": {
                            "version": {
                              "type": "number",
                              "const": 1
                            },
                            "token": {
                              "type": "string"
                            },
                            "createdAt": {
                              "type": "string"
                            },
                            "reason": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "const": "restore"
                                },
                                {
                                  "type": "string",
                                  "const": "external_restore"
                                }
                              ]
                            }
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/settings/email": {
      "get": {
        "operationId": "getEmailSettings",
        "summary": "Read installation SMTP settings",
        "tags": [
          "Configuration"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "host",
                    "port",
                    "secure",
                    "from",
                    "username",
                    "enabled",
                    "hasPassword",
                    "source"
                  ],
                  "properties": {
                    "host": {
                      "type": "string"
                    },
                    "port": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 65535
                    },
                    "secure": {
                      "type": "boolean"
                    },
                    "from": {
                      "type": "string"
                    },
                    "username": {
                      "type": "string",
                      "maxLength": 320
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "hasPassword": {
                      "type": "boolean"
                    },
                    "source": {
                      "type": "string",
                      "enum": [
                        "database",
                        "deployment",
                        "none"
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Response for status 503",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "saveEmailSettings",
        "summary": "Save encrypted installation SMTP settings",
        "tags": [
          "Configuration"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "host",
                  "port",
                  "secure",
                  "from",
                  "username",
                  "enabled"
                ],
                "properties": {
                  "host": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 253,
                    "pattern": "^[^\\s/:]+$"
                  },
                  "port": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 65535
                  },
                  "secure": {
                    "type": "boolean"
                  },
                  "from": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 320,
                    "pattern": "^[^\\r\\n]+@[^\\r\\n]+$"
                  },
                  "username": {
                    "type": "string",
                    "maxLength": 320
                  },
                  "enabled": {
                    "type": "boolean"
                  },
                  "password": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 4096
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "host",
                  "port",
                  "secure",
                  "from",
                  "username",
                  "enabled"
                ],
                "properties": {
                  "host": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 253,
                    "pattern": "^[^\\s/:]+$"
                  },
                  "port": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 65535
                  },
                  "secure": {
                    "type": "boolean"
                  },
                  "from": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 320,
                    "pattern": "^[^\\r\\n]+@[^\\r\\n]+$"
                  },
                  "username": {
                    "type": "string",
                    "maxLength": 320
                  },
                  "enabled": {
                    "type": "boolean"
                  },
                  "password": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 4096
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "host",
                  "port",
                  "secure",
                  "from",
                  "username",
                  "enabled"
                ],
                "properties": {
                  "host": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 253,
                    "pattern": "^[^\\s/:]+$"
                  },
                  "port": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 65535
                  },
                  "secure": {
                    "type": "boolean"
                  },
                  "from": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 320,
                    "pattern": "^[^\\r\\n]+@[^\\r\\n]+$"
                  },
                  "username": {
                    "type": "string",
                    "maxLength": 320
                  },
                  "enabled": {
                    "type": "boolean"
                  },
                  "password": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 4096
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "host",
                    "port",
                    "secure",
                    "from",
                    "username",
                    "enabled",
                    "hasPassword",
                    "source"
                  ],
                  "properties": {
                    "host": {
                      "type": "string"
                    },
                    "port": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 65535
                    },
                    "secure": {
                      "type": "boolean"
                    },
                    "from": {
                      "type": "string"
                    },
                    "username": {
                      "type": "string",
                      "maxLength": 320
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "hasPassword": {
                      "type": "boolean"
                    },
                    "source": {
                      "type": "string",
                      "enum": [
                        "database",
                        "deployment",
                        "none"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Response for status 503",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/settings/email/test": {
      "post": {
        "operationId": "testEmailSettings",
        "summary": "Send a test email to the current administrator",
        "tags": [
          "Configuration"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "accepted"
                  ],
                  "properties": {
                    "accepted": {
                      "type": "boolean",
                      "const": true
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Response for status 503",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/access": {
      "get": {
        "operationId": "getCurrentInstanceAccess",
        "summary": "Get the current user instance access summary",
        "tags": [
          "Access"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "instance",
                    "membership",
                    "isAdmin"
                  ],
                  "properties": {
                    "instance": {
                      "type": "object",
                      "required": [
                        "id",
                        "state",
                        "bootstrapBlocked",
                        "claimedByUserId",
                        "claimedAt",
                        "defaultWorkspaceId",
                        "createdAt",
                        "updatedAt"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "const": "default"
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "claimable",
                            "claimed"
                          ]
                        },
                        "bootstrapBlocked": {
                          "type": "boolean"
                        },
                        "claimedByUserId": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "claimedAt": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": 0
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "defaultWorkspaceId": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    },
                    "membership": {
                      "anyOf": [
                        {
                          "type": "object",
                          "required": [
                            "id",
                            "userId",
                            "email",
                            "name",
                            "role",
                            "state",
                            "createdAt",
                            "updatedAt"
                          ],
                          "properties": {
                            "id": {
                              "type": "string",
                              "minLength": 1
                            },
                            "userId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "email": {
                              "type": "string",
                              "minLength": 1
                            },
                            "name": {
                              "type": "string",
                              "minLength": 1
                            },
                            "role": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "const": "admin"
                                },
                                {
                                  "type": "string",
                                  "const": "member"
                                }
                              ]
                            },
                            "state": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "const": "enabled"
                                },
                                {
                                  "type": "string",
                                  "const": "disabled"
                                }
                              ]
                            },
                            "createdAt": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "updatedAt": {
                              "type": "integer",
                              "minimum": 0
                            }
                          }
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "isAdmin": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/access/members": {
      "get": {
        "operationId": "listAccessMembers",
        "summary": "List instance members",
        "tags": [
          "Access"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "members"
                  ],
                  "properties": {
                    "members": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "userId",
                          "email",
                          "name",
                          "role",
                          "state",
                          "createdAt",
                          "updatedAt"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "minLength": 1
                          },
                          "userId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "email": {
                            "type": "string",
                            "minLength": 1
                          },
                          "name": {
                            "type": "string",
                            "minLength": 1
                          },
                          "role": {
                            "type": "string",
                            "enum": [
                              "admin",
                              "member"
                            ]
                          },
                          "state": {
                            "type": "string",
                            "enum": [
                              "enabled",
                              "disabled"
                            ]
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "updatedAt": {
                            "type": "integer",
                            "minimum": 0
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/access/members/{userId}": {
      "patch": {
        "operationId": "updateAccessMember",
        "summary": "Update an instance member role or state",
        "tags": [
          "Access"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "role": {
                    "type": "string",
                    "enum": [
                      "admin",
                      "member"
                    ]
                  },
                  "state": {
                    "type": "string",
                    "enum": [
                      "enabled",
                      "disabled"
                    ]
                  }
                },
                "minProperties": 1
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "role": {
                    "type": "string",
                    "enum": [
                      "admin",
                      "member"
                    ]
                  },
                  "state": {
                    "type": "string",
                    "enum": [
                      "enabled",
                      "disabled"
                    ]
                  }
                },
                "minProperties": 1
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "role": {
                    "type": "string",
                    "enum": [
                      "admin",
                      "member"
                    ]
                  },
                  "state": {
                    "type": "string",
                    "enum": [
                      "enabled",
                      "disabled"
                    ]
                  }
                },
                "minProperties": 1
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "membership"
                  ],
                  "properties": {
                    "membership": {
                      "type": "object",
                      "required": [
                        "id",
                        "userId",
                        "email",
                        "name",
                        "role",
                        "state",
                        "createdAt",
                        "updatedAt"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1
                        },
                        "userId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "email": {
                          "type": "string",
                          "minLength": 1
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1
                        },
                        "role": {
                          "type": "string",
                          "enum": [
                            "admin",
                            "member"
                          ]
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "enabled",
                            "disabled"
                          ]
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Response for status 422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Response for status 503",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/access/invitations": {
      "get": {
        "operationId": "listAccessInvitations",
        "summary": "List instance invitations",
        "tags": [
          "Access"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "invitations"
                  ],
                  "properties": {
                    "invitations": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "targetEmail",
                          "instanceRole",
                          "state",
                          "createdByUserId",
                          "expiresAt",
                          "acceptedAt",
                          "acceptedByUserId",
                          "revokedAt",
                          "createdAt",
                          "updatedAt"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "minLength": 1
                          },
                          "targetEmail": {
                            "type": "string",
                            "minLength": 1
                          },
                          "instanceRole": {
                            "type": "string",
                            "const": "member"
                          },
                          "state": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "accepted",
                              "revoked",
                              "expired"
                            ]
                          },
                          "createdByUserId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "expiresAt": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "acceptedAt": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": 0
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "acceptedByUserId": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "revokedAt": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": 0
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "updatedAt": {
                            "type": "integer",
                            "minimum": 0
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createAccessInvitation",
        "summary": "Create an instance invitation",
        "tags": [
          "Access"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "targetEmail"
                ],
                "properties": {
                  "targetEmail": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 320
                  },
                  "expiresAt": {
                    "type": "integer",
                    "minimum": 0
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "targetEmail"
                ],
                "properties": {
                  "targetEmail": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 320
                  },
                  "expiresAt": {
                    "type": "integer",
                    "minimum": 0
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "targetEmail"
                ],
                "properties": {
                  "targetEmail": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 320
                  },
                  "expiresAt": {
                    "type": "integer",
                    "minimum": 0
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Response for status 201",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "invitation",
                    "token"
                  ],
                  "properties": {
                    "invitation": {
                      "type": "object",
                      "required": [
                        "id",
                        "targetEmail",
                        "instanceRole",
                        "state",
                        "createdByUserId",
                        "expiresAt",
                        "acceptedAt",
                        "acceptedByUserId",
                        "revokedAt",
                        "createdAt",
                        "updatedAt"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1
                        },
                        "targetEmail": {
                          "type": "string",
                          "minLength": 1
                        },
                        "instanceRole": {
                          "type": "string",
                          "const": "member"
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "pending",
                            "accepted",
                            "revoked",
                            "expired"
                          ]
                        },
                        "createdByUserId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "expiresAt": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "acceptedAt": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": 0
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "acceptedByUserId": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "revokedAt": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": 0
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    },
                    "token": {
                      "type": "string",
                      "minLength": 1
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/access/invitations/{invitationId}": {
      "delete": {
        "operationId": "revokeAccessInvitation",
        "summary": "Revoke an instance invitation",
        "tags": [
          "Access"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "invitationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "invitation"
                  ],
                  "properties": {
                    "invitation": {
                      "type": "object",
                      "required": [
                        "id",
                        "targetEmail",
                        "instanceRole",
                        "state",
                        "createdByUserId",
                        "expiresAt",
                        "acceptedAt",
                        "acceptedByUserId",
                        "revokedAt",
                        "createdAt",
                        "updatedAt"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1
                        },
                        "targetEmail": {
                          "type": "string",
                          "minLength": 1
                        },
                        "instanceRole": {
                          "type": "string",
                          "const": "member"
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "pending",
                            "accepted",
                            "revoked",
                            "expired"
                          ]
                        },
                        "createdByUserId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "expiresAt": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "acceptedAt": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": 0
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "acceptedByUserId": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "revokedAt": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": 0
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/access/invitations/accept": {
      "post": {
        "operationId": "acceptAccessInvitation",
        "summary": "Accept an instance invitation for the current user",
        "tags": [
          "Access"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "token"
                ],
                "properties": {
                  "token": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "token"
                ],
                "properties": {
                  "token": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "token"
                ],
                "properties": {
                  "token": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "invitation",
                    "instanceMembership"
                  ],
                  "properties": {
                    "invitation": {
                      "type": "object",
                      "required": [
                        "id",
                        "targetEmail",
                        "instanceRole",
                        "state",
                        "createdByUserId",
                        "expiresAt",
                        "acceptedAt",
                        "acceptedByUserId",
                        "revokedAt",
                        "createdAt",
                        "updatedAt"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1
                        },
                        "targetEmail": {
                          "type": "string",
                          "minLength": 1
                        },
                        "instanceRole": {
                          "type": "string",
                          "const": "member"
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "pending",
                            "accepted",
                            "revoked",
                            "expired"
                          ]
                        },
                        "createdByUserId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "expiresAt": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "acceptedAt": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": 0
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "acceptedByUserId": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "revokedAt": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": 0
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    },
                    "instanceMembership": {
                      "type": "object",
                      "required": [
                        "id",
                        "userId",
                        "email",
                        "name",
                        "role",
                        "state",
                        "createdAt",
                        "updatedAt"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1
                        },
                        "userId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "email": {
                          "type": "string",
                          "minLength": 1
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1
                        },
                        "role": {
                          "type": "string",
                          "enum": [
                            "admin",
                            "member"
                          ]
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "enabled",
                            "disabled"
                          ]
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/api-keys": {
      "get": {
        "operationId": "listUserApiKeys",
        "summary": "List API keys owned by the current user",
        "tags": [
          "Access"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "keys"
                  ],
                  "properties": {
                    "keys": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "name",
                          "tokenPrefix",
                          "projectAccess",
                          "actionAccess",
                          "expiresAt",
                          "createdAt",
                          "updatedAt"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "minLength": 1
                          },
                          "name": {
                            "type": "string",
                            "minLength": 1
                          },
                          "tokenPrefix": {
                            "type": "string",
                            "minLength": 1
                          },
                          "projectAccess": {
                            "anyOf": [
                              {
                                "type": "string",
                                "const": "all"
                              },
                              {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1
                                }
                              }
                            ]
                          },
                          "actionAccess": {
                            "anyOf": [
                              {
                                "type": "string",
                                "const": "all"
                              },
                              {
                                "type": "array",
                                "items": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "const": "project:read"
                                    },
                                    {
                                      "type": "string",
                                      "const": "publication:manage"
                                    },
                                    {
                                      "type": "string",
                                      "const": "publication:dispatch"
                                    },
                                    {
                                      "type": "string",
                                      "const": "channel:manage"
                                    },
                                    {
                                      "type": "string",
                                      "const": "media:manage"
                                    },
                                    {
                                      "type": "string",
                                      "const": "analytics:refresh"
                                    },
                                    {
                                      "type": "string",
                                      "const": "media:permanently_delete"
                                    }
                                  ]
                                }
                              }
                            ]
                          },
                          "expiresAt": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": 0
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "updatedAt": {
                            "type": "integer",
                            "minimum": 0
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createUserApiKey",
        "summary": "Create a user-owned Postdot API key",
        "tags": [
          "Access"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 100
                  },
                  "projectIds": {
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1
                        },
                        "minItems": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "actionAccess": {
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "anyOf": [
                            {
                              "type": "string",
                              "const": "project:read"
                            },
                            {
                              "type": "string",
                              "const": "publication:manage"
                            },
                            {
                              "type": "string",
                              "const": "publication:dispatch"
                            },
                            {
                              "type": "string",
                              "const": "channel:manage"
                            },
                            {
                              "type": "string",
                              "const": "media:manage"
                            },
                            {
                              "type": "string",
                              "const": "analytics:refresh"
                            },
                            {
                              "type": "string",
                              "const": "media:permanently_delete"
                            }
                          ]
                        },
                        "minItems": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "expiresAt": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 0
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 100
                  },
                  "projectIds": {
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1
                        },
                        "minItems": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "actionAccess": {
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "anyOf": [
                            {
                              "type": "string",
                              "const": "project:read"
                            },
                            {
                              "type": "string",
                              "const": "publication:manage"
                            },
                            {
                              "type": "string",
                              "const": "publication:dispatch"
                            },
                            {
                              "type": "string",
                              "const": "channel:manage"
                            },
                            {
                              "type": "string",
                              "const": "media:manage"
                            },
                            {
                              "type": "string",
                              "const": "analytics:refresh"
                            },
                            {
                              "type": "string",
                              "const": "media:permanently_delete"
                            }
                          ]
                        },
                        "minItems": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "expiresAt": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 0
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 100
                  },
                  "projectIds": {
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1
                        },
                        "minItems": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "actionAccess": {
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "anyOf": [
                            {
                              "type": "string",
                              "const": "project:read"
                            },
                            {
                              "type": "string",
                              "const": "publication:manage"
                            },
                            {
                              "type": "string",
                              "const": "publication:dispatch"
                            },
                            {
                              "type": "string",
                              "const": "channel:manage"
                            },
                            {
                              "type": "string",
                              "const": "media:manage"
                            },
                            {
                              "type": "string",
                              "const": "analytics:refresh"
                            },
                            {
                              "type": "string",
                              "const": "media:permanently_delete"
                            }
                          ]
                        },
                        "minItems": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "expiresAt": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 0
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Response for status 201",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "key",
                    "token"
                  ],
                  "properties": {
                    "key": {
                      "type": "object",
                      "required": [
                        "id",
                        "name",
                        "tokenPrefix",
                        "projectAccess",
                        "actionAccess",
                        "expiresAt",
                        "createdAt",
                        "updatedAt"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1
                        },
                        "tokenPrefix": {
                          "type": "string",
                          "minLength": 1
                        },
                        "projectAccess": {
                          "anyOf": [
                            {
                              "type": "string",
                              "const": "all"
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1
                              }
                            }
                          ]
                        },
                        "actionAccess": {
                          "anyOf": [
                            {
                              "type": "string",
                              "const": "all"
                            },
                            {
                              "type": "array",
                              "items": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "const": "project:read"
                                  },
                                  {
                                    "type": "string",
                                    "const": "publication:manage"
                                  },
                                  {
                                    "type": "string",
                                    "const": "publication:dispatch"
                                  },
                                  {
                                    "type": "string",
                                    "const": "channel:manage"
                                  },
                                  {
                                    "type": "string",
                                    "const": "media:manage"
                                  },
                                  {
                                    "type": "string",
                                    "const": "analytics:refresh"
                                  },
                                  {
                                    "type": "string",
                                    "const": "media:permanently_delete"
                                  }
                                ]
                              }
                            }
                          ]
                        },
                        "expiresAt": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": 0
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    },
                    "token": {
                      "type": "string",
                      "minLength": 1,
                      "description": "The plaintext API key. It is returned only once when the key is created."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/api-keys/{keyId}": {
      "patch": {
        "operationId": "updateUserApiKey",
        "summary": "Update a user-owned Postdot API key",
        "tags": [
          "Access"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "keyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "projectIds": {
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1
                        },
                        "minItems": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "actionAccess": {
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "anyOf": [
                            {
                              "type": "string",
                              "const": "project:read"
                            },
                            {
                              "type": "string",
                              "const": "publication:manage"
                            },
                            {
                              "type": "string",
                              "const": "publication:dispatch"
                            },
                            {
                              "type": "string",
                              "const": "channel:manage"
                            },
                            {
                              "type": "string",
                              "const": "media:manage"
                            },
                            {
                              "type": "string",
                              "const": "analytics:refresh"
                            },
                            {
                              "type": "string",
                              "const": "media:permanently_delete"
                            }
                          ]
                        },
                        "minItems": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "expiresAt": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 0
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "minProperties": 1
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "projectIds": {
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1
                        },
                        "minItems": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "actionAccess": {
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "anyOf": [
                            {
                              "type": "string",
                              "const": "project:read"
                            },
                            {
                              "type": "string",
                              "const": "publication:manage"
                            },
                            {
                              "type": "string",
                              "const": "publication:dispatch"
                            },
                            {
                              "type": "string",
                              "const": "channel:manage"
                            },
                            {
                              "type": "string",
                              "const": "media:manage"
                            },
                            {
                              "type": "string",
                              "const": "analytics:refresh"
                            },
                            {
                              "type": "string",
                              "const": "media:permanently_delete"
                            }
                          ]
                        },
                        "minItems": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "expiresAt": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 0
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "minProperties": 1
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "projectIds": {
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1
                        },
                        "minItems": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "actionAccess": {
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "anyOf": [
                            {
                              "type": "string",
                              "const": "project:read"
                            },
                            {
                              "type": "string",
                              "const": "publication:manage"
                            },
                            {
                              "type": "string",
                              "const": "publication:dispatch"
                            },
                            {
                              "type": "string",
                              "const": "channel:manage"
                            },
                            {
                              "type": "string",
                              "const": "media:manage"
                            },
                            {
                              "type": "string",
                              "const": "analytics:refresh"
                            },
                            {
                              "type": "string",
                              "const": "media:permanently_delete"
                            }
                          ]
                        },
                        "minItems": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "expiresAt": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 0
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "minProperties": 1
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "key"
                  ],
                  "properties": {
                    "key": {
                      "type": "object",
                      "required": [
                        "id",
                        "name",
                        "tokenPrefix",
                        "projectAccess",
                        "actionAccess",
                        "expiresAt",
                        "createdAt",
                        "updatedAt"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1
                        },
                        "tokenPrefix": {
                          "type": "string",
                          "minLength": 1
                        },
                        "projectAccess": {
                          "anyOf": [
                            {
                              "type": "string",
                              "const": "all"
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1
                              }
                            }
                          ]
                        },
                        "actionAccess": {
                          "anyOf": [
                            {
                              "type": "string",
                              "const": "all"
                            },
                            {
                              "type": "array",
                              "items": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "const": "project:read"
                                  },
                                  {
                                    "type": "string",
                                    "const": "publication:manage"
                                  },
                                  {
                                    "type": "string",
                                    "const": "publication:dispatch"
                                  },
                                  {
                                    "type": "string",
                                    "const": "channel:manage"
                                  },
                                  {
                                    "type": "string",
                                    "const": "media:manage"
                                  },
                                  {
                                    "type": "string",
                                    "const": "analytics:refresh"
                                  },
                                  {
                                    "type": "string",
                                    "const": "media:permanently_delete"
                                  }
                                ]
                              }
                            }
                          ]
                        },
                        "expiresAt": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": 0
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteUserApiKey",
        "summary": "Delete a user-owned Postdot API key",
        "tags": [
          "Access"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "keyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "deleted"
                  ],
                  "properties": {
                    "deleted": {
                      "type": "boolean",
                      "const": true
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/workspaces": {
      "post": {
        "operationId": "createWorkspace",
        "summary": "Create a workspace for the Postdot instance",
        "tags": [
          "Access"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Response for status 201",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "workspace"
                  ],
                  "properties": {
                    "workspace": {
                      "allOf": [
                        {
                          "type": "object",
                          "required": [
                            "id",
                            "name",
                            "slug",
                            "isDefault",
                            "createdAt",
                            "updatedAt"
                          ],
                          "properties": {
                            "id": {
                              "type": "string",
                              "minLength": 1
                            },
                            "name": {
                              "type": "string",
                              "minLength": 1
                            },
                            "slug": {
                              "type": "string",
                              "minLength": 1
                            },
                            "isDefault": {
                              "type": "boolean"
                            },
                            "createdAt": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "updatedAt": {
                              "type": "integer",
                              "minimum": 0
                            }
                          }
                        },
                        {
                          "type": "object",
                          "required": [
                            "role"
                          ],
                          "properties": {
                            "role": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "const": "owner"
                                },
                                {
                                  "type": "string",
                                  "const": "admin"
                                },
                                {
                                  "type": "string",
                                  "const": "member"
                                }
                              ]
                            }
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Response for status 503",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "listWorkspaces",
        "summary": "List workspaces available to the current user",
        "tags": [
          "Access"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "workspaces",
                    "canCreateWorkspace"
                  ],
                  "properties": {
                    "workspaces": {
                      "type": "array",
                      "items": {
                        "allOf": [
                          {
                            "type": "object",
                            "required": [
                              "id",
                              "name",
                              "slug",
                              "isDefault",
                              "createdAt",
                              "updatedAt"
                            ],
                            "properties": {
                              "id": {
                                "type": "string",
                                "minLength": 1
                              },
                              "name": {
                                "type": "string",
                                "minLength": 1
                              },
                              "slug": {
                                "type": "string",
                                "minLength": 1
                              },
                              "isDefault": {
                                "type": "boolean"
                              },
                              "createdAt": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "updatedAt": {
                                "type": "integer",
                                "minimum": 0
                              }
                            }
                          },
                          {
                            "type": "object",
                            "required": [
                              "role"
                            ],
                            "properties": {
                              "role": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "const": "owner"
                                  },
                                  {
                                    "type": "string",
                                    "const": "admin"
                                  },
                                  {
                                    "type": "string",
                                    "const": "member"
                                  }
                                ]
                              }
                            }
                          }
                        ]
                      }
                    },
                    "canCreateWorkspace": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}": {
      "get": {
        "operationId": "getWorkspace",
        "summary": "Get a workspace and its groups",
        "tags": [
          "Access"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "workspace",
                    "membership",
                    "members",
                    "teams"
                  ],
                  "properties": {
                    "workspace": {
                      "type": "object",
                      "required": [
                        "id",
                        "name",
                        "slug",
                        "isDefault",
                        "createdAt",
                        "updatedAt"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1
                        },
                        "slug": {
                          "type": "string",
                          "minLength": 1
                        },
                        "isDefault": {
                          "type": "boolean"
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    },
                    "membership": {
                      "type": "object",
                      "required": [
                        "role"
                      ],
                      "properties": {
                        "role": {
                          "type": "string",
                          "enum": [
                            "owner",
                            "admin",
                            "member"
                          ]
                        }
                      }
                    },
                    "members": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "userId",
                          "email",
                          "name",
                          "image",
                          "role",
                          "createdAt"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "minLength": 1
                          },
                          "userId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "email": {
                            "type": "string",
                            "minLength": 1
                          },
                          "name": {
                            "type": "string",
                            "minLength": 1
                          },
                          "image": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "role": {
                            "type": "string",
                            "minLength": 1
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": 0
                          }
                        }
                      }
                    },
                    "teams": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "name",
                          "memberCount",
                          "isDefault",
                          "createdAt",
                          "updatedAt"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "minLength": 1
                          },
                          "name": {
                            "type": "string",
                            "minLength": 1
                          },
                          "memberCount": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "isDefault": {
                            "type": "boolean"
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "updatedAt": {
                            "type": "integer",
                            "minimum": 0
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Response for status 503",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/members/{memberId}": {
      "patch": {
        "operationId": "updateWorkspaceMemberRole",
        "summary": "Update a workspace member role",
        "tags": [
          "Access"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "memberId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "role"
                ],
                "properties": {
                  "role": {
                    "type": "string",
                    "enum": [
                      "admin",
                      "member"
                    ]
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "role"
                ],
                "properties": {
                  "role": {
                    "type": "string",
                    "enum": [
                      "admin",
                      "member"
                    ]
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "role"
                ],
                "properties": {
                  "role": {
                    "type": "string",
                    "enum": [
                      "admin",
                      "member"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "member"
                  ],
                  "properties": {
                    "member": {
                      "type": "object",
                      "required": [
                        "id",
                        "userId",
                        "email",
                        "name",
                        "image",
                        "role",
                        "createdAt"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1
                        },
                        "userId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "email": {
                          "type": "string",
                          "minLength": 1
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1
                        },
                        "image": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "role": {
                          "type": "string",
                          "minLength": 1
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Response for status 503",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "removeWorkspaceMember",
        "summary": "Remove a member from a workspace",
        "tags": [
          "Access"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "memberId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "removed"
                  ],
                  "properties": {
                    "removed": {
                      "type": "boolean",
                      "const": true
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Response for status 503",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/teams": {
      "post": {
        "operationId": "createWorkspaceTeam",
        "summary": "Create a workspace group",
        "tags": [
          "Access"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Response for status 201",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "team"
                  ],
                  "properties": {
                    "team": {
                      "type": "object",
                      "required": [
                        "id",
                        "name",
                        "memberCount",
                        "isDefault",
                        "createdAt",
                        "updatedAt"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1
                        },
                        "memberCount": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "isDefault": {
                          "type": "boolean"
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/teams/{teamId}": {
      "patch": {
        "operationId": "renameWorkspaceTeam",
        "summary": "Rename a workspace group",
        "tags": [
          "Access"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "team"
                  ],
                  "properties": {
                    "team": {
                      "type": "object",
                      "required": [
                        "id",
                        "name",
                        "memberCount",
                        "isDefault",
                        "createdAt",
                        "updatedAt"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1
                        },
                        "memberCount": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "isDefault": {
                          "type": "boolean"
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/teams/{teamId}/members": {
      "get": {
        "operationId": "listWorkspaceTeamMembers",
        "summary": "List members of a workspace group",
        "tags": [
          "Access"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "members"
                  ],
                  "properties": {
                    "members": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "teamId",
                          "userId",
                          "createdAt"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "minLength": 1
                          },
                          "teamId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "userId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": 0
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Response for status 503",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "addWorkspaceTeamMember",
        "summary": "Add a member to a workspace group",
        "tags": [
          "Access"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "userId"
                ],
                "properties": {
                  "userId": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "userId"
                ],
                "properties": {
                  "userId": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "userId"
                ],
                "properties": {
                  "userId": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "member"
                  ],
                  "properties": {
                    "member": {
                      "type": "object",
                      "required": [
                        "id",
                        "teamId",
                        "userId",
                        "createdAt"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1
                        },
                        "teamId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "userId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/teams/{teamId}/members/{userId}": {
      "delete": {
        "operationId": "removeWorkspaceTeamMember",
        "summary": "Remove a member from a workspace group",
        "tags": [
          "Access"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "removed"
                  ],
                  "properties": {
                    "removed": {
                      "type": "boolean",
                      "const": true
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/invitations": {
      "get": {
        "operationId": "listWorkspaceInvitations",
        "summary": "List pending workspace invitations",
        "tags": [
          "Access"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "invitations"
                  ],
                  "properties": {
                    "invitations": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "email",
                          "role",
                          "inviterId",
                          "status",
                          "expiresAt",
                          "createdAt"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "minLength": 1
                          },
                          "email": {
                            "type": "string",
                            "minLength": 1
                          },
                          "role": {
                            "type": "string",
                            "minLength": 1
                          },
                          "teamId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "inviterId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "status": {
                            "type": "string",
                            "minLength": 1
                          },
                          "expiresAt": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": 0
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Response for status 503",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createWorkspaceInvitation",
        "summary": "Invite a member to a workspace group",
        "tags": [
          "Access"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "email"
                ],
                "properties": {
                  "email": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 320
                  },
                  "role": {
                    "type": "string",
                    "enum": [
                      "admin",
                      "member"
                    ]
                  },
                  "teamId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "resend": {
                    "type": "boolean"
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "email"
                ],
                "properties": {
                  "email": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 320
                  },
                  "role": {
                    "type": "string",
                    "enum": [
                      "admin",
                      "member"
                    ]
                  },
                  "teamId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "resend": {
                    "type": "boolean"
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "email"
                ],
                "properties": {
                  "email": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 320
                  },
                  "role": {
                    "type": "string",
                    "enum": [
                      "admin",
                      "member"
                    ]
                  },
                  "teamId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "resend": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Response for status 201",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "invitation"
                  ],
                  "properties": {
                    "invitation": {
                      "type": "object",
                      "required": [
                        "id",
                        "email",
                        "role",
                        "inviterId",
                        "status",
                        "expiresAt",
                        "createdAt"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1
                        },
                        "email": {
                          "type": "string",
                          "minLength": 1
                        },
                        "role": {
                          "type": "string",
                          "minLength": 1
                        },
                        "teamId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "inviterId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "status": {
                          "type": "string",
                          "minLength": 1
                        },
                        "expiresAt": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Response for status 503",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/invitations/{invitationId}": {
      "delete": {
        "operationId": "cancelWorkspaceInvitation",
        "summary": "Cancel a workspace invitation",
        "tags": [
          "Access"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "invitationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "invitation"
                  ],
                  "properties": {
                    "invitation": {
                      "type": "object",
                      "required": [
                        "id",
                        "email",
                        "role",
                        "inviterId",
                        "status",
                        "expiresAt",
                        "createdAt"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1
                        },
                        "email": {
                          "type": "string",
                          "minLength": 1
                        },
                        "role": {
                          "type": "string",
                          "minLength": 1
                        },
                        "teamId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "inviterId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "status": {
                          "type": "string",
                          "minLength": 1
                        },
                        "expiresAt": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Response for status 503",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/invitations/{invitationId}/accept": {
      "post": {
        "operationId": "acceptWorkspaceInvitation",
        "summary": "Accept a workspace invitation",
        "tags": [
          "Access"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "invitationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "workspace",
                    "membership",
                    "invitation"
                  ],
                  "properties": {
                    "workspace": {
                      "type": "object",
                      "required": [
                        "id",
                        "name",
                        "slug",
                        "isDefault",
                        "createdAt",
                        "updatedAt"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1
                        },
                        "slug": {
                          "type": "string",
                          "minLength": 1
                        },
                        "isDefault": {
                          "type": "boolean"
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    },
                    "membership": {
                      "type": "object",
                      "required": [
                        "role"
                      ],
                      "properties": {
                        "role": {
                          "type": "string",
                          "enum": [
                            "owner",
                            "admin",
                            "member"
                          ]
                        }
                      }
                    },
                    "invitation": {
                      "type": "object",
                      "required": [
                        "id",
                        "email",
                        "role",
                        "inviterId",
                        "status",
                        "expiresAt",
                        "createdAt"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1
                        },
                        "email": {
                          "type": "string",
                          "minLength": 1
                        },
                        "role": {
                          "type": "string",
                          "minLength": 1
                        },
                        "teamId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "inviterId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "status": {
                          "type": "string",
                          "minLength": 1
                        },
                        "expiresAt": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Response for status 503",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/settings/provider-applications": {
      "get": {
        "operationId": "listProviderApplicationConfigurations",
        "summary": "List runtime provider application configurations",
        "tags": [
          "Settings"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "applications",
                    "xCallbackUri",
                    "facebookCallbackUri",
                    "instagramCallbackUri"
                  ],
                  "properties": {
                    "applications": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "providerId",
                          "name",
                          "clientId",
                          "clientMetadataUrl",
                          "handleResolver",
                          "oauthMode",
                          "state",
                          "isDefault",
                          "createdByUserId",
                          "hasClientSecret",
                          "createdAt",
                          "updatedAt"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "minLength": 1
                          },
                          "providerId": {
                            "type": "string",
                            "enum": [
                              "linkedin",
                              "bluesky",
                              "x",
                              "facebook",
                              "instagram"
                            ]
                          },
                          "name": {
                            "type": "string",
                            "minLength": 1
                          },
                          "clientId": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "clientMetadataUrl": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "handleResolver": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "oauthMode": {
                            "anyOf": [
                              {
                                "type": "string",
                                "const": "loopback"
                              },
                              {
                                "type": "string",
                                "const": "web"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "state": {
                            "type": "string",
                            "enum": [
                              "active",
                              "disabled"
                            ]
                          },
                          "isDefault": {
                            "type": "boolean"
                          },
                          "createdByUserId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "hasClientSecret": {
                            "type": "boolean"
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "updatedAt": {
                            "type": "integer",
                            "minimum": 0
                          }
                        }
                      }
                    },
                    "xCallbackUri": {
                      "type": "string",
                      "minLength": 1
                    },
                    "facebookCallbackUri": {
                      "type": "string",
                      "minLength": 1
                    },
                    "instagramCallbackUri": {
                      "type": "string",
                      "minLength": 1
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createProviderApplicationConfiguration",
        "summary": "Create a runtime provider application configuration",
        "tags": [
          "Settings"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "providerId",
                  "name"
                ],
                "properties": {
                  "providerId": {
                    "type": "string",
                    "enum": [
                      "linkedin",
                      "bluesky",
                      "x",
                      "facebook",
                      "instagram"
                    ]
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "clientId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "clientMetadataUrl": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "handleResolver": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "clientSecret": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "state": {
                    "type": "string",
                    "enum": [
                      "active",
                      "disabled"
                    ]
                  },
                  "isDefault": {
                    "type": "boolean"
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "providerId",
                  "name"
                ],
                "properties": {
                  "providerId": {
                    "type": "string",
                    "enum": [
                      "linkedin",
                      "bluesky",
                      "x",
                      "facebook",
                      "instagram"
                    ]
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "clientId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "clientMetadataUrl": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "handleResolver": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "clientSecret": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "state": {
                    "type": "string",
                    "enum": [
                      "active",
                      "disabled"
                    ]
                  },
                  "isDefault": {
                    "type": "boolean"
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "providerId",
                  "name"
                ],
                "properties": {
                  "providerId": {
                    "type": "string",
                    "enum": [
                      "linkedin",
                      "bluesky",
                      "x",
                      "facebook",
                      "instagram"
                    ]
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "clientId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "clientMetadataUrl": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "handleResolver": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "clientSecret": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "state": {
                    "type": "string",
                    "enum": [
                      "active",
                      "disabled"
                    ]
                  },
                  "isDefault": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Response for status 201",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "application"
                  ],
                  "properties": {
                    "application": {
                      "type": "object",
                      "required": [
                        "id",
                        "providerId",
                        "name",
                        "clientId",
                        "clientMetadataUrl",
                        "handleResolver",
                        "oauthMode",
                        "state",
                        "isDefault",
                        "createdByUserId",
                        "hasClientSecret",
                        "createdAt",
                        "updatedAt"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1
                        },
                        "providerId": {
                          "type": "string",
                          "enum": [
                            "linkedin",
                            "bluesky",
                            "x",
                            "facebook",
                            "instagram"
                          ]
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1
                        },
                        "clientId": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "clientMetadataUrl": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "handleResolver": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "oauthMode": {
                          "anyOf": [
                            {
                              "type": "string",
                              "const": "loopback"
                            },
                            {
                              "type": "string",
                              "const": "web"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "active",
                            "disabled"
                          ]
                        },
                        "isDefault": {
                          "type": "boolean"
                        },
                        "createdByUserId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "hasClientSecret": {
                          "type": "boolean"
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/settings/provider-applications/{applicationId}": {
      "patch": {
        "operationId": "updateProviderApplicationConfiguration",
        "summary": "Update or disable a runtime provider application configuration",
        "tags": [
          "Settings"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "clientId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "clientMetadataUrl": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "handleResolver": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "clientSecret": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "state": {
                    "type": "string",
                    "enum": [
                      "active",
                      "disabled"
                    ]
                  },
                  "isDefault": {
                    "type": "boolean"
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "clientId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "clientMetadataUrl": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "handleResolver": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "clientSecret": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "state": {
                    "type": "string",
                    "enum": [
                      "active",
                      "disabled"
                    ]
                  },
                  "isDefault": {
                    "type": "boolean"
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "clientId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "clientMetadataUrl": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "handleResolver": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "clientSecret": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "state": {
                    "type": "string",
                    "enum": [
                      "active",
                      "disabled"
                    ]
                  },
                  "isDefault": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "application"
                  ],
                  "properties": {
                    "application": {
                      "type": "object",
                      "required": [
                        "id",
                        "providerId",
                        "name",
                        "clientId",
                        "clientMetadataUrl",
                        "handleResolver",
                        "oauthMode",
                        "state",
                        "isDefault",
                        "createdByUserId",
                        "hasClientSecret",
                        "createdAt",
                        "updatedAt"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1
                        },
                        "providerId": {
                          "type": "string",
                          "enum": [
                            "linkedin",
                            "bluesky",
                            "x",
                            "facebook",
                            "instagram"
                          ]
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1
                        },
                        "clientId": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "clientMetadataUrl": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "handleResolver": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "oauthMode": {
                          "anyOf": [
                            {
                              "type": "string",
                              "const": "loopback"
                            },
                            {
                              "type": "string",
                              "const": "web"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "active",
                            "disabled"
                          ]
                        },
                        "isDefault": {
                          "type": "boolean"
                        },
                        "createdByUserId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "hasClientSecret": {
                          "type": "boolean"
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/channel-profile-presets": {
      "get": {
        "operationId": "listChannelProfilePresets",
        "summary": "List reusable built-in channel profile presets",
        "tags": [
          "Channels"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "presets"
                  ],
                  "properties": {
                    "presets": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "version",
                          "profile"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "minLength": 1
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 1
                          },
                          "profile": {
                            "type": "object",
                            "patternProperties": {
                              "^.*$": {}
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects": {
      "get": {
        "operationId": "listProjects",
        "summary": "List projects available to the current user",
        "tags": [
          "Projects"
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "projects"
                  ],
                  "properties": {
                    "projects": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "name",
                          "timeZone",
                          "workspaceId",
                          "primaryCategoryId",
                          "createdAt",
                          "updatedAt"
                        ],
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "timeZone": {
                            "type": "string"
                          },
                          "workspaceId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "primaryCategoryId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "updatedAt": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createProject",
        "summary": "Create a project",
        "tags": [
          "Projects"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "timeZone": {
                    "type": "string",
                    "minLength": 1
                  },
                  "workspaceId": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "timeZone": {
                    "type": "string",
                    "minLength": 1
                  },
                  "workspaceId": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "timeZone": {
                    "type": "string",
                    "minLength": 1
                  },
                  "workspaceId": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Response for status 201",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "project"
                  ],
                  "properties": {
                    "project": {
                      "type": "object",
                      "required": [
                        "id",
                        "name",
                        "timeZone",
                        "workspaceId",
                        "primaryCategoryId",
                        "createdAt",
                        "updatedAt"
                      ],
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "timeZone": {
                          "type": "string"
                        },
                        "workspaceId": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "primaryCategoryId": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Response for status 422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}": {
      "patch": {
        "operationId": "updateProjectTimeZone",
        "summary": "Update the project scheduling timezone",
        "tags": [
          "Projects"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "timeZone"
                ],
                "properties": {
                  "timeZone": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "timeZone"
                ],
                "properties": {
                  "timeZone": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "timeZone"
                ],
                "properties": {
                  "timeZone": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "name",
                    "timeZone",
                    "workspaceId",
                    "primaryCategoryId",
                    "createdAt",
                    "updatedAt"
                  ],
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "timeZone": {
                      "type": "string"
                    },
                    "workspaceId": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "primaryCategoryId": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "updatedAt": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Response for status 422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/search": {
      "get": {
        "operationId": "searchPostbot",
        "summary": "Search current source posts, channels, media and accessible projects",
        "tags": [
          "Search"
        ],
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 2,
              "maxLength": 200
            }
          },
          {
            "name": "projectId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "results"
                  ],
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "kind",
                          "id",
                          "projectId",
                          "projectName",
                          "title",
                          "description"
                        ],
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "post",
                              "channel",
                              "project",
                              "media"
                            ]
                          },
                          "id": {
                            "type": "string"
                          },
                          "projectId": {
                            "type": "string"
                          },
                          "projectName": {
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          },
                          "contentType": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Response for status 422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/membership": {
      "get": {
        "operationId": "getProjectMembership",
        "summary": "Read the current user project membership",
        "tags": [
          "Projects"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "membership"
                  ],
                  "properties": {
                    "membership": {
                      "type": "object",
                      "required": [
                        "id",
                        "projectId",
                        "userId",
                        "email",
                        "name",
                        "image",
                        "role",
                        "state",
                        "createdAt",
                        "updatedAt"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1
                        },
                        "projectId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "userId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "email": {
                          "type": "string",
                          "minLength": 1
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1
                        },
                        "image": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "role": {
                          "type": "string",
                          "enum": [
                            "owner",
                            "editor",
                            "viewer"
                          ]
                        },
                        "state": {
                          "type": "string",
                          "const": "active"
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Response for status 422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/members": {
      "get": {
        "operationId": "listProjectMembers",
        "summary": "List effective members of a project",
        "tags": [
          "Projects"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "members",
                    "total"
                  ],
                  "properties": {
                    "members": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "projectId",
                          "userId",
                          "email",
                          "name",
                          "image",
                          "role",
                          "state",
                          "createdAt",
                          "updatedAt"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "minLength": 1
                          },
                          "projectId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "userId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "email": {
                            "type": "string",
                            "minLength": 1
                          },
                          "name": {
                            "type": "string",
                            "minLength": 1
                          },
                          "image": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "role": {
                            "type": "string",
                            "enum": [
                              "owner",
                              "editor",
                              "viewer"
                            ]
                          },
                          "state": {
                            "type": "string",
                            "const": "active"
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "updatedAt": {
                            "type": "integer",
                            "minimum": 0
                          }
                        }
                      }
                    },
                    "total": {
                      "type": "integer",
                      "minimum": 0
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Response for status 422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/invitations": {
      "get": {
        "operationId": "listProjectInvitations",
        "summary": "List project access invitations",
        "tags": [
          "Projects"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "invitations"
                  ],
                  "properties": {
                    "invitations": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "email",
                          "role",
                          "organizationId",
                          "inviterId",
                          "status",
                          "expiresAt",
                          "createdAt"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "minLength": 1
                          },
                          "email": {
                            "type": "string",
                            "minLength": 1
                          },
                          "role": {
                            "type": "string",
                            "enum": [
                              "owner",
                              "editor",
                              "viewer"
                            ]
                          },
                          "organizationId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "inviterId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "accepted",
                              "rejected",
                              "canceled"
                            ]
                          },
                          "expiresAt": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": 0
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Response for status 422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Response for status 503",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createProjectInvitation",
        "summary": "Invite a member to a project workspace",
        "tags": [
          "Projects"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "email",
                  "role"
                ],
                "properties": {
                  "email": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 320
                  },
                  "role": {
                    "type": "string",
                    "enum": [
                      "editor",
                      "viewer"
                    ]
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "email",
                  "role"
                ],
                "properties": {
                  "email": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 320
                  },
                  "role": {
                    "type": "string",
                    "enum": [
                      "editor",
                      "viewer"
                    ]
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "email",
                  "role"
                ],
                "properties": {
                  "email": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 320
                  },
                  "role": {
                    "type": "string",
                    "enum": [
                      "editor",
                      "viewer"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Response for status 201",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "invitation"
                  ],
                  "properties": {
                    "invitation": {
                      "type": "object",
                      "required": [
                        "id",
                        "email",
                        "role",
                        "organizationId",
                        "inviterId",
                        "status",
                        "expiresAt",
                        "createdAt"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1
                        },
                        "email": {
                          "type": "string",
                          "minLength": 1
                        },
                        "role": {
                          "type": "string",
                          "enum": [
                            "owner",
                            "editor",
                            "viewer"
                          ]
                        },
                        "organizationId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "inviterId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "pending",
                            "accepted",
                            "rejected",
                            "canceled"
                          ]
                        },
                        "expiresAt": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Response for status 422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Response for status 503",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/invitations/{invitationId}": {
      "delete": {
        "operationId": "cancelProjectInvitation",
        "summary": "Cancel a project access invitation",
        "tags": [
          "Projects"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "invitationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "invitation"
                  ],
                  "properties": {
                    "invitation": {
                      "type": "object",
                      "required": [
                        "id",
                        "email",
                        "role",
                        "organizationId",
                        "inviterId",
                        "status",
                        "expiresAt",
                        "createdAt"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1
                        },
                        "email": {
                          "type": "string",
                          "minLength": 1
                        },
                        "role": {
                          "type": "string",
                          "enum": [
                            "owner",
                            "editor",
                            "viewer"
                          ]
                        },
                        "organizationId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "inviterId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "pending",
                            "accepted",
                            "rejected",
                            "canceled"
                          ]
                        },
                        "expiresAt": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Response for status 422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Response for status 503",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/invitations/{invitationId}/resend": {
      "post": {
        "operationId": "resendProjectInvitation",
        "summary": "Resend a project access invitation",
        "tags": [
          "Projects"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "invitationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "invitation"
                  ],
                  "properties": {
                    "invitation": {
                      "type": "object",
                      "required": [
                        "id",
                        "email",
                        "role",
                        "organizationId",
                        "inviterId",
                        "status",
                        "expiresAt",
                        "createdAt"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1
                        },
                        "email": {
                          "type": "string",
                          "minLength": 1
                        },
                        "role": {
                          "type": "string",
                          "enum": [
                            "owner",
                            "editor",
                            "viewer"
                          ]
                        },
                        "organizationId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "inviterId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "pending",
                            "accepted",
                            "rejected",
                            "canceled"
                          ]
                        },
                        "expiresAt": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Response for status 422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Response for status 503",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/members/{memberId}": {
      "patch": {
        "operationId": "updateProjectMemberRole",
        "summary": "Update a direct project member grant",
        "tags": [
          "Projects"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "memberId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "role"
                ],
                "properties": {
                  "role": {
                    "type": "string",
                    "enum": [
                      "editor",
                      "viewer"
                    ]
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "role"
                ],
                "properties": {
                  "role": {
                    "type": "string",
                    "enum": [
                      "editor",
                      "viewer"
                    ]
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "role"
                ],
                "properties": {
                  "role": {
                    "type": "string",
                    "enum": [
                      "editor",
                      "viewer"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "membership"
                  ],
                  "properties": {
                    "membership": {
                      "type": "object",
                      "required": [
                        "id",
                        "projectId",
                        "userId",
                        "email",
                        "name",
                        "image",
                        "role",
                        "state",
                        "createdAt",
                        "updatedAt"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1
                        },
                        "projectId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "userId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "email": {
                          "type": "string",
                          "minLength": 1
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1
                        },
                        "image": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "role": {
                          "type": "string",
                          "enum": [
                            "owner",
                            "editor",
                            "viewer"
                          ]
                        },
                        "state": {
                          "type": "string",
                          "const": "active"
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Response for status 422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Response for status 503",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "removeProjectMember",
        "summary": "Remove direct project access",
        "tags": [
          "Projects"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "memberId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "removed"
                  ],
                  "properties": {
                    "removed": {
                      "type": "boolean",
                      "const": true
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Response for status 422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Response for status 503",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/user-grants": {
      "get": {
        "operationId": "listProjectUserGrants",
        "summary": "List direct user grants for a project",
        "tags": [
          "Projects"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "grants"
                  ],
                  "properties": {
                    "grants": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "projectId",
                          "userId",
                          "role",
                          "createdAt",
                          "updatedAt"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "minLength": 1
                          },
                          "projectId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "userId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "role": {
                            "type": "string",
                            "enum": [
                              "owner",
                              "editor",
                              "viewer"
                            ]
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "updatedAt": {
                            "type": "integer",
                            "minimum": 0
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Response for status 422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createProjectUserGrant",
        "summary": "Grant a Postdot user access to a project",
        "tags": [
          "Projects"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "userId",
                  "role"
                ],
                "properties": {
                  "userId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "role": {
                    "type": "string",
                    "enum": [
                      "editor",
                      "viewer"
                    ]
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "userId",
                  "role"
                ],
                "properties": {
                  "userId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "role": {
                    "type": "string",
                    "enum": [
                      "editor",
                      "viewer"
                    ]
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "userId",
                  "role"
                ],
                "properties": {
                  "userId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "role": {
                    "type": "string",
                    "enum": [
                      "editor",
                      "viewer"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Response for status 201",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "grant"
                  ],
                  "properties": {
                    "grant": {
                      "type": "object",
                      "required": [
                        "id",
                        "projectId",
                        "userId",
                        "role",
                        "createdAt",
                        "updatedAt"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1
                        },
                        "projectId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "userId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "role": {
                          "type": "string",
                          "enum": [
                            "owner",
                            "editor",
                            "viewer"
                          ]
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Response for status 422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/user-grants/{userId}": {
      "patch": {
        "operationId": "updateProjectUserGrant",
        "summary": "Update a direct project user grant",
        "tags": [
          "Projects"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "role"
                ],
                "properties": {
                  "role": {
                    "type": "string",
                    "enum": [
                      "editor",
                      "viewer"
                    ]
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "role"
                ],
                "properties": {
                  "role": {
                    "type": "string",
                    "enum": [
                      "editor",
                      "viewer"
                    ]
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "role"
                ],
                "properties": {
                  "role": {
                    "type": "string",
                    "enum": [
                      "editor",
                      "viewer"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "grant"
                  ],
                  "properties": {
                    "grant": {
                      "type": "object",
                      "required": [
                        "id",
                        "projectId",
                        "userId",
                        "role",
                        "createdAt",
                        "updatedAt"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1
                        },
                        "projectId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "userId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "role": {
                          "type": "string",
                          "enum": [
                            "owner",
                            "editor",
                            "viewer"
                          ]
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Response for status 422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "removeProjectUserGrant",
        "summary": "Remove a direct user grant from a project",
        "tags": [
          "Projects"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "removed"
                  ],
                  "properties": {
                    "removed": {
                      "type": "boolean",
                      "const": true
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Response for status 422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/team-grants": {
      "get": {
        "operationId": "listProjectTeamGrants",
        "summary": "List workspace groups granted access to a project",
        "tags": [
          "Projects"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "grants"
                  ],
                  "properties": {
                    "grants": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "projectId",
                          "teamId",
                          "teamName",
                          "role",
                          "createdAt",
                          "updatedAt"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "minLength": 1
                          },
                          "projectId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "teamId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "teamName": {
                            "type": "string",
                            "minLength": 1
                          },
                          "role": {
                            "type": "string",
                            "enum": [
                              "owner",
                              "editor",
                              "viewer"
                            ]
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "updatedAt": {
                            "type": "integer",
                            "minimum": 0
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Response for status 422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createProjectTeamGrant",
        "summary": "Grant a workspace group access to a project",
        "tags": [
          "Projects"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "teamId",
                  "role"
                ],
                "properties": {
                  "teamId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "role": {
                    "type": "string",
                    "enum": [
                      "editor",
                      "viewer"
                    ]
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "teamId",
                  "role"
                ],
                "properties": {
                  "teamId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "role": {
                    "type": "string",
                    "enum": [
                      "editor",
                      "viewer"
                    ]
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "teamId",
                  "role"
                ],
                "properties": {
                  "teamId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "role": {
                    "type": "string",
                    "enum": [
                      "editor",
                      "viewer"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Response for status 201",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "grant"
                  ],
                  "properties": {
                    "grant": {
                      "type": "object",
                      "required": [
                        "id",
                        "projectId",
                        "teamId",
                        "teamName",
                        "role",
                        "createdAt",
                        "updatedAt"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1
                        },
                        "projectId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "teamId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "teamName": {
                          "type": "string",
                          "minLength": 1
                        },
                        "role": {
                          "type": "string",
                          "enum": [
                            "owner",
                            "editor",
                            "viewer"
                          ]
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Response for status 422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/team-grants/{teamId}": {
      "patch": {
        "operationId": "updateProjectTeamGrant",
        "summary": "Update a project group access grant",
        "tags": [
          "Projects"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "role"
                ],
                "properties": {
                  "role": {
                    "type": "string",
                    "enum": [
                      "editor",
                      "viewer"
                    ]
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "role"
                ],
                "properties": {
                  "role": {
                    "type": "string",
                    "enum": [
                      "editor",
                      "viewer"
                    ]
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "role"
                ],
                "properties": {
                  "role": {
                    "type": "string",
                    "enum": [
                      "editor",
                      "viewer"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "grant"
                  ],
                  "properties": {
                    "grant": {
                      "type": "object",
                      "required": [
                        "id",
                        "projectId",
                        "teamId",
                        "teamName",
                        "role",
                        "createdAt",
                        "updatedAt"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1
                        },
                        "projectId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "teamId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "teamName": {
                          "type": "string",
                          "minLength": 1
                        },
                        "role": {
                          "type": "string",
                          "enum": [
                            "owner",
                            "editor",
                            "viewer"
                          ]
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Response for status 422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "removeProjectTeamGrant",
        "summary": "Remove a workspace group from a project",
        "tags": [
          "Projects"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "removed"
                  ],
                  "properties": {
                    "removed": {
                      "type": "boolean",
                      "const": true
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Response for status 422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/categories": {
      "get": {
        "operationId": "listProjectCategories",
        "summary": "List instance project categories",
        "tags": [
          "Taxonomy"
        ],
        "parameters": [
          {
            "name": "includeArchived",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "categories"
                  ],
                  "properties": {
                    "categories": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "name",
                          "normalizedName",
                          "state",
                          "archivedAt",
                          "createdAt",
                          "updatedAt"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "minLength": 1
                          },
                          "name": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 120
                          },
                          "normalizedName": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 120
                          },
                          "state": {
                            "type": "string",
                            "enum": [
                              "active",
                              "archived"
                            ]
                          },
                          "archivedAt": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": 0
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "updatedAt": {
                            "type": "integer",
                            "minimum": 0
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createProjectCategory",
        "summary": "Create an instance project category",
        "tags": [
          "Taxonomy"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Response for status 201",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "category"
                  ],
                  "properties": {
                    "category": {
                      "type": "object",
                      "required": [
                        "id",
                        "name",
                        "normalizedName",
                        "state",
                        "archivedAt",
                        "createdAt",
                        "updatedAt"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 120
                        },
                        "normalizedName": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 120
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "active",
                            "archived"
                          ]
                        },
                        "archivedAt": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": 0
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Response for status 422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/categories/{categoryId}": {
      "patch": {
        "operationId": "renameProjectCategory",
        "summary": "Rename an instance project category",
        "tags": [
          "Taxonomy"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "categoryId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "category"
                  ],
                  "properties": {
                    "category": {
                      "type": "object",
                      "required": [
                        "id",
                        "name",
                        "normalizedName",
                        "state",
                        "archivedAt",
                        "createdAt",
                        "updatedAt"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 120
                        },
                        "normalizedName": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 120
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "active",
                            "archived"
                          ]
                        },
                        "archivedAt": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": 0
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Response for status 422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/categories/{categoryId}/archive": {
      "post": {
        "operationId": "archiveProjectCategory",
        "summary": "Archive an instance project category",
        "tags": [
          "Taxonomy"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "categoryId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "category"
                  ],
                  "properties": {
                    "category": {
                      "type": "object",
                      "required": [
                        "id",
                        "name",
                        "normalizedName",
                        "state",
                        "archivedAt",
                        "createdAt",
                        "updatedAt"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 120
                        },
                        "normalizedName": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 120
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "active",
                            "archived"
                          ]
                        },
                        "archivedAt": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": 0
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/categories/{categoryId}/restore": {
      "post": {
        "operationId": "restoreProjectCategory",
        "summary": "Restore an archived instance project category",
        "tags": [
          "Taxonomy"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "categoryId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "category"
                  ],
                  "properties": {
                    "category": {
                      "type": "object",
                      "required": [
                        "id",
                        "name",
                        "normalizedName",
                        "state",
                        "archivedAt",
                        "createdAt",
                        "updatedAt"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 120
                        },
                        "normalizedName": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 120
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "active",
                            "archived"
                          ]
                        },
                        "archivedAt": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": 0
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/category": {
      "patch": {
        "operationId": "setProjectPrimaryCategory",
        "summary": "Set or clear a project primary category",
        "tags": [
          "Taxonomy"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "categoryId"
                ],
                "properties": {
                  "categoryId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "categoryId"
                ],
                "properties": {
                  "categoryId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "categoryId"
                ],
                "properties": {
                  "categoryId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "name",
                    "timeZone",
                    "workspaceId",
                    "primaryCategoryId",
                    "createdAt",
                    "updatedAt"
                  ],
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "timeZone": {
                      "type": "string"
                    },
                    "workspaceId": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "primaryCategoryId": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "updatedAt": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Response for status 422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/tags": {
      "get": {
        "operationId": "listProjectTags",
        "summary": "List project-scoped publication tags",
        "tags": [
          "Taxonomy"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "includeArchived",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "tags"
                  ],
                  "properties": {
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "projectId",
                          "name",
                          "normalizedName",
                          "state",
                          "archivedAt",
                          "createdAt",
                          "updatedAt"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "minLength": 1
                          },
                          "projectId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "name": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 120
                          },
                          "normalizedName": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 120
                          },
                          "state": {
                            "type": "string",
                            "enum": [
                              "active",
                              "archived"
                            ]
                          },
                          "archivedAt": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": 0
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "updatedAt": {
                            "type": "integer",
                            "minimum": 0
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createProjectTag",
        "summary": "Create a project-scoped publication tag",
        "tags": [
          "Taxonomy"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Response for status 201",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "tag"
                  ],
                  "properties": {
                    "tag": {
                      "type": "object",
                      "required": [
                        "id",
                        "projectId",
                        "name",
                        "normalizedName",
                        "state",
                        "archivedAt",
                        "createdAt",
                        "updatedAt"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1
                        },
                        "projectId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 120
                        },
                        "normalizedName": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 120
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "active",
                            "archived"
                          ]
                        },
                        "archivedAt": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": 0
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Response for status 422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/tags/{tagId}": {
      "patch": {
        "operationId": "renameProjectTag",
        "summary": "Rename a project-scoped publication tag",
        "tags": [
          "Taxonomy"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "tagId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "tag"
                  ],
                  "properties": {
                    "tag": {
                      "type": "object",
                      "required": [
                        "id",
                        "projectId",
                        "name",
                        "normalizedName",
                        "state",
                        "archivedAt",
                        "createdAt",
                        "updatedAt"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1
                        },
                        "projectId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 120
                        },
                        "normalizedName": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 120
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "active",
                            "archived"
                          ]
                        },
                        "archivedAt": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": 0
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Response for status 422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/tags/{tagId}/archive": {
      "post": {
        "operationId": "archiveProjectTag",
        "summary": "Archive a project-scoped publication tag",
        "tags": [
          "Taxonomy"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "tagId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "tag"
                  ],
                  "properties": {
                    "tag": {
                      "type": "object",
                      "required": [
                        "id",
                        "projectId",
                        "name",
                        "normalizedName",
                        "state",
                        "archivedAt",
                        "createdAt",
                        "updatedAt"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1
                        },
                        "projectId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 120
                        },
                        "normalizedName": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 120
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "active",
                            "archived"
                          ]
                        },
                        "archivedAt": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": 0
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/tags/{tagId}/restore": {
      "post": {
        "operationId": "restoreProjectTag",
        "summary": "Restore an archived project-scoped publication tag",
        "tags": [
          "Taxonomy"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "tagId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "tag"
                  ],
                  "properties": {
                    "tag": {
                      "type": "object",
                      "required": [
                        "id",
                        "projectId",
                        "name",
                        "normalizedName",
                        "state",
                        "archivedAt",
                        "createdAt",
                        "updatedAt"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1
                        },
                        "projectId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 120
                        },
                        "normalizedName": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 120
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "active",
                            "archived"
                          ]
                        },
                        "archivedAt": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": 0
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/publications/{publicationId}/tags": {
      "get": {
        "operationId": "listPublicationTags",
        "summary": "List tags assigned to a publication",
        "tags": [
          "Taxonomy"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "publicationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "includeArchived",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "tags"
                  ],
                  "properties": {
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "projectId",
                          "name",
                          "normalizedName",
                          "state",
                          "archivedAt",
                          "createdAt",
                          "updatedAt"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "minLength": 1
                          },
                          "projectId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "name": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 120
                          },
                          "normalizedName": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 120
                          },
                          "state": {
                            "type": "string",
                            "enum": [
                              "active",
                              "archived"
                            ]
                          },
                          "archivedAt": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": 0
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "updatedAt": {
                            "type": "integer",
                            "minimum": 0
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "replacePublicationTags",
        "summary": "Replace a publication tag set",
        "tags": [
          "Taxonomy"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "publicationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "tagIds"
                ],
                "properties": {
                  "tagIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "tagIds"
                ],
                "properties": {
                  "tagIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "tagIds"
                ],
                "properties": {
                  "tagIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "tags"
                  ],
                  "properties": {
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "projectId",
                          "name",
                          "normalizedName",
                          "state",
                          "archivedAt",
                          "createdAt",
                          "updatedAt"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "minLength": 1
                          },
                          "projectId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "name": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 120
                          },
                          "normalizedName": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 120
                          },
                          "state": {
                            "type": "string",
                            "enum": [
                              "active",
                              "archived"
                            ]
                          },
                          "archivedAt": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": 0
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "updatedAt": {
                            "type": "integer",
                            "minimum": 0
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Response for status 422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/channels": {
      "get": {
        "operationId": "listProjectChannels",
        "summary": "List channels in a project",
        "tags": [
          "Channels"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "channels"
                  ],
                  "properties": {
                    "channels": {
                      "type": "array",
                      "items": {
                        "allOf": [
                          {
                            "allOf": [
                              {
                                "type": "object",
                                "required": [
                                  "id",
                                  "projectId",
                                  "name",
                                  "profileVersionId",
                                  "state",
                                  "archivedAt",
                                  "revision",
                                  "createdAt",
                                  "updatedAt"
                                ],
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "projectId": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "profileVersionId": {
                                    "type": "string"
                                  },
                                  "state": {
                                    "enum": [
                                      "active",
                                      "archived"
                                    ]
                                  },
                                  "archivedAt": {
                                    "anyOf": [
                                      {
                                        "type": "integer",
                                        "minimum": -9007199254740991,
                                        "maximum": 9007199254740991
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "revision": {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991
                                  },
                                  "createdAt": {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991
                                  },
                                  "updatedAt": {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "required": [
                                  "profileId"
                                ],
                                "properties": {
                                  "profileId": {
                                    "type": "string",
                                    "minLength": 1
                                  }
                                }
                              }
                            ]
                          },
                          {
                            "type": "object",
                            "required": [
                              "execution"
                            ],
                            "properties": {
                              "execution": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "required": [
                                      "kind"
                                    ],
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "const": "manual"
                                      }
                                    }
                                  },
                                  {
                                    "type": "object",
                                    "required": [
                                      "kind"
                                    ],
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "const": "declarative_http"
                                      }
                                    }
                                  },
                                  {
                                    "type": "object",
                                    "required": [
                                      "kind",
                                      "contractId"
                                    ],
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "const": "built_in"
                                      },
                                      "contractId": {
                                        "type": "string",
                                        "minLength": 1
                                      }
                                    }
                                  }
                                ]
                              }
                            }
                          }
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createProjectChannel",
        "summary": "Create a channel in a project",
        "tags": [
          "Channels"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "profile": {
                    "anyOf": [
                      {
                        "type": "string",
                        "const": "manual-message"
                      },
                      {
                        "type": "string",
                        "const": "linkedin"
                      },
                      {
                        "type": "string",
                        "const": "bluesky"
                      },
                      {
                        "type": "string",
                        "const": "mastodon"
                      },
                      {
                        "type": "string",
                        "const": "discord"
                      },
                      {
                        "type": "string",
                        "const": "telegram"
                      },
                      {
                        "type": "string",
                        "const": "facebook"
                      },
                      {
                        "type": "string",
                        "const": "instagram"
                      },
                      {
                        "type": "string",
                        "const": "devto"
                      },
                      {
                        "type": "string",
                        "const": "x"
                      },
                      {
                        "type": "object",
                        "required": [
                          "id",
                          "version",
                          "origin",
                          "contentSchema",
                          "fieldBindings",
                          "capabilities",
                          "execution"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "minLength": 1
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 1
                          },
                          "profileHash": {
                            "type": "string",
                            "minLength": 1
                          },
                          "schemaHash": {
                            "type": "string",
                            "minLength": 1
                          },
                          "origin": {
                            "type": "string",
                            "const": "custom"
                          },
                          "contentSchema": {},
                          "fieldBindings": {},
                          "capabilities": {},
                          "execution": {}
                        }
                      }
                    ]
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "profile": {
                    "anyOf": [
                      {
                        "type": "string",
                        "const": "manual-message"
                      },
                      {
                        "type": "string",
                        "const": "linkedin"
                      },
                      {
                        "type": "string",
                        "const": "bluesky"
                      },
                      {
                        "type": "string",
                        "const": "mastodon"
                      },
                      {
                        "type": "string",
                        "const": "discord"
                      },
                      {
                        "type": "string",
                        "const": "telegram"
                      },
                      {
                        "type": "string",
                        "const": "facebook"
                      },
                      {
                        "type": "string",
                        "const": "instagram"
                      },
                      {
                        "type": "string",
                        "const": "devto"
                      },
                      {
                        "type": "string",
                        "const": "x"
                      },
                      {
                        "type": "object",
                        "required": [
                          "id",
                          "version",
                          "origin",
                          "contentSchema",
                          "fieldBindings",
                          "capabilities",
                          "execution"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "minLength": 1
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 1
                          },
                          "profileHash": {
                            "type": "string",
                            "minLength": 1
                          },
                          "schemaHash": {
                            "type": "string",
                            "minLength": 1
                          },
                          "origin": {
                            "type": "string",
                            "const": "custom"
                          },
                          "contentSchema": {},
                          "fieldBindings": {},
                          "capabilities": {},
                          "execution": {}
                        }
                      }
                    ]
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "profile": {
                    "anyOf": [
                      {
                        "type": "string",
                        "const": "manual-message"
                      },
                      {
                        "type": "string",
                        "const": "linkedin"
                      },
                      {
                        "type": "string",
                        "const": "bluesky"
                      },
                      {
                        "type": "string",
                        "const": "mastodon"
                      },
                      {
                        "type": "string",
                        "const": "discord"
                      },
                      {
                        "type": "string",
                        "const": "telegram"
                      },
                      {
                        "type": "string",
                        "const": "facebook"
                      },
                      {
                        "type": "string",
                        "const": "instagram"
                      },
                      {
                        "type": "string",
                        "const": "devto"
                      },
                      {
                        "type": "string",
                        "const": "x"
                      },
                      {
                        "type": "object",
                        "required": [
                          "id",
                          "version",
                          "origin",
                          "contentSchema",
                          "fieldBindings",
                          "capabilities",
                          "execution"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "minLength": 1
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 1
                          },
                          "profileHash": {
                            "type": "string",
                            "minLength": 1
                          },
                          "schemaHash": {
                            "type": "string",
                            "minLength": 1
                          },
                          "origin": {
                            "type": "string",
                            "const": "custom"
                          },
                          "contentSchema": {},
                          "fieldBindings": {},
                          "capabilities": {},
                          "execution": {}
                        }
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Response for status 201",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "channel"
                  ],
                  "properties": {
                    "channel": {
                      "allOf": [
                        {
                          "type": "object",
                          "required": [
                            "id",
                            "projectId",
                            "name",
                            "profileVersionId",
                            "state",
                            "archivedAt",
                            "revision",
                            "createdAt",
                            "updatedAt"
                          ],
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "projectId": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            },
                            "profileVersionId": {
                              "type": "string"
                            },
                            "state": {
                              "enum": [
                                "active",
                                "archived"
                              ]
                            },
                            "archivedAt": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "revision": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "createdAt": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "updatedAt": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            }
                          }
                        },
                        {
                          "type": "object",
                          "required": [
                            "profileId"
                          ],
                          "properties": {
                            "profileId": {
                              "type": "string",
                              "minLength": 1
                            }
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "issues": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "path",
                              "code"
                            ],
                            "properties": {
                              "path": {
                                "type": "string",
                                "maxLength": 512
                              },
                              "code": {
                                "type": "string"
                              }
                            }
                          },
                          "maxItems": 20
                        },
                        "issueCount": {
                          "type": "integer",
                          "minimum": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Response for status 422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/channels/{channelId}": {
      "patch": {
        "operationId": "renameProjectChannel",
        "summary": "Rename a channel in a project",
        "tags": [
          "Channels"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "expectedRevision"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "expectedRevision": {
                    "type": "integer",
                    "minimum": 1
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "expectedRevision"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "expectedRevision": {
                    "type": "integer",
                    "minimum": 1
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "expectedRevision"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "expectedRevision": {
                    "type": "integer",
                    "minimum": 1
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "channel"
                  ],
                  "properties": {
                    "channel": {
                      "allOf": [
                        {
                          "type": "object",
                          "required": [
                            "id",
                            "projectId",
                            "name",
                            "profileVersionId",
                            "state",
                            "archivedAt",
                            "revision",
                            "createdAt",
                            "updatedAt"
                          ],
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "projectId": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            },
                            "profileVersionId": {
                              "type": "string"
                            },
                            "state": {
                              "enum": [
                                "active",
                                "archived"
                              ]
                            },
                            "archivedAt": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "revision": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "createdAt": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "updatedAt": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            }
                          }
                        },
                        {
                          "type": "object",
                          "required": [
                            "profileId"
                          ],
                          "properties": {
                            "profileId": {
                              "type": "string",
                              "minLength": 1
                            }
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteProjectChannel",
        "summary": "Delete an empty archived channel",
        "tags": [
          "Channels"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "expectedRevision"
                ],
                "properties": {
                  "expectedRevision": {
                    "type": "integer",
                    "minimum": 1
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "expectedRevision"
                ],
                "properties": {
                  "expectedRevision": {
                    "type": "integer",
                    "minimum": 1
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "expectedRevision"
                ],
                "properties": {
                  "expectedRevision": {
                    "type": "integer",
                    "minimum": 1
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "deleted"
                  ],
                  "properties": {
                    "deleted": {
                      "type": "boolean",
                      "const": true
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "required": [
                        "error"
                      ],
                      "properties": {
                        "error": {
                          "type": "object",
                          "required": [
                            "code",
                            "message",
                            "blockers"
                          ],
                          "properties": {
                            "code": {
                              "type": "string",
                              "const": "channel_lifecycle_conflict"
                            },
                            "message": {
                              "type": "string"
                            },
                            "blockers": {
                              "type": "array",
                              "items": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "const": "active_work"
                                  },
                                  {
                                    "type": "string",
                                    "const": "pending_authorization"
                                  },
                                  {
                                    "type": "string",
                                    "const": "publications"
                                  },
                                  {
                                    "type": "string",
                                    "const": "publisher"
                                  },
                                  {
                                    "type": "string",
                                    "const": "must_be_archived"
                                  }
                                ]
                              }
                            }
                          }
                        }
                      }
                    },
                    {
                      "type": "object",
                      "required": [
                        "error"
                      ],
                      "properties": {
                        "error": {
                          "type": "object",
                          "required": [
                            "code",
                            "message"
                          ],
                          "properties": {
                            "code": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string"
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/channels/{channelId}/archive": {
      "post": {
        "operationId": "archiveProjectChannel",
        "summary": "Archive a channel in a project",
        "tags": [
          "Channels"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "expectedRevision"
                ],
                "properties": {
                  "expectedRevision": {
                    "type": "integer",
                    "minimum": 1
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "expectedRevision"
                ],
                "properties": {
                  "expectedRevision": {
                    "type": "integer",
                    "minimum": 1
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "expectedRevision"
                ],
                "properties": {
                  "expectedRevision": {
                    "type": "integer",
                    "minimum": 1
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "channel"
                  ],
                  "properties": {
                    "channel": {
                      "allOf": [
                        {
                          "type": "object",
                          "required": [
                            "id",
                            "projectId",
                            "name",
                            "profileVersionId",
                            "state",
                            "archivedAt",
                            "revision",
                            "createdAt",
                            "updatedAt"
                          ],
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "projectId": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            },
                            "profileVersionId": {
                              "type": "string"
                            },
                            "state": {
                              "enum": [
                                "active",
                                "archived"
                              ]
                            },
                            "archivedAt": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "revision": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "createdAt": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "updatedAt": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            }
                          }
                        },
                        {
                          "type": "object",
                          "required": [
                            "profileId"
                          ],
                          "properties": {
                            "profileId": {
                              "type": "string",
                              "minLength": 1
                            }
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "required": [
                        "error"
                      ],
                      "properties": {
                        "error": {
                          "type": "object",
                          "required": [
                            "code",
                            "message",
                            "blockers"
                          ],
                          "properties": {
                            "code": {
                              "type": "string",
                              "const": "channel_lifecycle_conflict"
                            },
                            "message": {
                              "type": "string"
                            },
                            "blockers": {
                              "type": "array",
                              "items": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "const": "active_work"
                                  },
                                  {
                                    "type": "string",
                                    "const": "pending_authorization"
                                  },
                                  {
                                    "type": "string",
                                    "const": "publications"
                                  },
                                  {
                                    "type": "string",
                                    "const": "publisher"
                                  },
                                  {
                                    "type": "string",
                                    "const": "must_be_archived"
                                  }
                                ]
                              }
                            }
                          }
                        }
                      }
                    },
                    {
                      "type": "object",
                      "required": [
                        "error"
                      ],
                      "properties": {
                        "error": {
                          "type": "object",
                          "required": [
                            "code",
                            "message"
                          ],
                          "properties": {
                            "code": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string"
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/channels/{channelId}/restore": {
      "post": {
        "operationId": "restoreProjectChannel",
        "summary": "Restore an archived channel in a project",
        "tags": [
          "Channels"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "expectedRevision"
                ],
                "properties": {
                  "expectedRevision": {
                    "type": "integer",
                    "minimum": 1
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "expectedRevision"
                ],
                "properties": {
                  "expectedRevision": {
                    "type": "integer",
                    "minimum": 1
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "expectedRevision"
                ],
                "properties": {
                  "expectedRevision": {
                    "type": "integer",
                    "minimum": 1
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "channel"
                  ],
                  "properties": {
                    "channel": {
                      "allOf": [
                        {
                          "type": "object",
                          "required": [
                            "id",
                            "projectId",
                            "name",
                            "profileVersionId",
                            "state",
                            "archivedAt",
                            "revision",
                            "createdAt",
                            "updatedAt"
                          ],
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "projectId": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            },
                            "profileVersionId": {
                              "type": "string"
                            },
                            "state": {
                              "enum": [
                                "active",
                                "archived"
                              ]
                            },
                            "archivedAt": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "revision": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "createdAt": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "updatedAt": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            }
                          }
                        },
                        {
                          "type": "object",
                          "required": [
                            "profileId"
                          ],
                          "properties": {
                            "profileId": {
                              "type": "string",
                              "minLength": 1
                            }
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/channels/{channelId}/profile": {
      "get": {
        "operationId": "getChannelProfileState",
        "summary": "Get the active and draft profile for a channel",
        "tags": [
          "Channels"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "channel",
                    "active",
                    "draft"
                  ],
                  "properties": {
                    "channel": {
                      "allOf": [
                        {
                          "type": "object",
                          "required": [
                            "id",
                            "projectId",
                            "name",
                            "profileVersionId",
                            "state",
                            "archivedAt",
                            "revision",
                            "createdAt",
                            "updatedAt"
                          ],
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "projectId": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            },
                            "profileVersionId": {
                              "type": "string"
                            },
                            "state": {
                              "enum": [
                                "active",
                                "archived"
                              ]
                            },
                            "archivedAt": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "revision": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "createdAt": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "updatedAt": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            }
                          }
                        },
                        {
                          "type": "object",
                          "required": [
                            "profileId"
                          ],
                          "properties": {
                            "profileId": {
                              "type": "string",
                              "minLength": 1
                            }
                          }
                        }
                      ]
                    },
                    "active": {
                      "type": "object",
                      "required": [
                        "id",
                        "projectId",
                        "channelId",
                        "profileId",
                        "version",
                        "origin",
                        "state",
                        "revision",
                        "profile",
                        "createdByActorId",
                        "createdAt",
                        "updatedAt"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1
                        },
                        "projectId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "channelId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "profileId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "version": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "origin": {
                          "type": "string",
                          "enum": [
                            "built_in",
                            "custom"
                          ]
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "draft",
                            "active",
                            "superseded",
                            "disabled"
                          ]
                        },
                        "revision": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "profile": {
                          "type": "object",
                          "patternProperties": {
                            "^.*$": {}
                          }
                        },
                        "createdByActorId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    },
                    "draft": {
                      "anyOf": [
                        {
                          "type": "object",
                          "required": [
                            "id",
                            "projectId",
                            "channelId",
                            "profileId",
                            "version",
                            "origin",
                            "state",
                            "revision",
                            "profile",
                            "createdByActorId",
                            "createdAt",
                            "updatedAt"
                          ],
                          "properties": {
                            "id": {
                              "type": "string",
                              "minLength": 1
                            },
                            "projectId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "channelId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "profileId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "version": {
                              "type": "integer",
                              "minimum": 1
                            },
                            "origin": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "const": "built_in"
                                },
                                {
                                  "type": "string",
                                  "const": "custom"
                                }
                              ]
                            },
                            "state": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "const": "draft"
                                },
                                {
                                  "type": "string",
                                  "const": "active"
                                },
                                {
                                  "type": "string",
                                  "const": "superseded"
                                },
                                {
                                  "type": "string",
                                  "const": "disabled"
                                }
                              ]
                            },
                            "revision": {
                              "type": "integer",
                              "minimum": 1
                            },
                            "profile": {
                              "type": "object",
                              "patternProperties": {
                                "^.*$": {}
                              }
                            },
                            "createdByActorId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "createdAt": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "updatedAt": {
                              "type": "integer",
                              "minimum": 0
                            }
                          }
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/channels/{channelId}/profile-drafts": {
      "post": {
        "operationId": "saveChannelProfileDraft",
        "summary": "Create or update a channel profile draft",
        "tags": [
          "Channels"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "profile"
                ],
                "properties": {
                  "profile": {
                    "type": "object",
                    "patternProperties": {
                      "^.*$": {}
                    }
                  },
                  "expectedRevision": {
                    "type": "integer",
                    "minimum": 0
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "profile"
                ],
                "properties": {
                  "profile": {
                    "type": "object",
                    "patternProperties": {
                      "^.*$": {}
                    }
                  },
                  "expectedRevision": {
                    "type": "integer",
                    "minimum": 0
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "profile"
                ],
                "properties": {
                  "profile": {
                    "type": "object",
                    "patternProperties": {
                      "^.*$": {}
                    }
                  },
                  "expectedRevision": {
                    "type": "integer",
                    "minimum": 0
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "profile"
                  ],
                  "properties": {
                    "profile": {
                      "type": "object",
                      "required": [
                        "id",
                        "projectId",
                        "channelId",
                        "profileId",
                        "version",
                        "origin",
                        "state",
                        "revision",
                        "profile",
                        "createdByActorId",
                        "createdAt",
                        "updatedAt"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1
                        },
                        "projectId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "channelId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "profileId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "version": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "origin": {
                          "type": "string",
                          "enum": [
                            "built_in",
                            "custom"
                          ]
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "draft",
                            "active",
                            "superseded",
                            "disabled"
                          ]
                        },
                        "revision": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "profile": {
                          "type": "object",
                          "patternProperties": {
                            "^.*$": {}
                          }
                        },
                        "createdByActorId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "issues": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "path",
                              "code"
                            ],
                            "properties": {
                              "path": {
                                "type": "string",
                                "maxLength": 512
                              },
                              "code": {
                                "type": "string"
                              }
                            }
                          },
                          "maxItems": 20
                        },
                        "issueCount": {
                          "type": "integer",
                          "minimum": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/channels/{channelId}/profile-drafts/{profileVersionId}/preview": {
      "post": {
        "operationId": "previewChannelProfileActivation",
        "summary": "Preview the impact of activating a channel profile draft",
        "tags": [
          "Channels"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "profileVersionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "assessment"
                  ],
                  "properties": {
                    "assessment": {
                      "type": "object",
                      "required": [
                        "currentProfileVersion",
                        "proposedProfileVersion",
                        "changes",
                        "workingDrafts",
                        "pendingTargets",
                        "hasReviewRequired"
                      ],
                      "properties": {
                        "currentProfileVersion": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "proposedProfileVersion": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "changes": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "kind",
                              "path",
                              "code",
                              "message"
                            ],
                            "properties": {
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "schema",
                                  "binding",
                                  "capability",
                                  "execution"
                                ]
                              },
                              "path": {
                                "type": "string"
                              },
                              "code": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        },
                        "workingDrafts": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "id",
                              "kind",
                              "state",
                              "issues"
                            ],
                            "properties": {
                              "id": {
                                "type": "string",
                                "minLength": 1
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "working_draft",
                                  "pending_target"
                                ]
                              },
                              "state": {
                                "type": "string",
                                "enum": [
                                  "compatible",
                                  "review_required"
                                ]
                              },
                              "issues": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "required": [
                                    "path",
                                    "code",
                                    "message",
                                    "severity",
                                    "source"
                                  ],
                                  "properties": {
                                    "path": {
                                      "type": "string"
                                    },
                                    "code": {
                                      "type": "string"
                                    },
                                    "message": {
                                      "type": "string"
                                    },
                                    "severity": {
                                      "type": "string",
                                      "enum": [
                                        "error",
                                        "warning"
                                      ]
                                    },
                                    "source": {
                                      "type": "string",
                                      "enum": [
                                        "schema",
                                        "schema_policy",
                                        "field_binding",
                                        "capability",
                                        "domain",
                                        "module"
                                      ]
                                    }
                                  }
                                }
                              }
                            }
                          }
                        },
                        "pendingTargets": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "id",
                              "kind",
                              "state",
                              "issues"
                            ],
                            "properties": {
                              "id": {
                                "type": "string",
                                "minLength": 1
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "working_draft",
                                  "pending_target"
                                ]
                              },
                              "state": {
                                "type": "string",
                                "enum": [
                                  "compatible",
                                  "review_required"
                                ]
                              },
                              "issues": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "required": [
                                    "path",
                                    "code",
                                    "message",
                                    "severity",
                                    "source"
                                  ],
                                  "properties": {
                                    "path": {
                                      "type": "string"
                                    },
                                    "code": {
                                      "type": "string"
                                    },
                                    "message": {
                                      "type": "string"
                                    },
                                    "severity": {
                                      "type": "string",
                                      "enum": [
                                        "error",
                                        "warning"
                                      ]
                                    },
                                    "source": {
                                      "type": "string",
                                      "enum": [
                                        "schema",
                                        "schema_policy",
                                        "field_binding",
                                        "capability",
                                        "domain",
                                        "module"
                                      ]
                                    }
                                  }
                                }
                              }
                            }
                          }
                        },
                        "hasReviewRequired": {
                          "type": "boolean"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/channels/{channelId}/profile-drafts/{profileVersionId}/activate": {
      "post": {
        "operationId": "activateChannelProfile",
        "summary": "Activate a channel profile draft",
        "tags": [
          "Channels"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "profileVersionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "expectedRevision": {
                    "type": "integer",
                    "minimum": 1
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "expectedRevision": {
                    "type": "integer",
                    "minimum": 1
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "expectedRevision": {
                    "type": "integer",
                    "minimum": 1
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "channel",
                    "profile",
                    "assessment"
                  ],
                  "properties": {
                    "channel": {
                      "allOf": [
                        {
                          "type": "object",
                          "required": [
                            "id",
                            "projectId",
                            "name",
                            "profileVersionId",
                            "state",
                            "archivedAt",
                            "revision",
                            "createdAt",
                            "updatedAt"
                          ],
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "projectId": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            },
                            "profileVersionId": {
                              "type": "string"
                            },
                            "state": {
                              "enum": [
                                "active",
                                "archived"
                              ]
                            },
                            "archivedAt": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "revision": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "createdAt": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "updatedAt": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            }
                          }
                        },
                        {
                          "type": "object",
                          "required": [
                            "profileId"
                          ],
                          "properties": {
                            "profileId": {
                              "type": "string",
                              "minLength": 1
                            }
                          }
                        }
                      ]
                    },
                    "profile": {
                      "type": "object",
                      "required": [
                        "id",
                        "projectId",
                        "channelId",
                        "profileId",
                        "version",
                        "origin",
                        "state",
                        "revision",
                        "profile",
                        "createdByActorId",
                        "createdAt",
                        "updatedAt"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1
                        },
                        "projectId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "channelId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "profileId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "version": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "origin": {
                          "type": "string",
                          "enum": [
                            "built_in",
                            "custom"
                          ]
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "draft",
                            "active",
                            "superseded",
                            "disabled"
                          ]
                        },
                        "revision": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "profile": {
                          "type": "object",
                          "patternProperties": {
                            "^.*$": {}
                          }
                        },
                        "createdByActorId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    },
                    "assessment": {
                      "type": "object",
                      "required": [
                        "currentProfileVersion",
                        "proposedProfileVersion",
                        "changes",
                        "workingDrafts",
                        "pendingTargets",
                        "hasReviewRequired"
                      ],
                      "properties": {
                        "currentProfileVersion": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "proposedProfileVersion": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "changes": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "kind",
                              "path",
                              "code",
                              "message"
                            ],
                            "properties": {
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "schema",
                                  "binding",
                                  "capability",
                                  "execution"
                                ]
                              },
                              "path": {
                                "type": "string"
                              },
                              "code": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        },
                        "workingDrafts": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "id",
                              "kind",
                              "state",
                              "issues"
                            ],
                            "properties": {
                              "id": {
                                "type": "string",
                                "minLength": 1
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "working_draft",
                                  "pending_target"
                                ]
                              },
                              "state": {
                                "type": "string",
                                "enum": [
                                  "compatible",
                                  "review_required"
                                ]
                              },
                              "issues": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "required": [
                                    "path",
                                    "code",
                                    "message",
                                    "severity",
                                    "source"
                                  ],
                                  "properties": {
                                    "path": {
                                      "type": "string"
                                    },
                                    "code": {
                                      "type": "string"
                                    },
                                    "message": {
                                      "type": "string"
                                    },
                                    "severity": {
                                      "type": "string",
                                      "enum": [
                                        "error",
                                        "warning"
                                      ]
                                    },
                                    "source": {
                                      "type": "string",
                                      "enum": [
                                        "schema",
                                        "schema_policy",
                                        "field_binding",
                                        "capability",
                                        "domain",
                                        "module"
                                      ]
                                    }
                                  }
                                }
                              }
                            }
                          }
                        },
                        "pendingTargets": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "id",
                              "kind",
                              "state",
                              "issues"
                            ],
                            "properties": {
                              "id": {
                                "type": "string",
                                "minLength": 1
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "working_draft",
                                  "pending_target"
                                ]
                              },
                              "state": {
                                "type": "string",
                                "enum": [
                                  "compatible",
                                  "review_required"
                                ]
                              },
                              "issues": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "required": [
                                    "path",
                                    "code",
                                    "message",
                                    "severity",
                                    "source"
                                  ],
                                  "properties": {
                                    "path": {
                                      "type": "string"
                                    },
                                    "code": {
                                      "type": "string"
                                    },
                                    "message": {
                                      "type": "string"
                                    },
                                    "severity": {
                                      "type": "string",
                                      "enum": [
                                        "error",
                                        "warning"
                                      ]
                                    },
                                    "source": {
                                      "type": "string",
                                      "enum": [
                                        "schema",
                                        "schema_policy",
                                        "field_binding",
                                        "capability",
                                        "domain",
                                        "module"
                                      ]
                                    }
                                  }
                                }
                              }
                            }
                          }
                        },
                        "hasReviewRequired": {
                          "type": "boolean"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/publishers": {
      "get": {
        "operationId": "listProjectPublishers",
        "summary": "List connected publishers in a project",
        "tags": [
          "Channels"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "connections",
                    "oauthReadiness"
                  ],
                  "properties": {
                    "connections": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "projectId",
                          "publisherId",
                          "channelId",
                          "kind",
                          "credentialId",
                          "endpointUrl",
                          "destination",
                          "authentication",
                          "providerId",
                          "externalAccountId",
                          "externalAccountName",
                          "scopes",
                          "state",
                          "connectedByActorId",
                          "createdAt",
                          "updatedAt"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "minLength": 1
                          },
                          "projectId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "publisherId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "channelId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "kind": {
                            "type": "string",
                            "minLength": 1
                          },
                          "credentialId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "endpointUrl": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "destination": {
                            "anyOf": [
                              {
                                "type": "object",
                                "required": [
                                  "type",
                                  "id",
                                  "name"
                                ],
                                "properties": {
                                  "type": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "const": "account"
                                      },
                                      {
                                        "type": "string",
                                        "const": "member"
                                      },
                                      {
                                        "type": "string",
                                        "const": "organization"
                                      },
                                      {
                                        "type": "string",
                                        "const": "channel"
                                      }
                                    ]
                                  },
                                  "id": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "name": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "authentication": {
                            "anyOf": [
                              {
                                "type": "object",
                                "required": [
                                  "kind"
                                ],
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "const": "none"
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "required": [
                                  "kind"
                                ],
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "const": "bearer"
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "required": [
                                  "kind",
                                  "headerName"
                                ],
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "const": "header"
                                  },
                                  "headerName": {
                                    "type": "string",
                                    "minLength": 1
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "required": [
                                  "kind"
                                ],
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "const": "path"
                                  }
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "providerId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "externalAccountId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "externalAccountName": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "scopes": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1
                            }
                          },
                          "state": {
                            "type": "string",
                            "enum": [
                              "active",
                              "reconnect_required",
                              "revoked"
                            ]
                          },
                          "connectedByActorId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "updatedAt": {
                            "type": "integer",
                            "minimum": 0
                          }
                        }
                      }
                    },
                    "oauthReadiness": {
                      "type": "object",
                      "required": [
                        "instagram",
                        "facebook",
                        "linkedin",
                        "bluesky",
                        "x"
                      ],
                      "properties": {
                        "instagram": {
                          "type": "string",
                          "enum": [
                            "ready",
                            "not_configured",
                            "unavailable"
                          ]
                        },
                        "facebook": {
                          "type": "string",
                          "enum": [
                            "ready",
                            "not_configured",
                            "unavailable"
                          ]
                        },
                        "linkedin": {
                          "type": "string",
                          "enum": [
                            "ready",
                            "not_configured",
                            "unavailable"
                          ]
                        },
                        "bluesky": {
                          "type": "string",
                          "enum": [
                            "ready",
                            "not_configured",
                            "unavailable"
                          ]
                        },
                        "x": {
                          "type": "string",
                          "enum": [
                            "ready",
                            "not_configured",
                            "unavailable"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/channels/{channelId}/publisher/custom-http/connect": {
      "post": {
        "operationId": "createCustomHttpPublisherConnection",
        "summary": "Create a custom HTTP publisher connection",
        "tags": [
          "Channels"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "endpointUrl",
                  "authentication",
                  "secret"
                ],
                "properties": {
                  "endpointUrl": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2048
                  },
                  "authentication": {
                    "anyOf": [
                      {
                        "type": "object",
                        "required": [
                          "kind"
                        ],
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "none"
                          }
                        }
                      },
                      {
                        "type": "object",
                        "required": [
                          "kind"
                        ],
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "bearer"
                          }
                        }
                      },
                      {
                        "type": "object",
                        "required": [
                          "kind",
                          "headerName"
                        ],
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "header"
                          },
                          "headerName": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          }
                        }
                      },
                      {
                        "type": "object",
                        "required": [
                          "kind"
                        ],
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "path"
                          }
                        }
                      }
                    ]
                  },
                  "externalAccountName": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 255
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "secret": {
                    "type": "string",
                    "minLength": 32,
                    "maxLength": 4096,
                    "writeOnly": true
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "endpointUrl",
                  "authentication",
                  "secret"
                ],
                "properties": {
                  "endpointUrl": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2048
                  },
                  "authentication": {
                    "anyOf": [
                      {
                        "type": "object",
                        "required": [
                          "kind"
                        ],
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "none"
                          }
                        }
                      },
                      {
                        "type": "object",
                        "required": [
                          "kind"
                        ],
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "bearer"
                          }
                        }
                      },
                      {
                        "type": "object",
                        "required": [
                          "kind",
                          "headerName"
                        ],
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "header"
                          },
                          "headerName": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          }
                        }
                      },
                      {
                        "type": "object",
                        "required": [
                          "kind"
                        ],
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "path"
                          }
                        }
                      }
                    ]
                  },
                  "externalAccountName": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 255
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "secret": {
                    "type": "string",
                    "minLength": 32,
                    "maxLength": 4096,
                    "writeOnly": true
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "endpointUrl",
                  "authentication",
                  "secret"
                ],
                "properties": {
                  "endpointUrl": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2048
                  },
                  "authentication": {
                    "anyOf": [
                      {
                        "type": "object",
                        "required": [
                          "kind"
                        ],
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "none"
                          }
                        }
                      },
                      {
                        "type": "object",
                        "required": [
                          "kind"
                        ],
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "bearer"
                          }
                        }
                      },
                      {
                        "type": "object",
                        "required": [
                          "kind",
                          "headerName"
                        ],
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "header"
                          },
                          "headerName": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          }
                        }
                      },
                      {
                        "type": "object",
                        "required": [
                          "kind"
                        ],
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "path"
                          }
                        }
                      }
                    ]
                  },
                  "externalAccountName": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 255
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "secret": {
                    "type": "string",
                    "minLength": 32,
                    "maxLength": 4096,
                    "writeOnly": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "connection"
                  ],
                  "properties": {
                    "connection": {
                      "type": "object",
                      "required": [
                        "id",
                        "projectId",
                        "publisherId",
                        "channelId",
                        "kind",
                        "credentialId",
                        "endpointUrl",
                        "destination",
                        "authentication",
                        "providerId",
                        "externalAccountId",
                        "externalAccountName",
                        "scopes",
                        "state",
                        "connectedByActorId",
                        "createdAt",
                        "updatedAt"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1
                        },
                        "projectId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "publisherId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "channelId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "kind": {
                          "type": "string",
                          "minLength": 1
                        },
                        "credentialId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "endpointUrl": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "destination": {
                          "anyOf": [
                            {
                              "type": "object",
                              "required": [
                                "type",
                                "id",
                                "name"
                              ],
                              "properties": {
                                "type": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "const": "account"
                                    },
                                    {
                                      "type": "string",
                                      "const": "member"
                                    },
                                    {
                                      "type": "string",
                                      "const": "organization"
                                    },
                                    {
                                      "type": "string",
                                      "const": "channel"
                                    }
                                  ]
                                },
                                "id": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "name": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "authentication": {
                          "anyOf": [
                            {
                              "type": "object",
                              "required": [
                                "kind"
                              ],
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "const": "none"
                                }
                              }
                            },
                            {
                              "type": "object",
                              "required": [
                                "kind"
                              ],
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "const": "bearer"
                                }
                              }
                            },
                            {
                              "type": "object",
                              "required": [
                                "kind",
                                "headerName"
                              ],
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "const": "header"
                                },
                                "headerName": {
                                  "type": "string",
                                  "minLength": 1
                                }
                              }
                            },
                            {
                              "type": "object",
                              "required": [
                                "kind"
                              ],
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "const": "path"
                                }
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "providerId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "externalAccountId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "externalAccountName": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "scopes": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "active",
                            "reconnect_required",
                            "revoked"
                          ]
                        },
                        "connectedByActorId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/channels/{channelId}/publisher/facebook/connect": {
      "post": {
        "operationId": "startFacebookPublisherConnection",
        "summary": "Start Facebook Page authorization",
        "tags": [
          "Channels"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "providerApplicationId": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "providerApplicationId": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "providerApplicationId": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "url"
                  ],
                  "properties": {
                    "url": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Response for status 503",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/oauth/facebook/callback": {
      "get": {
        "operationId": "completeFacebookPublisherAuthorization",
        "summary": "Complete Facebook authorization for Page selection",
        "tags": [
          "Channels"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "responses": {
          "default": {
            "description": "Response schema is not declared for this operation."
          }
        }
      }
    },
    "/api/projects/{projectId}/channels/{channelId}/publisher/facebook/pages": {
      "get": {
        "operationId": "listFacebookPublisherPages",
        "summary": "List authorized Facebook Page choices",
        "tags": [
          "Channels"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "selection",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 32,
              "maxLength": 512
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 2048
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "pages",
                    "nextCursor"
                  ],
                  "properties": {
                    "pages": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "name",
                          "hasPublishTask"
                        ],
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "hasPublishTask": {
                            "type": "boolean"
                          }
                        }
                      }
                    },
                    "nextCursor": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Response for status 503",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/channels/{channelId}/publisher/facebook/select": {
      "post": {
        "operationId": "selectFacebookPublisherPage",
        "summary": "Connect an explicitly selected Facebook Page",
        "tags": [
          "Channels"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "selection",
                  "pageId"
                ],
                "properties": {
                  "selection": {
                    "type": "string",
                    "minLength": 32,
                    "maxLength": 512
                  },
                  "pageId": {
                    "type": "string",
                    "pattern": "^[1-9][0-9]*$"
                  },
                  "after": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2048
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "selection",
                  "pageId"
                ],
                "properties": {
                  "selection": {
                    "type": "string",
                    "minLength": 32,
                    "maxLength": 512
                  },
                  "pageId": {
                    "type": "string",
                    "pattern": "^[1-9][0-9]*$"
                  },
                  "after": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2048
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "selection",
                  "pageId"
                ],
                "properties": {
                  "selection": {
                    "type": "string",
                    "minLength": 32,
                    "maxLength": 512
                  },
                  "pageId": {
                    "type": "string",
                    "pattern": "^[1-9][0-9]*$"
                  },
                  "after": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2048
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "connection"
                  ],
                  "properties": {
                    "connection": {
                      "type": "object",
                      "required": [
                        "id",
                        "projectId",
                        "publisherId",
                        "channelId",
                        "kind",
                        "credentialId",
                        "endpointUrl",
                        "destination",
                        "authentication",
                        "providerId",
                        "externalAccountId",
                        "externalAccountName",
                        "scopes",
                        "state",
                        "connectedByActorId",
                        "createdAt",
                        "updatedAt"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1
                        },
                        "projectId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "publisherId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "channelId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "kind": {
                          "type": "string",
                          "minLength": 1
                        },
                        "credentialId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "endpointUrl": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "destination": {
                          "anyOf": [
                            {
                              "type": "object",
                              "required": [
                                "type",
                                "id",
                                "name"
                              ],
                              "properties": {
                                "type": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "const": "account"
                                    },
                                    {
                                      "type": "string",
                                      "const": "member"
                                    },
                                    {
                                      "type": "string",
                                      "const": "organization"
                                    },
                                    {
                                      "type": "string",
                                      "const": "channel"
                                    }
                                  ]
                                },
                                "id": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "name": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "authentication": {
                          "anyOf": [
                            {
                              "type": "object",
                              "required": [
                                "kind"
                              ],
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "const": "none"
                                }
                              }
                            },
                            {
                              "type": "object",
                              "required": [
                                "kind"
                              ],
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "const": "bearer"
                                }
                              }
                            },
                            {
                              "type": "object",
                              "required": [
                                "kind",
                                "headerName"
                              ],
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "const": "header"
                                },
                                "headerName": {
                                  "type": "string",
                                  "minLength": 1
                                }
                              }
                            },
                            {
                              "type": "object",
                              "required": [
                                "kind"
                              ],
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "const": "path"
                                }
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "providerId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "externalAccountId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "externalAccountName": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "scopes": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "active",
                            "reconnect_required",
                            "revoked"
                          ]
                        },
                        "connectedByActorId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Response for status 503",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/channels/{channelId}/publisher/instagram/connect": {
      "post": {
        "operationId": "startInstagramPublisherConnection",
        "summary": "Start direct Instagram professional account authorization",
        "tags": [
          "Channels"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "providerApplicationId": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "providerApplicationId": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "providerApplicationId": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "url"
                  ],
                  "properties": {
                    "url": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Response for status 503",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/oauth/instagram/callback": {
      "get": {
        "operationId": "completeInstagramPublisherAuthorization",
        "summary": "Complete direct Instagram account connection",
        "tags": [
          "Channels"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "responses": {
          "default": {
            "description": "Response schema is not declared for this operation."
          }
        }
      }
    },
    "/api/projects/{projectId}/channels/{channelId}/publisher/linkedin/connect": {
      "post": {
        "operationId": "startLinkedInPublisherConnection",
        "summary": "Start the LinkedIn publisher connection flow",
        "tags": [
          "Channels"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "providerApplicationId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "destination": {
                    "anyOf": [
                      {
                        "type": "object",
                        "required": [
                          "type"
                        ],
                        "properties": {
                          "type": {
                            "type": "string",
                            "const": "member"
                          }
                        }
                      },
                      {
                        "type": "object",
                        "required": [
                          "type",
                          "id"
                        ],
                        "properties": {
                          "type": {
                            "type": "string",
                            "const": "organization"
                          },
                          "id": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 64
                          }
                        }
                      }
                    ]
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "providerApplicationId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "destination": {
                    "anyOf": [
                      {
                        "type": "object",
                        "required": [
                          "type"
                        ],
                        "properties": {
                          "type": {
                            "type": "string",
                            "const": "member"
                          }
                        }
                      },
                      {
                        "type": "object",
                        "required": [
                          "type",
                          "id"
                        ],
                        "properties": {
                          "type": {
                            "type": "string",
                            "const": "organization"
                          },
                          "id": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 64
                          }
                        }
                      }
                    ]
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "providerApplicationId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "destination": {
                    "anyOf": [
                      {
                        "type": "object",
                        "required": [
                          "type"
                        ],
                        "properties": {
                          "type": {
                            "type": "string",
                            "const": "member"
                          }
                        }
                      },
                      {
                        "type": "object",
                        "required": [
                          "type",
                          "id"
                        ],
                        "properties": {
                          "type": {
                            "type": "string",
                            "const": "organization"
                          },
                          "id": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 64
                          }
                        }
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "provider",
                    "scopes",
                    "authorizationUrl"
                  ],
                  "properties": {
                    "provider": {
                      "type": "string",
                      "const": "linkedin"
                    },
                    "scopes": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "authorizationUrl": {
                      "type": "string",
                      "minLength": 1
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Response for status 503",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/oauth/linkedin/callback": {
      "get": {
        "operationId": "completeLinkedInPublisherConnection",
        "summary": "Complete a LinkedIn publisher connection flow",
        "tags": [
          "Channels"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "responses": {
          "401": {
            "description": "Human authentication is required",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/channels/{channelId}/publisher/telegram/connect": {
      "post": {
        "operationId": "createTelegramPublisherConnection",
        "summary": "Create a Telegram publisher connection",
        "tags": [
          "Channels"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "botToken",
                  "chatReference"
                ],
                "properties": {
                  "botToken": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 512,
                    "writeOnly": true
                  },
                  "chatReference": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "botToken",
                  "chatReference"
                ],
                "properties": {
                  "botToken": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 512,
                    "writeOnly": true
                  },
                  "chatReference": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "botToken",
                  "chatReference"
                ],
                "properties": {
                  "botToken": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 512,
                    "writeOnly": true
                  },
                  "chatReference": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "connection"
                  ],
                  "properties": {
                    "connection": {
                      "type": "object",
                      "required": [
                        "id",
                        "projectId",
                        "publisherId",
                        "channelId",
                        "kind",
                        "credentialId",
                        "endpointUrl",
                        "destination",
                        "authentication",
                        "providerId",
                        "externalAccountId",
                        "externalAccountName",
                        "scopes",
                        "state",
                        "connectedByActorId",
                        "createdAt",
                        "updatedAt"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1
                        },
                        "projectId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "publisherId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "channelId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "kind": {
                          "type": "string",
                          "minLength": 1
                        },
                        "credentialId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "endpointUrl": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "destination": {
                          "anyOf": [
                            {
                              "type": "object",
                              "required": [
                                "type",
                                "id",
                                "name"
                              ],
                              "properties": {
                                "type": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "const": "account"
                                    },
                                    {
                                      "type": "string",
                                      "const": "member"
                                    },
                                    {
                                      "type": "string",
                                      "const": "organization"
                                    },
                                    {
                                      "type": "string",
                                      "const": "channel"
                                    }
                                  ]
                                },
                                "id": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "name": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "authentication": {
                          "anyOf": [
                            {
                              "type": "object",
                              "required": [
                                "kind"
                              ],
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "const": "none"
                                }
                              }
                            },
                            {
                              "type": "object",
                              "required": [
                                "kind"
                              ],
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "const": "bearer"
                                }
                              }
                            },
                            {
                              "type": "object",
                              "required": [
                                "kind",
                                "headerName"
                              ],
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "const": "header"
                                },
                                "headerName": {
                                  "type": "string",
                                  "minLength": 1
                                }
                              }
                            },
                            {
                              "type": "object",
                              "required": [
                                "kind"
                              ],
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "const": "path"
                                }
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "providerId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "externalAccountId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "externalAccountName": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "scopes": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "active",
                            "reconnect_required",
                            "revoked"
                          ]
                        },
                        "connectedByActorId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Response for status 503",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/channels/{channelId}/publisher/bluesky/connect": {
      "post": {
        "operationId": "startBlueskyPublisherConnection",
        "summary": "Start the Bluesky publisher connection flow",
        "tags": [
          "Channels"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "handle"
                ],
                "properties": {
                  "handle": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 253
                  },
                  "providerApplicationId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "handle"
                ],
                "properties": {
                  "handle": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 253
                  },
                  "providerApplicationId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "handle"
                ],
                "properties": {
                  "handle": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 253
                  },
                  "providerApplicationId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "provider",
                    "scopes",
                    "authorizationUrl"
                  ],
                  "properties": {
                    "provider": {
                      "type": "string",
                      "const": "bluesky"
                    },
                    "scopes": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "authorizationUrl": {
                      "type": "string",
                      "minLength": 1
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Response for status 503",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/oauth/bluesky/callback": {
      "get": {
        "operationId": "completeBlueskyPublisherConnection",
        "summary": "Complete a Bluesky publisher connection flow",
        "tags": [
          "Channels"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "responses": {
          "401": {
            "description": "Human authentication is required",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/channels/{channelId}/publisher/devto/connect": {
      "post": {
        "operationId": "createDevtoPublisherConnection",
        "summary": "Create a DEV.to publisher connection",
        "tags": [
          "Channels"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "apiKey"
                ],
                "properties": {
                  "apiKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4096,
                    "writeOnly": true
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "apiKey"
                ],
                "properties": {
                  "apiKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4096,
                    "writeOnly": true
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "apiKey"
                ],
                "properties": {
                  "apiKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4096,
                    "writeOnly": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "connection"
                  ],
                  "properties": {
                    "connection": {
                      "type": "object",
                      "required": [
                        "id",
                        "projectId",
                        "publisherId",
                        "channelId",
                        "kind",
                        "credentialId",
                        "endpointUrl",
                        "destination",
                        "authentication",
                        "providerId",
                        "externalAccountId",
                        "externalAccountName",
                        "scopes",
                        "state",
                        "connectedByActorId",
                        "createdAt",
                        "updatedAt"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1
                        },
                        "projectId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "publisherId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "channelId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "kind": {
                          "type": "string",
                          "minLength": 1
                        },
                        "credentialId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "endpointUrl": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "destination": {
                          "anyOf": [
                            {
                              "type": "object",
                              "required": [
                                "type",
                                "id",
                                "name"
                              ],
                              "properties": {
                                "type": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "const": "account"
                                    },
                                    {
                                      "type": "string",
                                      "const": "member"
                                    },
                                    {
                                      "type": "string",
                                      "const": "organization"
                                    },
                                    {
                                      "type": "string",
                                      "const": "channel"
                                    }
                                  ]
                                },
                                "id": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "name": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "authentication": {
                          "anyOf": [
                            {
                              "type": "object",
                              "required": [
                                "kind"
                              ],
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "const": "none"
                                }
                              }
                            },
                            {
                              "type": "object",
                              "required": [
                                "kind"
                              ],
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "const": "bearer"
                                }
                              }
                            },
                            {
                              "type": "object",
                              "required": [
                                "kind",
                                "headerName"
                              ],
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "const": "header"
                                },
                                "headerName": {
                                  "type": "string",
                                  "minLength": 1
                                }
                              }
                            },
                            {
                              "type": "object",
                              "required": [
                                "kind"
                              ],
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "const": "path"
                                }
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "providerId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "externalAccountId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "externalAccountName": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "scopes": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "active",
                            "reconnect_required",
                            "revoked"
                          ]
                        },
                        "connectedByActorId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Response for status 503",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/channels/{channelId}/publisher/discord/connect": {
      "post": {
        "operationId": "createDiscordPublisherConnection",
        "summary": "Create a Discord publisher connection",
        "tags": [
          "Channels"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "botToken",
                  "channelId"
                ],
                "properties": {
                  "botToken": {
                    "type": "string",
                    "minLength": 32,
                    "maxLength": 4096,
                    "writeOnly": true
                  },
                  "channelId": {
                    "type": "string",
                    "minLength": 17,
                    "maxLength": 20
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "botToken",
                  "channelId"
                ],
                "properties": {
                  "botToken": {
                    "type": "string",
                    "minLength": 32,
                    "maxLength": 4096,
                    "writeOnly": true
                  },
                  "channelId": {
                    "type": "string",
                    "minLength": 17,
                    "maxLength": 20
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "botToken",
                  "channelId"
                ],
                "properties": {
                  "botToken": {
                    "type": "string",
                    "minLength": 32,
                    "maxLength": 4096,
                    "writeOnly": true
                  },
                  "channelId": {
                    "type": "string",
                    "minLength": 17,
                    "maxLength": 20
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "connection"
                  ],
                  "properties": {
                    "connection": {
                      "type": "object",
                      "required": [
                        "id",
                        "projectId",
                        "publisherId",
                        "channelId",
                        "kind",
                        "credentialId",
                        "endpointUrl",
                        "destination",
                        "authentication",
                        "providerId",
                        "externalAccountId",
                        "externalAccountName",
                        "scopes",
                        "state",
                        "connectedByActorId",
                        "createdAt",
                        "updatedAt"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1
                        },
                        "projectId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "publisherId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "channelId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "kind": {
                          "type": "string",
                          "minLength": 1
                        },
                        "credentialId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "endpointUrl": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "destination": {
                          "anyOf": [
                            {
                              "type": "object",
                              "required": [
                                "type",
                                "id",
                                "name"
                              ],
                              "properties": {
                                "type": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "const": "account"
                                    },
                                    {
                                      "type": "string",
                                      "const": "member"
                                    },
                                    {
                                      "type": "string",
                                      "const": "organization"
                                    },
                                    {
                                      "type": "string",
                                      "const": "channel"
                                    }
                                  ]
                                },
                                "id": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "name": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "authentication": {
                          "anyOf": [
                            {
                              "type": "object",
                              "required": [
                                "kind"
                              ],
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "const": "none"
                                }
                              }
                            },
                            {
                              "type": "object",
                              "required": [
                                "kind"
                              ],
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "const": "bearer"
                                }
                              }
                            },
                            {
                              "type": "object",
                              "required": [
                                "kind",
                                "headerName"
                              ],
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "const": "header"
                                },
                                "headerName": {
                                  "type": "string",
                                  "minLength": 1
                                }
                              }
                            },
                            {
                              "type": "object",
                              "required": [
                                "kind"
                              ],
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "const": "path"
                                }
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "providerId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "externalAccountId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "externalAccountName": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "scopes": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "active",
                            "reconnect_required",
                            "revoked"
                          ]
                        },
                        "connectedByActorId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Response for status 503",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/channels/{channelId}/publisher/mastodon/connect": {
      "post": {
        "operationId": "startMastodonPublisherConnection",
        "summary": "Start a Mastodon publisher connection flow",
        "tags": [
          "Channels"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "instanceUrl"
                ],
                "properties": {
                  "instanceUrl": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2048
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "instanceUrl"
                ],
                "properties": {
                  "instanceUrl": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2048
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "instanceUrl"
                ],
                "properties": {
                  "instanceUrl": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2048
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "provider",
                    "scopes",
                    "authorizationUrl"
                  ],
                  "properties": {
                    "provider": {
                      "type": "string",
                      "const": "mastodon"
                    },
                    "scopes": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "authorizationUrl": {
                      "type": "string",
                      "minLength": 1
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Response for status 503",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/oauth/mastodon/callback": {
      "get": {
        "operationId": "completeMastodonPublisherConnection",
        "summary": "Complete a Mastodon publisher connection flow",
        "tags": [
          "Channels"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "responses": {
          "401": {
            "description": "Human authentication is required",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/channels/{channelId}/publisher/x/connect": {
      "post": {
        "operationId": "startXPublisherConnection",
        "summary": "Start the X (Twitter) publisher connection flow",
        "tags": [
          "Channels"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "providerApplicationId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "providerApplicationId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "providerApplicationId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "provider",
                    "scopes",
                    "authorizationUrl"
                  ],
                  "properties": {
                    "provider": {
                      "type": "string",
                      "const": "x"
                    },
                    "scopes": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "authorizationUrl": {
                      "type": "string",
                      "minLength": 1
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Response for status 503",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/oauth/x/callback": {
      "get": {
        "operationId": "completeXPublisherConnection",
        "summary": "Complete an X (Twitter) publisher connection flow",
        "tags": [
          "Channels"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "responses": {
          "401": {
            "description": "Human authentication is required",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/channels/{channelId}/publisher": {
      "delete": {
        "operationId": "disconnectProjectPublisher",
        "summary": "Disconnect the publisher from a project channel",
        "tags": [
          "Channels"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "disconnected"
                  ],
                  "properties": {
                    "disconnected": {
                      "type": "boolean",
                      "const": true
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/posts/{postId}": {
      "get": {
        "operationId": "getSourcePost",
        "summary": "Read the current source post revision",
        "tags": [
          "Posts"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "postId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "post"
                  ],
                  "properties": {
                    "post": {
                      "type": "object",
                      "required": [
                        "id",
                        "projectId",
                        "title",
                        "sourceContent",
                        "sourceRevision",
                        "createdByActorId",
                        "createdAt",
                        "updatedAt"
                      ],
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "projectId": {
                          "type": "string"
                        },
                        "title": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "sourceContent": {
                          "anyOf": [
                            {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            {
                              "type": "array",
                              "items": {}
                            },
                            {
                              "type": "object",
                              "patternProperties": {
                                "^(.*)$": {}
                              }
                            }
                          ]
                        },
                        "sourceRevision": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "createdByActorId": {
                          "type": "string"
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "savePostSource",
        "summary": "Save the shared source without modifying destinations",
        "tags": [
          "Posts"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "postId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "expectedSourceRevision",
                  "sourceContent"
                ],
                "properties": {
                  "expectedSourceRevision": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "sourceContent": {
                    "type": "object",
                    "required": [
                      "media"
                    ],
                    "properties": {
                      "body": {
                        "type": "object",
                        "required": [
                          "text",
                          "format"
                        ],
                        "properties": {
                          "text": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 1000000
                          },
                          "format": {
                            "type": "string",
                            "enum": [
                              "plain_text",
                              "markdown"
                            ]
                          }
                        },
                        "additionalProperties": false
                      },
                      "headline": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 10000
                      },
                      "language": {
                        "type": "string",
                        "minLength": 2,
                        "maxLength": 35
                      },
                      "media": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "assetId"
                          ],
                          "properties": {
                            "assetId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 255
                            },
                            "accessibilityText": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 10000
                            }
                          },
                          "additionalProperties": false
                        },
                        "maxItems": 256
                      }
                    },
                    "additionalProperties": false
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "expectedSourceRevision",
                  "sourceContent"
                ],
                "properties": {
                  "expectedSourceRevision": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "sourceContent": {
                    "type": "object",
                    "required": [
                      "media"
                    ],
                    "properties": {
                      "body": {
                        "type": "object",
                        "required": [
                          "text",
                          "format"
                        ],
                        "properties": {
                          "text": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 1000000
                          },
                          "format": {
                            "type": "string",
                            "enum": [
                              "plain_text",
                              "markdown"
                            ]
                          }
                        },
                        "additionalProperties": false
                      },
                      "headline": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 10000
                      },
                      "language": {
                        "type": "string",
                        "minLength": 2,
                        "maxLength": 35
                      },
                      "media": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "assetId"
                          ],
                          "properties": {
                            "assetId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 255
                            },
                            "accessibilityText": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 10000
                            }
                          },
                          "additionalProperties": false
                        },
                        "maxItems": 256
                      }
                    },
                    "additionalProperties": false
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "expectedSourceRevision",
                  "sourceContent"
                ],
                "properties": {
                  "expectedSourceRevision": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "sourceContent": {
                    "type": "object",
                    "required": [
                      "media"
                    ],
                    "properties": {
                      "body": {
                        "type": "object",
                        "required": [
                          "text",
                          "format"
                        ],
                        "properties": {
                          "text": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 1000000
                          },
                          "format": {
                            "type": "string",
                            "enum": [
                              "plain_text",
                              "markdown"
                            ]
                          }
                        },
                        "additionalProperties": false
                      },
                      "headline": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 10000
                      },
                      "language": {
                        "type": "string",
                        "minLength": 2,
                        "maxLength": 35
                      },
                      "media": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "assetId"
                          ],
                          "properties": {
                            "assetId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 255
                            },
                            "accessibilityText": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 10000
                            }
                          },
                          "additionalProperties": false
                        },
                        "maxItems": 256
                      }
                    },
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "post"
                  ],
                  "properties": {
                    "post": {
                      "type": "object",
                      "required": [
                        "id",
                        "projectId",
                        "title",
                        "sourceContent",
                        "sourceRevision",
                        "createdByActorId",
                        "createdAt",
                        "updatedAt"
                      ],
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "projectId": {
                          "type": "string"
                        },
                        "title": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "sourceContent": {
                          "anyOf": [
                            {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            {
                              "type": "array",
                              "items": {}
                            },
                            {
                              "type": "object",
                              "patternProperties": {
                                "^(.*)$": {}
                              }
                            }
                          ]
                        },
                        "sourceRevision": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "createdByActorId": {
                          "type": "string"
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Response for status 422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/posts/{postId}/destinations": {
      "post": {
        "operationId": "addPostDestinationDrafts",
        "summary": "Add unscheduled destination drafts to an existing source post",
        "tags": [
          "Posts"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "postId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "expectedSourceRevision",
                  "publications"
                ],
                "properties": {
                  "expectedSourceRevision": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "confirmExistingChannels": {
                    "type": "boolean"
                  },
                  "publications": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "channelId",
                        "deliveryMode"
                      ],
                      "properties": {
                        "channelId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "deliveryMode": {
                          "type": "string",
                          "enum": [
                            "manual",
                            "automatic"
                          ]
                        }
                      }
                    },
                    "minItems": 1,
                    "maxItems": 100
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "expectedSourceRevision",
                  "publications"
                ],
                "properties": {
                  "expectedSourceRevision": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "confirmExistingChannels": {
                    "type": "boolean"
                  },
                  "publications": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "channelId",
                        "deliveryMode"
                      ],
                      "properties": {
                        "channelId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "deliveryMode": {
                          "type": "string",
                          "enum": [
                            "manual",
                            "automatic"
                          ]
                        }
                      }
                    },
                    "minItems": 1,
                    "maxItems": 100
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "expectedSourceRevision",
                  "publications"
                ],
                "properties": {
                  "expectedSourceRevision": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "confirmExistingChannels": {
                    "type": "boolean"
                  },
                  "publications": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "channelId",
                        "deliveryMode"
                      ],
                      "properties": {
                        "channelId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "deliveryMode": {
                          "type": "string",
                          "enum": [
                            "manual",
                            "automatic"
                          ]
                        }
                      }
                    },
                    "minItems": 1,
                    "maxItems": 100
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Response for status 201",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "post",
                    "publications"
                  ],
                  "properties": {
                    "post": {
                      "type": "object",
                      "required": [
                        "id",
                        "projectId",
                        "title",
                        "sourceContent",
                        "sourceRevision",
                        "createdByActorId",
                        "createdAt",
                        "updatedAt"
                      ],
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "projectId": {
                          "type": "string"
                        },
                        "title": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "sourceContent": {
                          "anyOf": [
                            {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            {
                              "type": "array",
                              "items": {}
                            },
                            {
                              "type": "object",
                              "patternProperties": {
                                "^(.*)$": {}
                              }
                            }
                          ]
                        },
                        "sourceRevision": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "createdByActorId": {
                          "type": "string"
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        }
                      }
                    },
                    "publications": {
                      "type": "array",
                      "items": {
                        "allOf": [
                          {
                            "type": "object",
                            "required": [
                              "id",
                              "projectId",
                              "postId",
                              "channelId",
                              "targetRevisionId",
                              "deliveryMode",
                              "reviewState",
                              "state",
                              "scheduledAt",
                              "publishedAt",
                              "externalId",
                              "externalUrl",
                              "errorMessage",
                              "createdByActorId",
                              "scheduledByActorId",
                              "stateChangedByActorId",
                              "publishedByActorId",
                              "lastAssessedProfileVersionId",
                              "createdAt",
                              "updatedAt"
                            ],
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "projectId": {
                                "type": "string"
                              },
                              "postId": {
                                "type": "string"
                              },
                              "channelId": {
                                "type": "string"
                              },
                              "targetRevisionId": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "deliveryMode": {
                                "enum": [
                                  "manual",
                                  "automatic"
                                ]
                              },
                              "reviewState": {
                                "enum": [
                                  "compatible",
                                  "review_required"
                                ]
                              },
                              "state": {
                                "enum": [
                                  "draft",
                                  "scheduled",
                                  "ready",
                                  "publishing",
                                  "published",
                                  "failed",
                                  "ambiguous",
                                  "cancelled"
                                ]
                              },
                              "scheduledAt": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "publishedAt": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "externalId": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "externalUrl": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "errorMessage": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "createdByActorId": {
                                "type": "string"
                              },
                              "scheduledByActorId": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "stateChangedByActorId": {
                                "type": "string"
                              },
                              "publishedByActorId": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "lastAssessedProfileVersionId": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "createdAt": {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              },
                              "updatedAt": {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              }
                            }
                          },
                          {
                            "type": "object",
                            "required": [
                              "profileAssessmentIssues"
                            ],
                            "properties": {
                              "profileAssessmentIssues": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "patternProperties": {
                                    "^.*$": {}
                                  }
                                }
                              }
                            }
                          }
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Response for status 422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/posts": {
      "post": {
        "operationId": "createPost",
        "summary": "Create a source post and its publications",
        "tags": [
          "Posts"
        ],
        "description": "Omitting scheduledAt creates unscheduled destination drafts. API keys need publication:manage; supplying scheduledAt also requires publication:dispatch. Target content must match the chosen channel profile. The examples use placeholder channel IDs that must be replaced.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "sourceContent",
                  "publications"
                ],
                "properties": {
                  "title": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "sourceContent": {
                    "type": "object",
                    "required": [
                      "media"
                    ],
                    "properties": {
                      "body": {
                        "type": "object",
                        "required": [
                          "text",
                          "format"
                        ],
                        "properties": {
                          "text": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 1000000
                          },
                          "format": {
                            "type": "string",
                            "enum": [
                              "plain_text",
                              "markdown"
                            ]
                          }
                        },
                        "additionalProperties": false
                      },
                      "headline": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 10000
                      },
                      "language": {
                        "type": "string",
                        "minLength": 2,
                        "maxLength": 35
                      },
                      "media": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "assetId"
                          ],
                          "properties": {
                            "assetId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 255
                            },
                            "accessibilityText": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 10000
                            }
                          },
                          "additionalProperties": false
                        },
                        "maxItems": 256
                      }
                    },
                    "additionalProperties": false
                  },
                  "publications": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "channelId",
                        "deliveryMode"
                      ],
                      "properties": {
                        "channelId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "targetContent": {
                          "type": "object",
                          "patternProperties": {
                            "^.*$": {}
                          }
                        },
                        "deliveryMode": {
                          "type": "string",
                          "enum": [
                            "manual",
                            "automatic"
                          ]
                        },
                        "scheduledAt": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": 0
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      }
                    },
                    "minItems": 1
                  }
                },
                "example": {
                  "title": "Friday collection announcement",
                  "sourceContent": {
                    "body": {
                      "text": "Our new collection arrives on Friday.",
                      "format": "plain_text"
                    },
                    "media": []
                  },
                  "publications": [
                    {
                      "channelId": "REPLACE_WITH_MANUAL_CHANNEL_ID",
                      "deliveryMode": "manual",
                      "targetContent": {
                        "body": "Our new collection arrives on Friday.",
                        "media": []
                      }
                    }
                  ]
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "sourceContent",
                  "publications"
                ],
                "properties": {
                  "title": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "sourceContent": {
                    "type": "object",
                    "required": [
                      "media"
                    ],
                    "properties": {
                      "body": {
                        "type": "object",
                        "required": [
                          "text",
                          "format"
                        ],
                        "properties": {
                          "text": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 1000000
                          },
                          "format": {
                            "type": "string",
                            "enum": [
                              "plain_text",
                              "markdown"
                            ]
                          }
                        },
                        "additionalProperties": false
                      },
                      "headline": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 10000
                      },
                      "language": {
                        "type": "string",
                        "minLength": 2,
                        "maxLength": 35
                      },
                      "media": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "assetId"
                          ],
                          "properties": {
                            "assetId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 255
                            },
                            "accessibilityText": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 10000
                            }
                          },
                          "additionalProperties": false
                        },
                        "maxItems": 256
                      }
                    },
                    "additionalProperties": false
                  },
                  "publications": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "channelId",
                        "deliveryMode"
                      ],
                      "properties": {
                        "channelId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "targetContent": {
                          "type": "object",
                          "patternProperties": {
                            "^.*$": {}
                          }
                        },
                        "deliveryMode": {
                          "type": "string",
                          "enum": [
                            "manual",
                            "automatic"
                          ]
                        },
                        "scheduledAt": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": 0
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      }
                    },
                    "minItems": 1
                  }
                },
                "example": {
                  "title": "Friday collection announcement",
                  "sourceContent": {
                    "body": {
                      "text": "Our new collection arrives on Friday.",
                      "format": "plain_text"
                    },
                    "media": []
                  },
                  "publications": [
                    {
                      "channelId": "REPLACE_WITH_MANUAL_CHANNEL_ID",
                      "deliveryMode": "manual",
                      "targetContent": {
                        "body": "Our new collection arrives on Friday.",
                        "media": []
                      }
                    }
                  ]
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "sourceContent",
                  "publications"
                ],
                "properties": {
                  "title": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "sourceContent": {
                    "type": "object",
                    "required": [
                      "media"
                    ],
                    "properties": {
                      "body": {
                        "type": "object",
                        "required": [
                          "text",
                          "format"
                        ],
                        "properties": {
                          "text": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 1000000
                          },
                          "format": {
                            "type": "string",
                            "enum": [
                              "plain_text",
                              "markdown"
                            ]
                          }
                        },
                        "additionalProperties": false
                      },
                      "headline": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 10000
                      },
                      "language": {
                        "type": "string",
                        "minLength": 2,
                        "maxLength": 35
                      },
                      "media": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "assetId"
                          ],
                          "properties": {
                            "assetId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 255
                            },
                            "accessibilityText": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 10000
                            }
                          },
                          "additionalProperties": false
                        },
                        "maxItems": 256
                      }
                    },
                    "additionalProperties": false
                  },
                  "publications": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "channelId",
                        "deliveryMode"
                      ],
                      "properties": {
                        "channelId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "targetContent": {
                          "type": "object",
                          "patternProperties": {
                            "^.*$": {}
                          }
                        },
                        "deliveryMode": {
                          "type": "string",
                          "enum": [
                            "manual",
                            "automatic"
                          ]
                        },
                        "scheduledAt": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": 0
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      }
                    },
                    "minItems": 1
                  }
                },
                "example": {
                  "title": "Friday collection announcement",
                  "sourceContent": {
                    "body": {
                      "text": "Our new collection arrives on Friday.",
                      "format": "plain_text"
                    },
                    "media": []
                  },
                  "publications": [
                    {
                      "channelId": "REPLACE_WITH_MANUAL_CHANNEL_ID",
                      "deliveryMode": "manual",
                      "targetContent": {
                        "body": "Our new collection arrives on Friday.",
                        "media": []
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Response for status 201",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "post",
                    "publications"
                  ],
                  "properties": {
                    "post": {
                      "type": "object",
                      "required": [
                        "id",
                        "projectId",
                        "title",
                        "sourceContent",
                        "sourceRevision",
                        "createdByActorId",
                        "createdAt",
                        "updatedAt"
                      ],
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "projectId": {
                          "type": "string"
                        },
                        "title": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "sourceContent": {
                          "anyOf": [
                            {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            {
                              "type": "array",
                              "items": {}
                            },
                            {
                              "type": "object",
                              "patternProperties": {
                                "^(.*)$": {}
                              }
                            }
                          ]
                        },
                        "sourceRevision": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "createdByActorId": {
                          "type": "string"
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        }
                      }
                    },
                    "publications": {
                      "type": "array",
                      "items": {
                        "allOf": [
                          {
                            "type": "object",
                            "required": [
                              "id",
                              "projectId",
                              "postId",
                              "channelId",
                              "targetRevisionId",
                              "deliveryMode",
                              "reviewState",
                              "state",
                              "scheduledAt",
                              "publishedAt",
                              "externalId",
                              "externalUrl",
                              "errorMessage",
                              "createdByActorId",
                              "scheduledByActorId",
                              "stateChangedByActorId",
                              "publishedByActorId",
                              "lastAssessedProfileVersionId",
                              "createdAt",
                              "updatedAt"
                            ],
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "projectId": {
                                "type": "string"
                              },
                              "postId": {
                                "type": "string"
                              },
                              "channelId": {
                                "type": "string"
                              },
                              "targetRevisionId": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "deliveryMode": {
                                "enum": [
                                  "manual",
                                  "automatic"
                                ]
                              },
                              "reviewState": {
                                "enum": [
                                  "compatible",
                                  "review_required"
                                ]
                              },
                              "state": {
                                "enum": [
                                  "draft",
                                  "scheduled",
                                  "ready",
                                  "publishing",
                                  "published",
                                  "failed",
                                  "ambiguous",
                                  "cancelled"
                                ]
                              },
                              "scheduledAt": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "publishedAt": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "externalId": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "externalUrl": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "errorMessage": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "createdByActorId": {
                                "type": "string"
                              },
                              "scheduledByActorId": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "stateChangedByActorId": {
                                "type": "string"
                              },
                              "publishedByActorId": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "lastAssessedProfileVersionId": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "createdAt": {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              },
                              "updatedAt": {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              }
                            }
                          },
                          {
                            "type": "object",
                            "required": [
                              "profileAssessmentIssues"
                            ],
                            "properties": {
                              "profileAssessmentIssues": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "patternProperties": {
                                    "^.*$": {}
                                  }
                                }
                              }
                            }
                          }
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Response for status 422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/publication-composer-draft": {
      "get": {
        "operationId": "getPublicationComposerDraft",
        "summary": "Read the current durable recovery point for a new publication",
        "tags": [
          "Publications"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "draft"
                  ],
                  "properties": {
                    "draft": {
                      "anyOf": [
                        {
                          "type": "object",
                          "required": [
                            "id",
                            "projectId",
                            "content",
                            "revision",
                            "createdAt",
                            "updatedAt"
                          ],
                          "properties": {
                            "id": {
                              "type": "string",
                              "minLength": 1
                            },
                            "projectId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "content": {
                              "type": "object",
                              "required": [
                                "postTitle",
                                "postContent",
                                "sourceMedia",
                                "publicationTargets",
                                "publicationTagIds",
                                "defaultDeliveryMode",
                                "defaultScheduledAt",
                                "customizedTargetIds",
                                "customizedContentTargetIds",
                                "activePublicationTabId"
                              ],
                              "properties": {
                                "postTitle": {
                                  "type": "string"
                                },
                                "postContent": {
                                  "type": "string"
                                },
                                "sourceMedia": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "required": [
                                      "assetId"
                                    ],
                                    "properties": {
                                      "assetId": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "accessibilityText": {
                                        "type": "string"
                                      }
                                    }
                                  }
                                },
                                "publicationTargets": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "required": [
                                      "id",
                                      "channelId",
                                      "content",
                                      "deliveryMode",
                                      "scheduledAt"
                                    ],
                                    "properties": {
                                      "id": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "channelId": {
                                        "type": "string"
                                      },
                                      "content": {
                                        "type": "string"
                                      },
                                      "deliveryMode": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "const": "manual"
                                          },
                                          {
                                            "type": "string",
                                            "const": "automatic"
                                          }
                                        ]
                                      },
                                      "scheduledAt": {
                                        "type": "string"
                                      }
                                    }
                                  }
                                },
                                "publicationTagIds": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "defaultDeliveryMode": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "const": "manual"
                                    },
                                    {
                                      "type": "string",
                                      "const": "automatic"
                                    }
                                  ]
                                },
                                "defaultScheduledAt": {
                                  "type": "string"
                                },
                                "customizedTargetIds": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "customizedContentTargetIds": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "activePublicationTabId": {
                                  "type": "string"
                                },
                                "activeContentScopeId": {
                                  "type": "string"
                                }
                              }
                            },
                            "revision": {
                              "type": "integer",
                              "minimum": 1
                            },
                            "createdAt": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "updatedAt": {
                              "type": "integer",
                              "minimum": 0
                            }
                          }
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "savePublicationComposerDraft",
        "summary": "Persist the new-publication composer recovery point",
        "tags": [
          "Publications"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "expectedRevision",
                  "content"
                ],
                "properties": {
                  "expectedRevision": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "content": {
                    "type": "object",
                    "required": [
                      "postTitle",
                      "postContent",
                      "sourceMedia",
                      "publicationTargets",
                      "publicationTagIds",
                      "defaultDeliveryMode",
                      "defaultScheduledAt",
                      "customizedTargetIds",
                      "customizedContentTargetIds",
                      "activePublicationTabId"
                    ],
                    "properties": {
                      "postTitle": {
                        "type": "string"
                      },
                      "postContent": {
                        "type": "string"
                      },
                      "sourceMedia": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "assetId"
                          ],
                          "properties": {
                            "assetId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "accessibilityText": {
                              "type": "string"
                            }
                          }
                        }
                      },
                      "publicationTargets": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "id",
                            "channelId",
                            "content",
                            "deliveryMode",
                            "scheduledAt"
                          ],
                          "properties": {
                            "id": {
                              "type": "string",
                              "minLength": 1
                            },
                            "channelId": {
                              "type": "string"
                            },
                            "content": {
                              "type": "string"
                            },
                            "deliveryMode": {
                              "type": "string",
                              "enum": [
                                "manual",
                                "automatic"
                              ]
                            },
                            "scheduledAt": {
                              "type": "string"
                            }
                          }
                        }
                      },
                      "publicationTagIds": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "defaultDeliveryMode": {
                        "type": "string",
                        "enum": [
                          "manual",
                          "automatic"
                        ]
                      },
                      "defaultScheduledAt": {
                        "type": "string"
                      },
                      "customizedTargetIds": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "customizedContentTargetIds": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "activePublicationTabId": {
                        "type": "string"
                      },
                      "activeContentScopeId": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "expectedRevision",
                  "content"
                ],
                "properties": {
                  "expectedRevision": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "content": {
                    "type": "object",
                    "required": [
                      "postTitle",
                      "postContent",
                      "sourceMedia",
                      "publicationTargets",
                      "publicationTagIds",
                      "defaultDeliveryMode",
                      "defaultScheduledAt",
                      "customizedTargetIds",
                      "customizedContentTargetIds",
                      "activePublicationTabId"
                    ],
                    "properties": {
                      "postTitle": {
                        "type": "string"
                      },
                      "postContent": {
                        "type": "string"
                      },
                      "sourceMedia": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "assetId"
                          ],
                          "properties": {
                            "assetId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "accessibilityText": {
                              "type": "string"
                            }
                          }
                        }
                      },
                      "publicationTargets": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "id",
                            "channelId",
                            "content",
                            "deliveryMode",
                            "scheduledAt"
                          ],
                          "properties": {
                            "id": {
                              "type": "string",
                              "minLength": 1
                            },
                            "channelId": {
                              "type": "string"
                            },
                            "content": {
                              "type": "string"
                            },
                            "deliveryMode": {
                              "type": "string",
                              "enum": [
                                "manual",
                                "automatic"
                              ]
                            },
                            "scheduledAt": {
                              "type": "string"
                            }
                          }
                        }
                      },
                      "publicationTagIds": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "defaultDeliveryMode": {
                        "type": "string",
                        "enum": [
                          "manual",
                          "automatic"
                        ]
                      },
                      "defaultScheduledAt": {
                        "type": "string"
                      },
                      "customizedTargetIds": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "customizedContentTargetIds": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "activePublicationTabId": {
                        "type": "string"
                      },
                      "activeContentScopeId": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "expectedRevision",
                  "content"
                ],
                "properties": {
                  "expectedRevision": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "content": {
                    "type": "object",
                    "required": [
                      "postTitle",
                      "postContent",
                      "sourceMedia",
                      "publicationTargets",
                      "publicationTagIds",
                      "defaultDeliveryMode",
                      "defaultScheduledAt",
                      "customizedTargetIds",
                      "customizedContentTargetIds",
                      "activePublicationTabId"
                    ],
                    "properties": {
                      "postTitle": {
                        "type": "string"
                      },
                      "postContent": {
                        "type": "string"
                      },
                      "sourceMedia": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "assetId"
                          ],
                          "properties": {
                            "assetId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "accessibilityText": {
                              "type": "string"
                            }
                          }
                        }
                      },
                      "publicationTargets": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "id",
                            "channelId",
                            "content",
                            "deliveryMode",
                            "scheduledAt"
                          ],
                          "properties": {
                            "id": {
                              "type": "string",
                              "minLength": 1
                            },
                            "channelId": {
                              "type": "string"
                            },
                            "content": {
                              "type": "string"
                            },
                            "deliveryMode": {
                              "type": "string",
                              "enum": [
                                "manual",
                                "automatic"
                              ]
                            },
                            "scheduledAt": {
                              "type": "string"
                            }
                          }
                        }
                      },
                      "publicationTagIds": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "defaultDeliveryMode": {
                        "type": "string",
                        "enum": [
                          "manual",
                          "automatic"
                        ]
                      },
                      "defaultScheduledAt": {
                        "type": "string"
                      },
                      "customizedTargetIds": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "customizedContentTargetIds": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "activePublicationTabId": {
                        "type": "string"
                      },
                      "activeContentScopeId": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "draft"
                  ],
                  "properties": {
                    "draft": {
                      "type": "object",
                      "required": [
                        "id",
                        "projectId",
                        "content",
                        "revision",
                        "createdAt",
                        "updatedAt"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1
                        },
                        "projectId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "content": {
                          "type": "object",
                          "required": [
                            "postTitle",
                            "postContent",
                            "sourceMedia",
                            "publicationTargets",
                            "publicationTagIds",
                            "defaultDeliveryMode",
                            "defaultScheduledAt",
                            "customizedTargetIds",
                            "customizedContentTargetIds",
                            "activePublicationTabId"
                          ],
                          "properties": {
                            "postTitle": {
                              "type": "string"
                            },
                            "postContent": {
                              "type": "string"
                            },
                            "sourceMedia": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "required": [
                                  "assetId"
                                ],
                                "properties": {
                                  "assetId": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "accessibilityText": {
                                    "type": "string"
                                  }
                                }
                              }
                            },
                            "publicationTargets": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "required": [
                                  "id",
                                  "channelId",
                                  "content",
                                  "deliveryMode",
                                  "scheduledAt"
                                ],
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "channelId": {
                                    "type": "string"
                                  },
                                  "content": {
                                    "type": "string"
                                  },
                                  "deliveryMode": {
                                    "type": "string",
                                    "enum": [
                                      "manual",
                                      "automatic"
                                    ]
                                  },
                                  "scheduledAt": {
                                    "type": "string"
                                  }
                                }
                              }
                            },
                            "publicationTagIds": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "defaultDeliveryMode": {
                              "type": "string",
                              "enum": [
                                "manual",
                                "automatic"
                              ]
                            },
                            "defaultScheduledAt": {
                              "type": "string"
                            },
                            "customizedTargetIds": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "customizedContentTargetIds": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "activePublicationTabId": {
                              "type": "string"
                            },
                            "activeContentScopeId": {
                              "type": "string"
                            }
                          }
                        },
                        "revision": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Response for status 422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deletePublicationComposerDraft",
        "summary": "Discard the new-publication composer recovery point",
        "tags": [
          "Publications"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "deleted"
                  ],
                  "properties": {
                    "deleted": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/publications": {
      "get": {
        "operationId": "listPublicationSummaries",
        "summary": "List recent publications and draft status",
        "tags": [
          "Publications"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "tagIds",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1
                  },
                  "maxItems": 20
                }
              ]
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "draft",
                "scheduled"
              ]
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "queue",
                "updated_desc",
                "updated_asc",
                "created_desc",
                "created_asc",
                "scheduled_desc",
                "scheduled_asc"
              ]
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "publications",
                    "nextCursor",
                    "summary"
                  ],
                  "properties": {
                    "publications": {
                      "type": "array",
                      "items": {
                        "allOf": [
                          {
                            "allOf": [
                              {
                                "type": "object",
                                "required": [
                                  "id",
                                  "projectId",
                                  "postId",
                                  "channelId",
                                  "targetRevisionId",
                                  "deliveryMode",
                                  "reviewState",
                                  "state",
                                  "scheduledAt",
                                  "publishedAt",
                                  "externalId",
                                  "externalUrl",
                                  "errorMessage",
                                  "createdByActorId",
                                  "scheduledByActorId",
                                  "stateChangedByActorId",
                                  "publishedByActorId",
                                  "lastAssessedProfileVersionId",
                                  "createdAt",
                                  "updatedAt"
                                ],
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "projectId": {
                                    "type": "string"
                                  },
                                  "postId": {
                                    "type": "string"
                                  },
                                  "channelId": {
                                    "type": "string"
                                  },
                                  "targetRevisionId": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "deliveryMode": {
                                    "enum": [
                                      "manual",
                                      "automatic"
                                    ]
                                  },
                                  "reviewState": {
                                    "enum": [
                                      "compatible",
                                      "review_required"
                                    ]
                                  },
                                  "state": {
                                    "enum": [
                                      "draft",
                                      "scheduled",
                                      "ready",
                                      "publishing",
                                      "published",
                                      "failed",
                                      "ambiguous",
                                      "cancelled"
                                    ]
                                  },
                                  "scheduledAt": {
                                    "anyOf": [
                                      {
                                        "type": "integer",
                                        "minimum": -9007199254740991,
                                        "maximum": 9007199254740991
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "publishedAt": {
                                    "anyOf": [
                                      {
                                        "type": "integer",
                                        "minimum": -9007199254740991,
                                        "maximum": 9007199254740991
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "externalId": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "externalUrl": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "errorMessage": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "createdByActorId": {
                                    "type": "string"
                                  },
                                  "scheduledByActorId": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "stateChangedByActorId": {
                                    "type": "string"
                                  },
                                  "publishedByActorId": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "lastAssessedProfileVersionId": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "createdAt": {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991
                                  },
                                  "updatedAt": {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "required": [
                                  "profileAssessmentIssues"
                                ],
                                "properties": {
                                  "profileAssessmentIssues": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "patternProperties": {
                                        "^.*$": {}
                                      }
                                    }
                                  }
                                }
                              }
                            ]
                          },
                          {
                            "type": "object",
                            "required": [
                              "postTitle",
                              "sourceExcerpt",
                              "mediaAssetIds",
                              "mediaCount",
                              "lastEditedAt",
                              "channelName",
                              "draftRevision",
                              "draftReviewState",
                              "draftDiffersFromTarget",
                              "tagIds"
                            ],
                            "properties": {
                              "postTitle": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "sourceExcerpt": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "mediaAssetIds": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "maxItems": 3
                              },
                              "mediaCount": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "lastEditedAt": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "channelName": {
                                "type": "string"
                              },
                              "draftRevision": {
                                "type": "integer",
                                "minimum": 1
                              },
                              "draftReviewState": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "const": "compatible"
                                  },
                                  {
                                    "type": "string",
                                    "const": "review_required"
                                  }
                                ]
                              },
                              "draftDiffersFromTarget": {
                                "type": "boolean"
                              },
                              "tagIds": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1
                                }
                              }
                            }
                          }
                        ]
                      }
                    },
                    "nextCursor": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 1024
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "summary": {
                      "type": "object",
                      "required": [
                        "total",
                        "manual",
                        "automatic",
                        "scheduled",
                        "draft"
                      ],
                      "properties": {
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "manual": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "automatic": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "scheduled": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "draft": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Response for status 422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/publications/due": {
      "get": {
        "operationId": "listDueManualPublications",
        "summary": "List due publications requiring a manual action",
        "tags": [
          "Publications"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "publications"
                  ],
                  "properties": {
                    "publications": {
                      "type": "array",
                      "items": {
                        "allOf": [
                          {
                            "allOf": [
                              {
                                "type": "object",
                                "required": [
                                  "id",
                                  "projectId",
                                  "postId",
                                  "channelId",
                                  "targetRevisionId",
                                  "deliveryMode",
                                  "reviewState",
                                  "state",
                                  "scheduledAt",
                                  "publishedAt",
                                  "externalId",
                                  "externalUrl",
                                  "errorMessage",
                                  "createdByActorId",
                                  "scheduledByActorId",
                                  "stateChangedByActorId",
                                  "publishedByActorId",
                                  "lastAssessedProfileVersionId",
                                  "createdAt",
                                  "updatedAt"
                                ],
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "projectId": {
                                    "type": "string"
                                  },
                                  "postId": {
                                    "type": "string"
                                  },
                                  "channelId": {
                                    "type": "string"
                                  },
                                  "targetRevisionId": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "deliveryMode": {
                                    "enum": [
                                      "manual",
                                      "automatic"
                                    ]
                                  },
                                  "reviewState": {
                                    "enum": [
                                      "compatible",
                                      "review_required"
                                    ]
                                  },
                                  "state": {
                                    "enum": [
                                      "draft",
                                      "scheduled",
                                      "ready",
                                      "publishing",
                                      "published",
                                      "failed",
                                      "ambiguous",
                                      "cancelled"
                                    ]
                                  },
                                  "scheduledAt": {
                                    "anyOf": [
                                      {
                                        "type": "integer",
                                        "minimum": -9007199254740991,
                                        "maximum": 9007199254740991
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "publishedAt": {
                                    "anyOf": [
                                      {
                                        "type": "integer",
                                        "minimum": -9007199254740991,
                                        "maximum": 9007199254740991
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "externalId": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "externalUrl": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "errorMessage": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "createdByActorId": {
                                    "type": "string"
                                  },
                                  "scheduledByActorId": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "stateChangedByActorId": {
                                    "type": "string"
                                  },
                                  "publishedByActorId": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "lastAssessedProfileVersionId": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "createdAt": {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991
                                  },
                                  "updatedAt": {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "required": [
                                  "profileAssessmentIssues"
                                ],
                                "properties": {
                                  "profileAssessmentIssues": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "patternProperties": {
                                        "^.*$": {}
                                      }
                                    }
                                  }
                                }
                              }
                            ]
                          },
                          {
                            "type": "object",
                            "required": [
                              "postTitle",
                              "channelName",
                              "targetContent"
                            ],
                            "properties": {
                              "postTitle": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "channelName": {
                                "type": "string"
                              },
                              "targetContent": {
                                "type": "object",
                                "patternProperties": {
                                  "^.*$": {}
                                }
                              }
                            }
                          }
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/publications/approval-requests": {
      "get": {
        "operationId": "listPublicationApprovalRequests",
        "summary": "List publications awaiting human approval",
        "tags": [
          "Publications"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "requests"
                  ],
                  "properties": {
                    "requests": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "projectId",
                          "publicationId",
                          "targetRevisionId",
                          "draftRevision",
                          "proposedScheduledAt",
                          "state",
                          "requestedByActorId",
                          "decidedByActorId",
                          "decidedAt",
                          "scheduledAt",
                          "rejectionReason",
                          "createdAt",
                          "updatedAt"
                        ],
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "projectId": {
                            "type": "string"
                          },
                          "publicationId": {
                            "type": "string"
                          },
                          "targetRevisionId": {
                            "type": "string"
                          },
                          "draftRevision": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "proposedScheduledAt": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "state": {
                            "enum": [
                              "pending",
                              "approved",
                              "rejected",
                              "superseded"
                            ]
                          },
                          "requestedByActorId": {
                            "type": "string"
                          },
                          "decidedByActorId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "decidedAt": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "scheduledAt": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "rejectionReason": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "updatedAt": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/publications/schedule": {
      "patch": {
        "operationId": "reschedulePublications",
        "summary": "Reschedule a group of queued publications",
        "tags": [
          "Publications"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "publicationIds",
                  "scheduledAt"
                ],
                "properties": {
                  "publicationIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    },
                    "minItems": 1,
                    "maxItems": 100,
                    "uniqueItems": true
                  },
                  "scheduledAt": {
                    "type": "integer",
                    "minimum": 0
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "publicationIds",
                  "scheduledAt"
                ],
                "properties": {
                  "publicationIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    },
                    "minItems": 1,
                    "maxItems": 100,
                    "uniqueItems": true
                  },
                  "scheduledAt": {
                    "type": "integer",
                    "minimum": 0
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "publicationIds",
                  "scheduledAt"
                ],
                "properties": {
                  "publicationIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    },
                    "minItems": 1,
                    "maxItems": 100,
                    "uniqueItems": true
                  },
                  "scheduledAt": {
                    "type": "integer",
                    "minimum": 0
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "publications"
                  ],
                  "properties": {
                    "publications": {
                      "type": "array",
                      "items": {
                        "allOf": [
                          {
                            "type": "object",
                            "required": [
                              "id",
                              "projectId",
                              "postId",
                              "channelId",
                              "targetRevisionId",
                              "deliveryMode",
                              "reviewState",
                              "state",
                              "scheduledAt",
                              "publishedAt",
                              "externalId",
                              "externalUrl",
                              "errorMessage",
                              "createdByActorId",
                              "scheduledByActorId",
                              "stateChangedByActorId",
                              "publishedByActorId",
                              "lastAssessedProfileVersionId",
                              "createdAt",
                              "updatedAt"
                            ],
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "projectId": {
                                "type": "string"
                              },
                              "postId": {
                                "type": "string"
                              },
                              "channelId": {
                                "type": "string"
                              },
                              "targetRevisionId": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "deliveryMode": {
                                "enum": [
                                  "manual",
                                  "automatic"
                                ]
                              },
                              "reviewState": {
                                "enum": [
                                  "compatible",
                                  "review_required"
                                ]
                              },
                              "state": {
                                "enum": [
                                  "draft",
                                  "scheduled",
                                  "ready",
                                  "publishing",
                                  "published",
                                  "failed",
                                  "ambiguous",
                                  "cancelled"
                                ]
                              },
                              "scheduledAt": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "publishedAt": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "externalId": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "externalUrl": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "errorMessage": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "createdByActorId": {
                                "type": "string"
                              },
                              "scheduledByActorId": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "stateChangedByActorId": {
                                "type": "string"
                              },
                              "publishedByActorId": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "lastAssessedProfileVersionId": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "createdAt": {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              },
                              "updatedAt": {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              }
                            }
                          },
                          {
                            "type": "object",
                            "required": [
                              "profileAssessmentIssues"
                            ],
                            "properties": {
                              "profileAssessmentIssues": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "patternProperties": {
                                    "^.*$": {}
                                  }
                                }
                              }
                            }
                          }
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Response for status 422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/publications/cancel": {
      "patch": {
        "operationId": "cancelPublications",
        "summary": "Cancel a group of queued publications",
        "tags": [
          "Publications"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "publicationIds"
                ],
                "properties": {
                  "publicationIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    },
                    "minItems": 1,
                    "maxItems": 100,
                    "uniqueItems": true
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "publicationIds"
                ],
                "properties": {
                  "publicationIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    },
                    "minItems": 1,
                    "maxItems": 100,
                    "uniqueItems": true
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "publicationIds"
                ],
                "properties": {
                  "publicationIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    },
                    "minItems": 1,
                    "maxItems": 100,
                    "uniqueItems": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "publications"
                  ],
                  "properties": {
                    "publications": {
                      "type": "array",
                      "items": {
                        "allOf": [
                          {
                            "type": "object",
                            "required": [
                              "id",
                              "projectId",
                              "postId",
                              "channelId",
                              "targetRevisionId",
                              "deliveryMode",
                              "reviewState",
                              "state",
                              "scheduledAt",
                              "publishedAt",
                              "externalId",
                              "externalUrl",
                              "errorMessage",
                              "createdByActorId",
                              "scheduledByActorId",
                              "stateChangedByActorId",
                              "publishedByActorId",
                              "lastAssessedProfileVersionId",
                              "createdAt",
                              "updatedAt"
                            ],
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "projectId": {
                                "type": "string"
                              },
                              "postId": {
                                "type": "string"
                              },
                              "channelId": {
                                "type": "string"
                              },
                              "targetRevisionId": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "deliveryMode": {
                                "enum": [
                                  "manual",
                                  "automatic"
                                ]
                              },
                              "reviewState": {
                                "enum": [
                                  "compatible",
                                  "review_required"
                                ]
                              },
                              "state": {
                                "enum": [
                                  "draft",
                                  "scheduled",
                                  "ready",
                                  "publishing",
                                  "published",
                                  "failed",
                                  "ambiguous",
                                  "cancelled"
                                ]
                              },
                              "scheduledAt": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "publishedAt": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "externalId": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "externalUrl": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "errorMessage": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "createdByActorId": {
                                "type": "string"
                              },
                              "scheduledByActorId": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "stateChangedByActorId": {
                                "type": "string"
                              },
                              "publishedByActorId": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "lastAssessedProfileVersionId": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "createdAt": {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              },
                              "updatedAt": {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              }
                            }
                          },
                          {
                            "type": "object",
                            "required": [
                              "profileAssessmentIssues"
                            ],
                            "properties": {
                              "profileAssessmentIssues": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "patternProperties": {
                                    "^.*$": {}
                                  }
                                }
                              }
                            }
                          }
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Response for status 422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/publications/{publicationId}": {
      "delete": {
        "operationId": "deleteDraftPublication",
        "summary": "Delete a publication that is still a draft",
        "tags": [
          "Publications"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "publicationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "deleted",
                    "postDeleted"
                  ],
                  "properties": {
                    "deleted": {
                      "type": "boolean",
                      "const": true
                    },
                    "postDeleted": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/publications/{publicationId}/duplicate": {
      "post": {
        "operationId": "duplicateDraftPublication",
        "summary": "Create an independent copy of a draft publication",
        "tags": [
          "Publications"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "publicationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Response for status 201",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "post",
                    "publication"
                  ],
                  "properties": {
                    "post": {
                      "type": "object",
                      "required": [
                        "id",
                        "projectId",
                        "title",
                        "sourceContent",
                        "sourceRevision",
                        "createdByActorId",
                        "createdAt",
                        "updatedAt"
                      ],
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "projectId": {
                          "type": "string"
                        },
                        "title": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "sourceContent": {
                          "anyOf": [
                            {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            {
                              "type": "array",
                              "items": {}
                            },
                            {
                              "type": "object",
                              "patternProperties": {
                                "^(.*)$": {}
                              }
                            }
                          ]
                        },
                        "sourceRevision": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "createdByActorId": {
                          "type": "string"
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        }
                      }
                    },
                    "publication": {
                      "allOf": [
                        {
                          "type": "object",
                          "required": [
                            "id",
                            "projectId",
                            "postId",
                            "channelId",
                            "targetRevisionId",
                            "deliveryMode",
                            "reviewState",
                            "state",
                            "scheduledAt",
                            "publishedAt",
                            "externalId",
                            "externalUrl",
                            "errorMessage",
                            "createdByActorId",
                            "scheduledByActorId",
                            "stateChangedByActorId",
                            "publishedByActorId",
                            "lastAssessedProfileVersionId",
                            "createdAt",
                            "updatedAt"
                          ],
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "projectId": {
                              "type": "string"
                            },
                            "postId": {
                              "type": "string"
                            },
                            "channelId": {
                              "type": "string"
                            },
                            "targetRevisionId": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "deliveryMode": {
                              "enum": [
                                "manual",
                                "automatic"
                              ]
                            },
                            "reviewState": {
                              "enum": [
                                "compatible",
                                "review_required"
                              ]
                            },
                            "state": {
                              "enum": [
                                "draft",
                                "scheduled",
                                "ready",
                                "publishing",
                                "published",
                                "failed",
                                "ambiguous",
                                "cancelled"
                              ]
                            },
                            "scheduledAt": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "publishedAt": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "externalId": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "externalUrl": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "errorMessage": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "createdByActorId": {
                              "type": "string"
                            },
                            "scheduledByActorId": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "stateChangedByActorId": {
                              "type": "string"
                            },
                            "publishedByActorId": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "lastAssessedProfileVersionId": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "createdAt": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "updatedAt": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            }
                          }
                        },
                        {
                          "type": "object",
                          "required": [
                            "profileAssessmentIssues"
                          ],
                          "properties": {
                            "profileAssessmentIssues": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "patternProperties": {
                                  "^.*$": {}
                                }
                              }
                            }
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/publications/{publicationId}/approval-request": {
      "post": {
        "operationId": "submitPublicationForApproval",
        "summary": "Submit a proposed publication schedule for human approval",
        "tags": [
          "Publications"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "publicationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "expectedDraftRevision",
                  "proposedScheduledAt"
                ],
                "properties": {
                  "expectedDraftRevision": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "proposedScheduledAt": {
                    "type": "integer",
                    "minimum": 0
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "expectedDraftRevision",
                  "proposedScheduledAt"
                ],
                "properties": {
                  "expectedDraftRevision": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "proposedScheduledAt": {
                    "type": "integer",
                    "minimum": 0
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "expectedDraftRevision",
                  "proposedScheduledAt"
                ],
                "properties": {
                  "expectedDraftRevision": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "proposedScheduledAt": {
                    "type": "integer",
                    "minimum": 0
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Response for status 201",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request"
                  ],
                  "properties": {
                    "request": {
                      "type": "object",
                      "required": [
                        "id",
                        "projectId",
                        "publicationId",
                        "targetRevisionId",
                        "draftRevision",
                        "proposedScheduledAt",
                        "state",
                        "requestedByActorId",
                        "decidedByActorId",
                        "decidedAt",
                        "scheduledAt",
                        "rejectionReason",
                        "createdAt",
                        "updatedAt"
                      ],
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "projectId": {
                          "type": "string"
                        },
                        "publicationId": {
                          "type": "string"
                        },
                        "targetRevisionId": {
                          "type": "string"
                        },
                        "draftRevision": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "proposedScheduledAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "state": {
                          "enum": [
                            "pending",
                            "approved",
                            "rejected",
                            "superseded"
                          ]
                        },
                        "requestedByActorId": {
                          "type": "string"
                        },
                        "decidedByActorId": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "decidedAt": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "scheduledAt": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "rejectionReason": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Response for status 422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/publications/{publicationId}/approval-request/approve": {
      "post": {
        "operationId": "approvePublicationRequest",
        "summary": "Approve a publication and schedule the reviewed revision",
        "tags": [
          "Publications"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "publicationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "scheduledAt": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "publishNow": {
                    "type": "boolean"
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "scheduledAt": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "publishNow": {
                    "type": "boolean"
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "scheduledAt": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "publishNow": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "publication"
                  ],
                  "properties": {
                    "publication": {
                      "allOf": [
                        {
                          "type": "object",
                          "required": [
                            "id",
                            "projectId",
                            "postId",
                            "channelId",
                            "targetRevisionId",
                            "deliveryMode",
                            "reviewState",
                            "state",
                            "scheduledAt",
                            "publishedAt",
                            "externalId",
                            "externalUrl",
                            "errorMessage",
                            "createdByActorId",
                            "scheduledByActorId",
                            "stateChangedByActorId",
                            "publishedByActorId",
                            "lastAssessedProfileVersionId",
                            "createdAt",
                            "updatedAt"
                          ],
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "projectId": {
                              "type": "string"
                            },
                            "postId": {
                              "type": "string"
                            },
                            "channelId": {
                              "type": "string"
                            },
                            "targetRevisionId": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "deliveryMode": {
                              "enum": [
                                "manual",
                                "automatic"
                              ]
                            },
                            "reviewState": {
                              "enum": [
                                "compatible",
                                "review_required"
                              ]
                            },
                            "state": {
                              "enum": [
                                "draft",
                                "scheduled",
                                "ready",
                                "publishing",
                                "published",
                                "failed",
                                "ambiguous",
                                "cancelled"
                              ]
                            },
                            "scheduledAt": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "publishedAt": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "externalId": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "externalUrl": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "errorMessage": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "createdByActorId": {
                              "type": "string"
                            },
                            "scheduledByActorId": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "stateChangedByActorId": {
                              "type": "string"
                            },
                            "publishedByActorId": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "lastAssessedProfileVersionId": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "createdAt": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "updatedAt": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            }
                          }
                        },
                        {
                          "type": "object",
                          "required": [
                            "profileAssessmentIssues"
                          ],
                          "properties": {
                            "profileAssessmentIssues": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "patternProperties": {
                                  "^.*$": {}
                                }
                              }
                            }
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Response for status 422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/publications/{publicationId}/approval-request/reject": {
      "post": {
        "operationId": "rejectPublicationRequest",
        "summary": "Reject a publication approval request",
        "tags": [
          "Publications"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "publicationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "rejectionReason": {
                    "type": "string",
                    "maxLength": 500
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "rejectionReason": {
                    "type": "string",
                    "maxLength": 500
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "rejectionReason": {
                    "type": "string",
                    "maxLength": 500
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request"
                  ],
                  "properties": {
                    "request": {
                      "type": "object",
                      "required": [
                        "id",
                        "projectId",
                        "publicationId",
                        "targetRevisionId",
                        "draftRevision",
                        "proposedScheduledAt",
                        "state",
                        "requestedByActorId",
                        "decidedByActorId",
                        "decidedAt",
                        "scheduledAt",
                        "rejectionReason",
                        "createdAt",
                        "updatedAt"
                      ],
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "projectId": {
                          "type": "string"
                        },
                        "publicationId": {
                          "type": "string"
                        },
                        "targetRevisionId": {
                          "type": "string"
                        },
                        "draftRevision": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "proposedScheduledAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "state": {
                          "enum": [
                            "pending",
                            "approved",
                            "rejected",
                            "superseded"
                          ]
                        },
                        "requestedByActorId": {
                          "type": "string"
                        },
                        "decidedByActorId": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "decidedAt": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "scheduledAt": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "rejectionReason": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Response for status 422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/publications/{publicationId}/editor": {
      "get": {
        "operationId": "getPublicationEditor",
        "summary": "Read publication source, draft, profile, and selected target",
        "tags": [
          "Publications"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "publicationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "editor"
                  ],
                  "properties": {
                    "editor": {
                      "type": "object",
                      "required": [
                        "publication",
                        "post",
                        "channel",
                        "profile",
                        "draft",
                        "selectedTarget"
                      ],
                      "properties": {
                        "publication": {
                          "allOf": [
                            {
                              "type": "object",
                              "required": [
                                "id",
                                "projectId",
                                "postId",
                                "channelId",
                                "targetRevisionId",
                                "deliveryMode",
                                "reviewState",
                                "state",
                                "scheduledAt",
                                "publishedAt",
                                "externalId",
                                "externalUrl",
                                "errorMessage",
                                "createdByActorId",
                                "scheduledByActorId",
                                "stateChangedByActorId",
                                "publishedByActorId",
                                "lastAssessedProfileVersionId",
                                "createdAt",
                                "updatedAt"
                              ],
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "projectId": {
                                  "type": "string"
                                },
                                "postId": {
                                  "type": "string"
                                },
                                "channelId": {
                                  "type": "string"
                                },
                                "targetRevisionId": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "deliveryMode": {
                                  "enum": [
                                    "manual",
                                    "automatic"
                                  ]
                                },
                                "reviewState": {
                                  "enum": [
                                    "compatible",
                                    "review_required"
                                  ]
                                },
                                "state": {
                                  "enum": [
                                    "draft",
                                    "scheduled",
                                    "ready",
                                    "publishing",
                                    "published",
                                    "failed",
                                    "ambiguous",
                                    "cancelled"
                                  ]
                                },
                                "scheduledAt": {
                                  "anyOf": [
                                    {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "publishedAt": {
                                  "anyOf": [
                                    {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "externalId": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "externalUrl": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "errorMessage": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "createdByActorId": {
                                  "type": "string"
                                },
                                "scheduledByActorId": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "stateChangedByActorId": {
                                  "type": "string"
                                },
                                "publishedByActorId": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "lastAssessedProfileVersionId": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "createdAt": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                "updatedAt": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                }
                              }
                            },
                            {
                              "type": "object",
                              "required": [
                                "profileAssessmentIssues"
                              ],
                              "properties": {
                                "profileAssessmentIssues": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "patternProperties": {
                                      "^.*$": {}
                                    }
                                  }
                                }
                              }
                            }
                          ]
                        },
                        "post": {
                          "type": "object",
                          "required": [
                            "id",
                            "projectId",
                            "title",
                            "sourceContent",
                            "sourceRevision",
                            "createdByActorId",
                            "createdAt",
                            "updatedAt"
                          ],
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "projectId": {
                              "type": "string"
                            },
                            "title": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "sourceContent": {
                              "anyOf": [
                                {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "boolean"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                {
                                  "type": "array",
                                  "items": {}
                                },
                                {
                                  "type": "object",
                                  "patternProperties": {
                                    "^(.*)$": {}
                                  }
                                }
                              ]
                            },
                            "sourceRevision": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "createdByActorId": {
                              "type": "string"
                            },
                            "createdAt": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "updatedAt": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            }
                          }
                        },
                        "channel": {
                          "allOf": [
                            {
                              "type": "object",
                              "required": [
                                "id",
                                "projectId",
                                "name",
                                "profileVersionId",
                                "state",
                                "archivedAt",
                                "revision",
                                "createdAt",
                                "updatedAt"
                              ],
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "projectId": {
                                  "type": "string"
                                },
                                "name": {
                                  "type": "string"
                                },
                                "profileVersionId": {
                                  "type": "string"
                                },
                                "state": {
                                  "enum": [
                                    "active",
                                    "archived"
                                  ]
                                },
                                "archivedAt": {
                                  "anyOf": [
                                    {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "revision": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                "createdAt": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                "updatedAt": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                }
                              }
                            },
                            {
                              "type": "object",
                              "required": [
                                "profileId"
                              ],
                              "properties": {
                                "profileId": {
                                  "type": "string",
                                  "minLength": 1
                                }
                              }
                            }
                          ]
                        },
                        "profile": {
                          "type": "object",
                          "required": [
                            "id",
                            "projectId",
                            "channelId",
                            "profileId",
                            "version",
                            "origin",
                            "state",
                            "revision",
                            "profile",
                            "createdByActorId",
                            "createdAt",
                            "updatedAt"
                          ],
                          "properties": {
                            "id": {
                              "type": "string",
                              "minLength": 1
                            },
                            "projectId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "channelId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "profileId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "version": {
                              "type": "integer",
                              "minimum": 1
                            },
                            "origin": {
                              "type": "string",
                              "enum": [
                                "built_in",
                                "custom"
                              ]
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "draft",
                                "active",
                                "superseded",
                                "disabled"
                              ]
                            },
                            "revision": {
                              "type": "integer",
                              "minimum": 1
                            },
                            "profile": {
                              "type": "object",
                              "patternProperties": {
                                "^.*$": {}
                              }
                            },
                            "createdByActorId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "createdAt": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "updatedAt": {
                              "type": "integer",
                              "minimum": 0
                            }
                          }
                        },
                        "draft": {
                          "type": "object",
                          "required": [
                            "id",
                            "projectId",
                            "publicationId",
                            "profileVersionId",
                            "sourceRevision",
                            "baseSourceContent",
                            "content",
                            "reviewState",
                            "validationIssues",
                            "lastAssessedProfileVersionId",
                            "revision",
                            "updatedByActorId",
                            "createdAt",
                            "updatedAt"
                          ],
                          "properties": {
                            "id": {
                              "type": "string",
                              "minLength": 1
                            },
                            "projectId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "publicationId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "profileVersionId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "sourceRevision": {
                              "type": "integer",
                              "minimum": 1
                            },
                            "baseSourceContent": {
                              "type": "object",
                              "required": [
                                "media"
                              ],
                              "properties": {
                                "body": {
                                  "type": "object",
                                  "required": [
                                    "text",
                                    "format"
                                  ],
                                  "properties": {
                                    "text": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 1000000
                                    },
                                    "format": {
                                      "type": "string",
                                      "enum": [
                                        "plain_text",
                                        "markdown"
                                      ]
                                    }
                                  },
                                  "additionalProperties": false
                                },
                                "headline": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 10000
                                },
                                "language": {
                                  "type": "string",
                                  "minLength": 2,
                                  "maxLength": 35
                                },
                                "media": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "required": [
                                      "assetId"
                                    ],
                                    "properties": {
                                      "assetId": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 255
                                      },
                                      "accessibilityText": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 10000
                                      }
                                    },
                                    "additionalProperties": false
                                  },
                                  "maxItems": 256
                                }
                              },
                              "additionalProperties": false
                            },
                            "content": {
                              "type": "object",
                              "patternProperties": {
                                "^.*$": {}
                              }
                            },
                            "reviewState": {
                              "type": "string",
                              "enum": [
                                "compatible",
                                "review_required"
                              ]
                            },
                            "validationIssues": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "patternProperties": {
                                  "^.*$": {}
                                }
                              }
                            },
                            "lastAssessedProfileVersionId": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "revision": {
                              "type": "integer",
                              "minimum": 1
                            },
                            "updatedByActorId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "createdAt": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "updatedAt": {
                              "type": "integer",
                              "minimum": 0
                            }
                          }
                        },
                        "adoptionCount": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "selectedTargetProfile": {
                          "anyOf": [
                            {
                              "type": "object",
                              "required": [
                                "id",
                                "projectId",
                                "channelId",
                                "profileId",
                                "version",
                                "origin",
                                "state",
                                "revision",
                                "profile",
                                "createdByActorId",
                                "createdAt",
                                "updatedAt"
                              ],
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "projectId": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "channelId": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "profileId": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "version": {
                                  "type": "integer",
                                  "minimum": 1
                                },
                                "origin": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "const": "built_in"
                                    },
                                    {
                                      "type": "string",
                                      "const": "custom"
                                    }
                                  ]
                                },
                                "state": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "const": "draft"
                                    },
                                    {
                                      "type": "string",
                                      "const": "active"
                                    },
                                    {
                                      "type": "string",
                                      "const": "superseded"
                                    },
                                    {
                                      "type": "string",
                                      "const": "disabled"
                                    }
                                  ]
                                },
                                "revision": {
                                  "type": "integer",
                                  "minimum": 1
                                },
                                "profile": {
                                  "type": "object",
                                  "patternProperties": {
                                    "^.*$": {}
                                  }
                                },
                                "createdByActorId": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "createdAt": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "updatedAt": {
                                  "type": "integer",
                                  "minimum": 0
                                }
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "selectedTarget": {
                          "anyOf": [
                            {
                              "type": "object",
                              "required": [
                                "id",
                                "projectId",
                                "publicationId",
                                "sequence",
                                "profileVersionId",
                                "sourceRevision",
                                "deliveryMode",
                                "mediaReferenceCount",
                                "content",
                                "contentHash",
                                "profileHash",
                                "schemaHash",
                                "validationIssues",
                                "createdByActorId",
                                "createdAt"
                              ],
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "projectId": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "publicationId": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "sequence": {
                                  "type": "integer",
                                  "minimum": 1
                                },
                                "profileVersionId": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "sourceRevision": {
                                  "type": "integer",
                                  "minimum": 1
                                },
                                "deliveryMode": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "const": "manual"
                                    },
                                    {
                                      "type": "string",
                                      "const": "automatic"
                                    }
                                  ]
                                },
                                "mediaReferenceCount": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "content": {
                                  "type": "object",
                                  "patternProperties": {
                                    "^.*$": {}
                                  }
                                },
                                "contentHash": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "profileHash": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "schemaHash": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "validationIssues": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "patternProperties": {
                                      "^.*$": {}
                                    }
                                  }
                                },
                                "createdByActorId": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "createdAt": {
                                  "type": "integer",
                                  "minimum": 0
                                }
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/publications/{publicationId}/draft": {
      "patch": {
        "operationId": "savePublicationDraft",
        "summary": "Persist a publication draft without changing its selected target",
        "tags": [
          "Publications"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "publicationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "expectedRevision"
                ],
                "properties": {
                  "expectedRevision": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "sourceContent": {
                    "type": "object",
                    "required": [
                      "media"
                    ],
                    "properties": {
                      "body": {
                        "type": "object",
                        "required": [
                          "text",
                          "format"
                        ],
                        "properties": {
                          "text": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 1000000
                          },
                          "format": {
                            "type": "string",
                            "enum": [
                              "plain_text",
                              "markdown"
                            ]
                          }
                        },
                        "additionalProperties": false
                      },
                      "headline": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 10000
                      },
                      "language": {
                        "type": "string",
                        "minLength": 2,
                        "maxLength": 35
                      },
                      "media": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "assetId"
                          ],
                          "properties": {
                            "assetId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 255
                            },
                            "accessibilityText": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 10000
                            }
                          },
                          "additionalProperties": false
                        },
                        "maxItems": 256
                      }
                    },
                    "additionalProperties": false
                  },
                  "targetContent": {
                    "type": "object",
                    "patternProperties": {
                      "^.*$": {}
                    }
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "expectedRevision"
                ],
                "properties": {
                  "expectedRevision": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "sourceContent": {
                    "type": "object",
                    "required": [
                      "media"
                    ],
                    "properties": {
                      "body": {
                        "type": "object",
                        "required": [
                          "text",
                          "format"
                        ],
                        "properties": {
                          "text": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 1000000
                          },
                          "format": {
                            "type": "string",
                            "enum": [
                              "plain_text",
                              "markdown"
                            ]
                          }
                        },
                        "additionalProperties": false
                      },
                      "headline": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 10000
                      },
                      "language": {
                        "type": "string",
                        "minLength": 2,
                        "maxLength": 35
                      },
                      "media": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "assetId"
                          ],
                          "properties": {
                            "assetId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 255
                            },
                            "accessibilityText": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 10000
                            }
                          },
                          "additionalProperties": false
                        },
                        "maxItems": 256
                      }
                    },
                    "additionalProperties": false
                  },
                  "targetContent": {
                    "type": "object",
                    "patternProperties": {
                      "^.*$": {}
                    }
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "expectedRevision"
                ],
                "properties": {
                  "expectedRevision": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "sourceContent": {
                    "type": "object",
                    "required": [
                      "media"
                    ],
                    "properties": {
                      "body": {
                        "type": "object",
                        "required": [
                          "text",
                          "format"
                        ],
                        "properties": {
                          "text": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 1000000
                          },
                          "format": {
                            "type": "string",
                            "enum": [
                              "plain_text",
                              "markdown"
                            ]
                          }
                        },
                        "additionalProperties": false
                      },
                      "headline": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 10000
                      },
                      "language": {
                        "type": "string",
                        "minLength": 2,
                        "maxLength": 35
                      },
                      "media": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "assetId"
                          ],
                          "properties": {
                            "assetId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 255
                            },
                            "accessibilityText": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 10000
                            }
                          },
                          "additionalProperties": false
                        },
                        "maxItems": 256
                      }
                    },
                    "additionalProperties": false
                  },
                  "targetContent": {
                    "type": "object",
                    "patternProperties": {
                      "^.*$": {}
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "editor"
                  ],
                  "properties": {
                    "editor": {
                      "type": "object",
                      "required": [
                        "publication",
                        "post",
                        "channel",
                        "profile",
                        "draft",
                        "selectedTarget"
                      ],
                      "properties": {
                        "publication": {
                          "allOf": [
                            {
                              "type": "object",
                              "required": [
                                "id",
                                "projectId",
                                "postId",
                                "channelId",
                                "targetRevisionId",
                                "deliveryMode",
                                "reviewState",
                                "state",
                                "scheduledAt",
                                "publishedAt",
                                "externalId",
                                "externalUrl",
                                "errorMessage",
                                "createdByActorId",
                                "scheduledByActorId",
                                "stateChangedByActorId",
                                "publishedByActorId",
                                "lastAssessedProfileVersionId",
                                "createdAt",
                                "updatedAt"
                              ],
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "projectId": {
                                  "type": "string"
                                },
                                "postId": {
                                  "type": "string"
                                },
                                "channelId": {
                                  "type": "string"
                                },
                                "targetRevisionId": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "deliveryMode": {
                                  "enum": [
                                    "manual",
                                    "automatic"
                                  ]
                                },
                                "reviewState": {
                                  "enum": [
                                    "compatible",
                                    "review_required"
                                  ]
                                },
                                "state": {
                                  "enum": [
                                    "draft",
                                    "scheduled",
                                    "ready",
                                    "publishing",
                                    "published",
                                    "failed",
                                    "ambiguous",
                                    "cancelled"
                                  ]
                                },
                                "scheduledAt": {
                                  "anyOf": [
                                    {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "publishedAt": {
                                  "anyOf": [
                                    {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "externalId": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "externalUrl": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "errorMessage": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "createdByActorId": {
                                  "type": "string"
                                },
                                "scheduledByActorId": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "stateChangedByActorId": {
                                  "type": "string"
                                },
                                "publishedByActorId": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "lastAssessedProfileVersionId": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "createdAt": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                "updatedAt": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                }
                              }
                            },
                            {
                              "type": "object",
                              "required": [
                                "profileAssessmentIssues"
                              ],
                              "properties": {
                                "profileAssessmentIssues": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "patternProperties": {
                                      "^.*$": {}
                                    }
                                  }
                                }
                              }
                            }
                          ]
                        },
                        "post": {
                          "type": "object",
                          "required": [
                            "id",
                            "projectId",
                            "title",
                            "sourceContent",
                            "sourceRevision",
                            "createdByActorId",
                            "createdAt",
                            "updatedAt"
                          ],
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "projectId": {
                              "type": "string"
                            },
                            "title": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "sourceContent": {
                              "anyOf": [
                                {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "boolean"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                {
                                  "type": "array",
                                  "items": {}
                                },
                                {
                                  "type": "object",
                                  "patternProperties": {
                                    "^(.*)$": {}
                                  }
                                }
                              ]
                            },
                            "sourceRevision": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "createdByActorId": {
                              "type": "string"
                            },
                            "createdAt": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "updatedAt": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            }
                          }
                        },
                        "channel": {
                          "allOf": [
                            {
                              "type": "object",
                              "required": [
                                "id",
                                "projectId",
                                "name",
                                "profileVersionId",
                                "state",
                                "archivedAt",
                                "revision",
                                "createdAt",
                                "updatedAt"
                              ],
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "projectId": {
                                  "type": "string"
                                },
                                "name": {
                                  "type": "string"
                                },
                                "profileVersionId": {
                                  "type": "string"
                                },
                                "state": {
                                  "enum": [
                                    "active",
                                    "archived"
                                  ]
                                },
                                "archivedAt": {
                                  "anyOf": [
                                    {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "revision": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                "createdAt": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                "updatedAt": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                }
                              }
                            },
                            {
                              "type": "object",
                              "required": [
                                "profileId"
                              ],
                              "properties": {
                                "profileId": {
                                  "type": "string",
                                  "minLength": 1
                                }
                              }
                            }
                          ]
                        },
                        "profile": {
                          "type": "object",
                          "required": [
                            "id",
                            "projectId",
                            "channelId",
                            "profileId",
                            "version",
                            "origin",
                            "state",
                            "revision",
                            "profile",
                            "createdByActorId",
                            "createdAt",
                            "updatedAt"
                          ],
                          "properties": {
                            "id": {
                              "type": "string",
                              "minLength": 1
                            },
                            "projectId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "channelId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "profileId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "version": {
                              "type": "integer",
                              "minimum": 1
                            },
                            "origin": {
                              "type": "string",
                              "enum": [
                                "built_in",
                                "custom"
                              ]
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "draft",
                                "active",
                                "superseded",
                                "disabled"
                              ]
                            },
                            "revision": {
                              "type": "integer",
                              "minimum": 1
                            },
                            "profile": {
                              "type": "object",
                              "patternProperties": {
                                "^.*$": {}
                              }
                            },
                            "createdByActorId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "createdAt": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "updatedAt": {
                              "type": "integer",
                              "minimum": 0
                            }
                          }
                        },
                        "draft": {
                          "type": "object",
                          "required": [
                            "id",
                            "projectId",
                            "publicationId",
                            "profileVersionId",
                            "sourceRevision",
                            "baseSourceContent",
                            "content",
                            "reviewState",
                            "validationIssues",
                            "lastAssessedProfileVersionId",
                            "revision",
                            "updatedByActorId",
                            "createdAt",
                            "updatedAt"
                          ],
                          "properties": {
                            "id": {
                              "type": "string",
                              "minLength": 1
                            },
                            "projectId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "publicationId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "profileVersionId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "sourceRevision": {
                              "type": "integer",
                              "minimum": 1
                            },
                            "baseSourceContent": {
                              "type": "object",
                              "required": [
                                "media"
                              ],
                              "properties": {
                                "body": {
                                  "type": "object",
                                  "required": [
                                    "text",
                                    "format"
                                  ],
                                  "properties": {
                                    "text": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 1000000
                                    },
                                    "format": {
                                      "type": "string",
                                      "enum": [
                                        "plain_text",
                                        "markdown"
                                      ]
                                    }
                                  },
                                  "additionalProperties": false
                                },
                                "headline": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 10000
                                },
                                "language": {
                                  "type": "string",
                                  "minLength": 2,
                                  "maxLength": 35
                                },
                                "media": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "required": [
                                      "assetId"
                                    ],
                                    "properties": {
                                      "assetId": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 255
                                      },
                                      "accessibilityText": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 10000
                                      }
                                    },
                                    "additionalProperties": false
                                  },
                                  "maxItems": 256
                                }
                              },
                              "additionalProperties": false
                            },
                            "content": {
                              "type": "object",
                              "patternProperties": {
                                "^.*$": {}
                              }
                            },
                            "reviewState": {
                              "type": "string",
                              "enum": [
                                "compatible",
                                "review_required"
                              ]
                            },
                            "validationIssues": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "patternProperties": {
                                  "^.*$": {}
                                }
                              }
                            },
                            "lastAssessedProfileVersionId": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "revision": {
                              "type": "integer",
                              "minimum": 1
                            },
                            "updatedByActorId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "createdAt": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "updatedAt": {
                              "type": "integer",
                              "minimum": 0
                            }
                          }
                        },
                        "adoptionCount": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "selectedTargetProfile": {
                          "anyOf": [
                            {
                              "type": "object",
                              "required": [
                                "id",
                                "projectId",
                                "channelId",
                                "profileId",
                                "version",
                                "origin",
                                "state",
                                "revision",
                                "profile",
                                "createdByActorId",
                                "createdAt",
                                "updatedAt"
                              ],
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "projectId": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "channelId": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "profileId": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "version": {
                                  "type": "integer",
                                  "minimum": 1
                                },
                                "origin": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "const": "built_in"
                                    },
                                    {
                                      "type": "string",
                                      "const": "custom"
                                    }
                                  ]
                                },
                                "state": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "const": "draft"
                                    },
                                    {
                                      "type": "string",
                                      "const": "active"
                                    },
                                    {
                                      "type": "string",
                                      "const": "superseded"
                                    },
                                    {
                                      "type": "string",
                                      "const": "disabled"
                                    }
                                  ]
                                },
                                "revision": {
                                  "type": "integer",
                                  "minimum": 1
                                },
                                "profile": {
                                  "type": "object",
                                  "patternProperties": {
                                    "^.*$": {}
                                  }
                                },
                                "createdByActorId": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "createdAt": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "updatedAt": {
                                  "type": "integer",
                                  "minimum": 0
                                }
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "selectedTarget": {
                          "anyOf": [
                            {
                              "type": "object",
                              "required": [
                                "id",
                                "projectId",
                                "publicationId",
                                "sequence",
                                "profileVersionId",
                                "sourceRevision",
                                "deliveryMode",
                                "mediaReferenceCount",
                                "content",
                                "contentHash",
                                "profileHash",
                                "schemaHash",
                                "validationIssues",
                                "createdByActorId",
                                "createdAt"
                              ],
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "projectId": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "publicationId": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "sequence": {
                                  "type": "integer",
                                  "minimum": 1
                                },
                                "profileVersionId": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "sourceRevision": {
                                  "type": "integer",
                                  "minimum": 1
                                },
                                "deliveryMode": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "const": "manual"
                                    },
                                    {
                                      "type": "string",
                                      "const": "automatic"
                                    }
                                  ]
                                },
                                "mediaReferenceCount": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "content": {
                                  "type": "object",
                                  "patternProperties": {
                                    "^.*$": {}
                                  }
                                },
                                "contentHash": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "profileHash": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "schemaHash": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "validationIssues": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "patternProperties": {
                                      "^.*$": {}
                                    }
                                  }
                                },
                                "createdByActorId": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "createdAt": {
                                  "type": "integer",
                                  "minimum": 0
                                }
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Response for status 422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/publications/{publicationId}/draft/adoptions": {
      "get": {
        "operationId": "listPublicationDraftAdoptions",
        "tags": [
          "Publications"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "publicationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "adoptions"
                  ],
                  "properties": {
                    "adoptions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "draft",
                          "localContent",
                          "adoptedProfileVersionId",
                          "targetRevisionId",
                          "createdAt"
                        ],
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "draft": {
                            "type": "object",
                            "required": [
                              "id",
                              "projectId",
                              "publicationId",
                              "profileVersionId",
                              "sourceRevision",
                              "baseSourceContent",
                              "content",
                              "reviewState",
                              "validationIssues",
                              "lastAssessedProfileVersionId",
                              "revision",
                              "updatedByActorId",
                              "createdAt",
                              "updatedAt"
                            ],
                            "properties": {
                              "id": {
                                "type": "string",
                                "minLength": 1
                              },
                              "projectId": {
                                "type": "string",
                                "minLength": 1
                              },
                              "publicationId": {
                                "type": "string",
                                "minLength": 1
                              },
                              "profileVersionId": {
                                "type": "string",
                                "minLength": 1
                              },
                              "sourceRevision": {
                                "type": "integer",
                                "minimum": 1
                              },
                              "baseSourceContent": {
                                "type": "object",
                                "required": [
                                  "media"
                                ],
                                "properties": {
                                  "body": {
                                    "type": "object",
                                    "required": [
                                      "text",
                                      "format"
                                    ],
                                    "properties": {
                                      "text": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 1000000
                                      },
                                      "format": {
                                        "type": "string",
                                        "enum": [
                                          "plain_text",
                                          "markdown"
                                        ]
                                      }
                                    },
                                    "additionalProperties": false
                                  },
                                  "headline": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 10000
                                  },
                                  "language": {
                                    "type": "string",
                                    "minLength": 2,
                                    "maxLength": 35
                                  },
                                  "media": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "required": [
                                        "assetId"
                                      ],
                                      "properties": {
                                        "assetId": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 255
                                        },
                                        "accessibilityText": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 10000
                                        }
                                      },
                                      "additionalProperties": false
                                    },
                                    "maxItems": 256
                                  }
                                },
                                "additionalProperties": false
                              },
                              "content": {
                                "type": "object",
                                "patternProperties": {
                                  "^.*$": {}
                                }
                              },
                              "reviewState": {
                                "type": "string",
                                "enum": [
                                  "compatible",
                                  "review_required"
                                ]
                              },
                              "validationIssues": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "patternProperties": {
                                    "^.*$": {}
                                  }
                                }
                              },
                              "lastAssessedProfileVersionId": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "revision": {
                                "type": "integer",
                                "minimum": 1
                              },
                              "updatedByActorId": {
                                "type": "string",
                                "minLength": 1
                              },
                              "createdAt": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "updatedAt": {
                                "type": "integer",
                                "minimum": 0
                              }
                            }
                          },
                          "localContent": {
                            "anyOf": [
                              {
                                "type": "object",
                                "patternProperties": {
                                  "^.*$": {}
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "adoptedProfileVersionId": {
                            "type": "string"
                          },
                          "targetRevisionId": {
                            "type": "string"
                          },
                          "createdAt": {
                            "type": "integer"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/publications/{publicationId}/draft/assess-adoption": {
      "post": {
        "operationId": "assessPublicationDraftAdoption",
        "tags": [
          "Publications"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "publicationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "expectedRevision",
                  "expectedSourceRevision",
                  "expectedProfileVersionId",
                  "activeProfileVersionId",
                  "targetContent"
                ],
                "properties": {
                  "expectedRevision": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "expectedSourceRevision": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "expectedProfileVersionId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "activeProfileVersionId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "targetContent": {
                    "type": "object",
                    "patternProperties": {
                      "^.*$": {}
                    }
                  },
                  "previousLocalContent": {
                    "type": "object",
                    "patternProperties": {
                      "^.*$": {}
                    }
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "expectedRevision",
                  "expectedSourceRevision",
                  "expectedProfileVersionId",
                  "activeProfileVersionId",
                  "targetContent"
                ],
                "properties": {
                  "expectedRevision": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "expectedSourceRevision": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "expectedProfileVersionId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "activeProfileVersionId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "targetContent": {
                    "type": "object",
                    "patternProperties": {
                      "^.*$": {}
                    }
                  },
                  "previousLocalContent": {
                    "type": "object",
                    "patternProperties": {
                      "^.*$": {}
                    }
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "expectedRevision",
                  "expectedSourceRevision",
                  "expectedProfileVersionId",
                  "activeProfileVersionId",
                  "targetContent"
                ],
                "properties": {
                  "expectedRevision": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "expectedSourceRevision": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "expectedProfileVersionId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "activeProfileVersionId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "targetContent": {
                    "type": "object",
                    "patternProperties": {
                      "^.*$": {}
                    }
                  },
                  "previousLocalContent": {
                    "type": "object",
                    "patternProperties": {
                      "^.*$": {}
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "valid",
                    "issues"
                  ],
                  "properties": {
                    "valid": {
                      "type": "boolean"
                    },
                    "issues": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "patternProperties": {
                          "^.*$": {}
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Response for status 422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/publications/{publicationId}/draft/adopt-profile": {
      "post": {
        "operationId": "adoptPublicationDraftProfile",
        "tags": [
          "Publications"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "publicationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "expectedRevision",
                  "expectedSourceRevision",
                  "expectedProfileVersionId",
                  "activeProfileVersionId",
                  "targetContent"
                ],
                "properties": {
                  "expectedRevision": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "expectedSourceRevision": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "expectedProfileVersionId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "activeProfileVersionId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "targetContent": {
                    "type": "object",
                    "patternProperties": {
                      "^.*$": {}
                    }
                  },
                  "previousLocalContent": {
                    "type": "object",
                    "patternProperties": {
                      "^.*$": {}
                    }
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "expectedRevision",
                  "expectedSourceRevision",
                  "expectedProfileVersionId",
                  "activeProfileVersionId",
                  "targetContent"
                ],
                "properties": {
                  "expectedRevision": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "expectedSourceRevision": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "expectedProfileVersionId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "activeProfileVersionId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "targetContent": {
                    "type": "object",
                    "patternProperties": {
                      "^.*$": {}
                    }
                  },
                  "previousLocalContent": {
                    "type": "object",
                    "patternProperties": {
                      "^.*$": {}
                    }
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "expectedRevision",
                  "expectedSourceRevision",
                  "expectedProfileVersionId",
                  "activeProfileVersionId",
                  "targetContent"
                ],
                "properties": {
                  "expectedRevision": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "expectedSourceRevision": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "expectedProfileVersionId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "activeProfileVersionId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "targetContent": {
                    "type": "object",
                    "patternProperties": {
                      "^.*$": {}
                    }
                  },
                  "previousLocalContent": {
                    "type": "object",
                    "patternProperties": {
                      "^.*$": {}
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "editor"
                  ],
                  "properties": {
                    "editor": {
                      "type": "object",
                      "required": [
                        "publication",
                        "post",
                        "channel",
                        "profile",
                        "draft",
                        "selectedTarget"
                      ],
                      "properties": {
                        "publication": {
                          "allOf": [
                            {
                              "type": "object",
                              "required": [
                                "id",
                                "projectId",
                                "postId",
                                "channelId",
                                "targetRevisionId",
                                "deliveryMode",
                                "reviewState",
                                "state",
                                "scheduledAt",
                                "publishedAt",
                                "externalId",
                                "externalUrl",
                                "errorMessage",
                                "createdByActorId",
                                "scheduledByActorId",
                                "stateChangedByActorId",
                                "publishedByActorId",
                                "lastAssessedProfileVersionId",
                                "createdAt",
                                "updatedAt"
                              ],
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "projectId": {
                                  "type": "string"
                                },
                                "postId": {
                                  "type": "string"
                                },
                                "channelId": {
                                  "type": "string"
                                },
                                "targetRevisionId": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "deliveryMode": {
                                  "enum": [
                                    "manual",
                                    "automatic"
                                  ]
                                },
                                "reviewState": {
                                  "enum": [
                                    "compatible",
                                    "review_required"
                                  ]
                                },
                                "state": {
                                  "enum": [
                                    "draft",
                                    "scheduled",
                                    "ready",
                                    "publishing",
                                    "published",
                                    "failed",
                                    "ambiguous",
                                    "cancelled"
                                  ]
                                },
                                "scheduledAt": {
                                  "anyOf": [
                                    {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "publishedAt": {
                                  "anyOf": [
                                    {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "externalId": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "externalUrl": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "errorMessage": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "createdByActorId": {
                                  "type": "string"
                                },
                                "scheduledByActorId": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "stateChangedByActorId": {
                                  "type": "string"
                                },
                                "publishedByActorId": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "lastAssessedProfileVersionId": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "createdAt": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                "updatedAt": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                }
                              }
                            },
                            {
                              "type": "object",
                              "required": [
                                "profileAssessmentIssues"
                              ],
                              "properties": {
                                "profileAssessmentIssues": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "patternProperties": {
                                      "^.*$": {}
                                    }
                                  }
                                }
                              }
                            }
                          ]
                        },
                        "post": {
                          "type": "object",
                          "required": [
                            "id",
                            "projectId",
                            "title",
                            "sourceContent",
                            "sourceRevision",
                            "createdByActorId",
                            "createdAt",
                            "updatedAt"
                          ],
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "projectId": {
                              "type": "string"
                            },
                            "title": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "sourceContent": {
                              "anyOf": [
                                {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "boolean"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                {
                                  "type": "array",
                                  "items": {}
                                },
                                {
                                  "type": "object",
                                  "patternProperties": {
                                    "^(.*)$": {}
                                  }
                                }
                              ]
                            },
                            "sourceRevision": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "createdByActorId": {
                              "type": "string"
                            },
                            "createdAt": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "updatedAt": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            }
                          }
                        },
                        "channel": {
                          "allOf": [
                            {
                              "type": "object",
                              "required": [
                                "id",
                                "projectId",
                                "name",
                                "profileVersionId",
                                "state",
                                "archivedAt",
                                "revision",
                                "createdAt",
                                "updatedAt"
                              ],
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "projectId": {
                                  "type": "string"
                                },
                                "name": {
                                  "type": "string"
                                },
                                "profileVersionId": {
                                  "type": "string"
                                },
                                "state": {
                                  "enum": [
                                    "active",
                                    "archived"
                                  ]
                                },
                                "archivedAt": {
                                  "anyOf": [
                                    {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "revision": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                "createdAt": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                "updatedAt": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                }
                              }
                            },
                            {
                              "type": "object",
                              "required": [
                                "profileId"
                              ],
                              "properties": {
                                "profileId": {
                                  "type": "string",
                                  "minLength": 1
                                }
                              }
                            }
                          ]
                        },
                        "profile": {
                          "type": "object",
                          "required": [
                            "id",
                            "projectId",
                            "channelId",
                            "profileId",
                            "version",
                            "origin",
                            "state",
                            "revision",
                            "profile",
                            "createdByActorId",
                            "createdAt",
                            "updatedAt"
                          ],
                          "properties": {
                            "id": {
                              "type": "string",
                              "minLength": 1
                            },
                            "projectId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "channelId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "profileId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "version": {
                              "type": "integer",
                              "minimum": 1
                            },
                            "origin": {
                              "type": "string",
                              "enum": [
                                "built_in",
                                "custom"
                              ]
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "draft",
                                "active",
                                "superseded",
                                "disabled"
                              ]
                            },
                            "revision": {
                              "type": "integer",
                              "minimum": 1
                            },
                            "profile": {
                              "type": "object",
                              "patternProperties": {
                                "^.*$": {}
                              }
                            },
                            "createdByActorId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "createdAt": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "updatedAt": {
                              "type": "integer",
                              "minimum": 0
                            }
                          }
                        },
                        "draft": {
                          "type": "object",
                          "required": [
                            "id",
                            "projectId",
                            "publicationId",
                            "profileVersionId",
                            "sourceRevision",
                            "baseSourceContent",
                            "content",
                            "reviewState",
                            "validationIssues",
                            "lastAssessedProfileVersionId",
                            "revision",
                            "updatedByActorId",
                            "createdAt",
                            "updatedAt"
                          ],
                          "properties": {
                            "id": {
                              "type": "string",
                              "minLength": 1
                            },
                            "projectId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "publicationId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "profileVersionId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "sourceRevision": {
                              "type": "integer",
                              "minimum": 1
                            },
                            "baseSourceContent": {
                              "type": "object",
                              "required": [
                                "media"
                              ],
                              "properties": {
                                "body": {
                                  "type": "object",
                                  "required": [
                                    "text",
                                    "format"
                                  ],
                                  "properties": {
                                    "text": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 1000000
                                    },
                                    "format": {
                                      "type": "string",
                                      "enum": [
                                        "plain_text",
                                        "markdown"
                                      ]
                                    }
                                  },
                                  "additionalProperties": false
                                },
                                "headline": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 10000
                                },
                                "language": {
                                  "type": "string",
                                  "minLength": 2,
                                  "maxLength": 35
                                },
                                "media": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "required": [
                                      "assetId"
                                    ],
                                    "properties": {
                                      "assetId": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 255
                                      },
                                      "accessibilityText": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 10000
                                      }
                                    },
                                    "additionalProperties": false
                                  },
                                  "maxItems": 256
                                }
                              },
                              "additionalProperties": false
                            },
                            "content": {
                              "type": "object",
                              "patternProperties": {
                                "^.*$": {}
                              }
                            },
                            "reviewState": {
                              "type": "string",
                              "enum": [
                                "compatible",
                                "review_required"
                              ]
                            },
                            "validationIssues": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "patternProperties": {
                                  "^.*$": {}
                                }
                              }
                            },
                            "lastAssessedProfileVersionId": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "revision": {
                              "type": "integer",
                              "minimum": 1
                            },
                            "updatedByActorId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "createdAt": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "updatedAt": {
                              "type": "integer",
                              "minimum": 0
                            }
                          }
                        },
                        "adoptionCount": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "selectedTargetProfile": {
                          "anyOf": [
                            {
                              "type": "object",
                              "required": [
                                "id",
                                "projectId",
                                "channelId",
                                "profileId",
                                "version",
                                "origin",
                                "state",
                                "revision",
                                "profile",
                                "createdByActorId",
                                "createdAt",
                                "updatedAt"
                              ],
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "projectId": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "channelId": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "profileId": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "version": {
                                  "type": "integer",
                                  "minimum": 1
                                },
                                "origin": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "const": "built_in"
                                    },
                                    {
                                      "type": "string",
                                      "const": "custom"
                                    }
                                  ]
                                },
                                "state": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "const": "draft"
                                    },
                                    {
                                      "type": "string",
                                      "const": "active"
                                    },
                                    {
                                      "type": "string",
                                      "const": "superseded"
                                    },
                                    {
                                      "type": "string",
                                      "const": "disabled"
                                    }
                                  ]
                                },
                                "revision": {
                                  "type": "integer",
                                  "minimum": 1
                                },
                                "profile": {
                                  "type": "object",
                                  "patternProperties": {
                                    "^.*$": {}
                                  }
                                },
                                "createdByActorId": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "createdAt": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "updatedAt": {
                                  "type": "integer",
                                  "minimum": 0
                                }
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "selectedTarget": {
                          "anyOf": [
                            {
                              "type": "object",
                              "required": [
                                "id",
                                "projectId",
                                "publicationId",
                                "sequence",
                                "profileVersionId",
                                "sourceRevision",
                                "deliveryMode",
                                "mediaReferenceCount",
                                "content",
                                "contentHash",
                                "profileHash",
                                "schemaHash",
                                "validationIssues",
                                "createdByActorId",
                                "createdAt"
                              ],
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "projectId": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "publicationId": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "sequence": {
                                  "type": "integer",
                                  "minimum": 1
                                },
                                "profileVersionId": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "sourceRevision": {
                                  "type": "integer",
                                  "minimum": 1
                                },
                                "deliveryMode": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "const": "manual"
                                    },
                                    {
                                      "type": "string",
                                      "const": "automatic"
                                    }
                                  ]
                                },
                                "mediaReferenceCount": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "content": {
                                  "type": "object",
                                  "patternProperties": {
                                    "^.*$": {}
                                  }
                                },
                                "contentHash": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "profileHash": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "schemaHash": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "validationIssues": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "patternProperties": {
                                      "^.*$": {}
                                    }
                                  }
                                },
                                "createdByActorId": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "createdAt": {
                                  "type": "integer",
                                  "minimum": 0
                                }
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Response for status 422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/publications/{publicationId}/draft/rebase": {
      "post": {
        "operationId": "rebasePublicationDraft",
        "summary": "Rebase a stale publication draft onto the current source",
        "tags": [
          "Publications"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "publicationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "expectedRevision"
                ],
                "properties": {
                  "expectedSourceRevision": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "replaceContent": {
                    "type": "boolean"
                  },
                  "expectedRevision": {
                    "type": "integer",
                    "minimum": 1
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "expectedRevision"
                ],
                "properties": {
                  "expectedSourceRevision": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "replaceContent": {
                    "type": "boolean"
                  },
                  "expectedRevision": {
                    "type": "integer",
                    "minimum": 1
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "expectedRevision"
                ],
                "properties": {
                  "expectedSourceRevision": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "replaceContent": {
                    "type": "boolean"
                  },
                  "expectedRevision": {
                    "type": "integer",
                    "minimum": 1
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "editor"
                  ],
                  "properties": {
                    "editor": {
                      "type": "object",
                      "required": [
                        "publication",
                        "post",
                        "channel",
                        "profile",
                        "draft",
                        "selectedTarget"
                      ],
                      "properties": {
                        "publication": {
                          "allOf": [
                            {
                              "type": "object",
                              "required": [
                                "id",
                                "projectId",
                                "postId",
                                "channelId",
                                "targetRevisionId",
                                "deliveryMode",
                                "reviewState",
                                "state",
                                "scheduledAt",
                                "publishedAt",
                                "externalId",
                                "externalUrl",
                                "errorMessage",
                                "createdByActorId",
                                "scheduledByActorId",
                                "stateChangedByActorId",
                                "publishedByActorId",
                                "lastAssessedProfileVersionId",
                                "createdAt",
                                "updatedAt"
                              ],
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "projectId": {
                                  "type": "string"
                                },
                                "postId": {
                                  "type": "string"
                                },
                                "channelId": {
                                  "type": "string"
                                },
                                "targetRevisionId": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "deliveryMode": {
                                  "enum": [
                                    "manual",
                                    "automatic"
                                  ]
                                },
                                "reviewState": {
                                  "enum": [
                                    "compatible",
                                    "review_required"
                                  ]
                                },
                                "state": {
                                  "enum": [
                                    "draft",
                                    "scheduled",
                                    "ready",
                                    "publishing",
                                    "published",
                                    "failed",
                                    "ambiguous",
                                    "cancelled"
                                  ]
                                },
                                "scheduledAt": {
                                  "anyOf": [
                                    {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "publishedAt": {
                                  "anyOf": [
                                    {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "externalId": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "externalUrl": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "errorMessage": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "createdByActorId": {
                                  "type": "string"
                                },
                                "scheduledByActorId": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "stateChangedByActorId": {
                                  "type": "string"
                                },
                                "publishedByActorId": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "lastAssessedProfileVersionId": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "createdAt": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                "updatedAt": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                }
                              }
                            },
                            {
                              "type": "object",
                              "required": [
                                "profileAssessmentIssues"
                              ],
                              "properties": {
                                "profileAssessmentIssues": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "patternProperties": {
                                      "^.*$": {}
                                    }
                                  }
                                }
                              }
                            }
                          ]
                        },
                        "post": {
                          "type": "object",
                          "required": [
                            "id",
                            "projectId",
                            "title",
                            "sourceContent",
                            "sourceRevision",
                            "createdByActorId",
                            "createdAt",
                            "updatedAt"
                          ],
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "projectId": {
                              "type": "string"
                            },
                            "title": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "sourceContent": {
                              "anyOf": [
                                {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "boolean"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                {
                                  "type": "array",
                                  "items": {}
                                },
                                {
                                  "type": "object",
                                  "patternProperties": {
                                    "^(.*)$": {}
                                  }
                                }
                              ]
                            },
                            "sourceRevision": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "createdByActorId": {
                              "type": "string"
                            },
                            "createdAt": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "updatedAt": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            }
                          }
                        },
                        "channel": {
                          "allOf": [
                            {
                              "type": "object",
                              "required": [
                                "id",
                                "projectId",
                                "name",
                                "profileVersionId",
                                "state",
                                "archivedAt",
                                "revision",
                                "createdAt",
                                "updatedAt"
                              ],
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "projectId": {
                                  "type": "string"
                                },
                                "name": {
                                  "type": "string"
                                },
                                "profileVersionId": {
                                  "type": "string"
                                },
                                "state": {
                                  "enum": [
                                    "active",
                                    "archived"
                                  ]
                                },
                                "archivedAt": {
                                  "anyOf": [
                                    {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "revision": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                "createdAt": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                "updatedAt": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                }
                              }
                            },
                            {
                              "type": "object",
                              "required": [
                                "profileId"
                              ],
                              "properties": {
                                "profileId": {
                                  "type": "string",
                                  "minLength": 1
                                }
                              }
                            }
                          ]
                        },
                        "profile": {
                          "type": "object",
                          "required": [
                            "id",
                            "projectId",
                            "channelId",
                            "profileId",
                            "version",
                            "origin",
                            "state",
                            "revision",
                            "profile",
                            "createdByActorId",
                            "createdAt",
                            "updatedAt"
                          ],
                          "properties": {
                            "id": {
                              "type": "string",
                              "minLength": 1
                            },
                            "projectId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "channelId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "profileId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "version": {
                              "type": "integer",
                              "minimum": 1
                            },
                            "origin": {
                              "type": "string",
                              "enum": [
                                "built_in",
                                "custom"
                              ]
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "draft",
                                "active",
                                "superseded",
                                "disabled"
                              ]
                            },
                            "revision": {
                              "type": "integer",
                              "minimum": 1
                            },
                            "profile": {
                              "type": "object",
                              "patternProperties": {
                                "^.*$": {}
                              }
                            },
                            "createdByActorId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "createdAt": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "updatedAt": {
                              "type": "integer",
                              "minimum": 0
                            }
                          }
                        },
                        "draft": {
                          "type": "object",
                          "required": [
                            "id",
                            "projectId",
                            "publicationId",
                            "profileVersionId",
                            "sourceRevision",
                            "baseSourceContent",
                            "content",
                            "reviewState",
                            "validationIssues",
                            "lastAssessedProfileVersionId",
                            "revision",
                            "updatedByActorId",
                            "createdAt",
                            "updatedAt"
                          ],
                          "properties": {
                            "id": {
                              "type": "string",
                              "minLength": 1
                            },
                            "projectId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "publicationId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "profileVersionId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "sourceRevision": {
                              "type": "integer",
                              "minimum": 1
                            },
                            "baseSourceContent": {
                              "type": "object",
                              "required": [
                                "media"
                              ],
                              "properties": {
                                "body": {
                                  "type": "object",
                                  "required": [
                                    "text",
                                    "format"
                                  ],
                                  "properties": {
                                    "text": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 1000000
                                    },
                                    "format": {
                                      "type": "string",
                                      "enum": [
                                        "plain_text",
                                        "markdown"
                                      ]
                                    }
                                  },
                                  "additionalProperties": false
                                },
                                "headline": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 10000
                                },
                                "language": {
                                  "type": "string",
                                  "minLength": 2,
                                  "maxLength": 35
                                },
                                "media": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "required": [
                                      "assetId"
                                    ],
                                    "properties": {
                                      "assetId": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 255
                                      },
                                      "accessibilityText": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 10000
                                      }
                                    },
                                    "additionalProperties": false
                                  },
                                  "maxItems": 256
                                }
                              },
                              "additionalProperties": false
                            },
                            "content": {
                              "type": "object",
                              "patternProperties": {
                                "^.*$": {}
                              }
                            },
                            "reviewState": {
                              "type": "string",
                              "enum": [
                                "compatible",
                                "review_required"
                              ]
                            },
                            "validationIssues": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "patternProperties": {
                                  "^.*$": {}
                                }
                              }
                            },
                            "lastAssessedProfileVersionId": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "revision": {
                              "type": "integer",
                              "minimum": 1
                            },
                            "updatedByActorId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "createdAt": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "updatedAt": {
                              "type": "integer",
                              "minimum": 0
                            }
                          }
                        },
                        "adoptionCount": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "selectedTargetProfile": {
                          "anyOf": [
                            {
                              "type": "object",
                              "required": [
                                "id",
                                "projectId",
                                "channelId",
                                "profileId",
                                "version",
                                "origin",
                                "state",
                                "revision",
                                "profile",
                                "createdByActorId",
                                "createdAt",
                                "updatedAt"
                              ],
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "projectId": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "channelId": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "profileId": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "version": {
                                  "type": "integer",
                                  "minimum": 1
                                },
                                "origin": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "const": "built_in"
                                    },
                                    {
                                      "type": "string",
                                      "const": "custom"
                                    }
                                  ]
                                },
                                "state": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "const": "draft"
                                    },
                                    {
                                      "type": "string",
                                      "const": "active"
                                    },
                                    {
                                      "type": "string",
                                      "const": "superseded"
                                    },
                                    {
                                      "type": "string",
                                      "const": "disabled"
                                    }
                                  ]
                                },
                                "revision": {
                                  "type": "integer",
                                  "minimum": 1
                                },
                                "profile": {
                                  "type": "object",
                                  "patternProperties": {
                                    "^.*$": {}
                                  }
                                },
                                "createdByActorId": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "createdAt": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "updatedAt": {
                                  "type": "integer",
                                  "minimum": 0
                                }
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "selectedTarget": {
                          "anyOf": [
                            {
                              "type": "object",
                              "required": [
                                "id",
                                "projectId",
                                "publicationId",
                                "sequence",
                                "profileVersionId",
                                "sourceRevision",
                                "deliveryMode",
                                "mediaReferenceCount",
                                "content",
                                "contentHash",
                                "profileHash",
                                "schemaHash",
                                "validationIssues",
                                "createdByActorId",
                                "createdAt"
                              ],
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "projectId": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "publicationId": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "sequence": {
                                  "type": "integer",
                                  "minimum": 1
                                },
                                "profileVersionId": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "sourceRevision": {
                                  "type": "integer",
                                  "minimum": 1
                                },
                                "deliveryMode": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "const": "manual"
                                    },
                                    {
                                      "type": "string",
                                      "const": "automatic"
                                    }
                                  ]
                                },
                                "mediaReferenceCount": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "content": {
                                  "type": "object",
                                  "patternProperties": {
                                    "^.*$": {}
                                  }
                                },
                                "contentHash": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "profileHash": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "schemaHash": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "validationIssues": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "patternProperties": {
                                      "^.*$": {}
                                    }
                                  }
                                },
                                "createdByActorId": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "createdAt": {
                                  "type": "integer",
                                  "minimum": 0
                                }
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Response for status 422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/publications/{publicationId}/draft/promote": {
      "post": {
        "operationId": "promotePublicationDraft",
        "summary": "Promote the current draft to an immutable target revision",
        "tags": [
          "Publications"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "publicationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "expectedRevision"
                ],
                "properties": {
                  "expectedRevision": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "scheduledAt": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 0
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "expectedRevision"
                ],
                "properties": {
                  "expectedRevision": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "scheduledAt": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 0
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "expectedRevision"
                ],
                "properties": {
                  "expectedRevision": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "scheduledAt": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 0
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "editor"
                  ],
                  "properties": {
                    "editor": {
                      "type": "object",
                      "required": [
                        "publication",
                        "post",
                        "channel",
                        "profile",
                        "draft",
                        "selectedTarget"
                      ],
                      "properties": {
                        "publication": {
                          "allOf": [
                            {
                              "type": "object",
                              "required": [
                                "id",
                                "projectId",
                                "postId",
                                "channelId",
                                "targetRevisionId",
                                "deliveryMode",
                                "reviewState",
                                "state",
                                "scheduledAt",
                                "publishedAt",
                                "externalId",
                                "externalUrl",
                                "errorMessage",
                                "createdByActorId",
                                "scheduledByActorId",
                                "stateChangedByActorId",
                                "publishedByActorId",
                                "lastAssessedProfileVersionId",
                                "createdAt",
                                "updatedAt"
                              ],
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "projectId": {
                                  "type": "string"
                                },
                                "postId": {
                                  "type": "string"
                                },
                                "channelId": {
                                  "type": "string"
                                },
                                "targetRevisionId": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "deliveryMode": {
                                  "enum": [
                                    "manual",
                                    "automatic"
                                  ]
                                },
                                "reviewState": {
                                  "enum": [
                                    "compatible",
                                    "review_required"
                                  ]
                                },
                                "state": {
                                  "enum": [
                                    "draft",
                                    "scheduled",
                                    "ready",
                                    "publishing",
                                    "published",
                                    "failed",
                                    "ambiguous",
                                    "cancelled"
                                  ]
                                },
                                "scheduledAt": {
                                  "anyOf": [
                                    {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "publishedAt": {
                                  "anyOf": [
                                    {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "externalId": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "externalUrl": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "errorMessage": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "createdByActorId": {
                                  "type": "string"
                                },
                                "scheduledByActorId": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "stateChangedByActorId": {
                                  "type": "string"
                                },
                                "publishedByActorId": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "lastAssessedProfileVersionId": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "createdAt": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                "updatedAt": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                }
                              }
                            },
                            {
                              "type": "object",
                              "required": [
                                "profileAssessmentIssues"
                              ],
                              "properties": {
                                "profileAssessmentIssues": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "patternProperties": {
                                      "^.*$": {}
                                    }
                                  }
                                }
                              }
                            }
                          ]
                        },
                        "post": {
                          "type": "object",
                          "required": [
                            "id",
                            "projectId",
                            "title",
                            "sourceContent",
                            "sourceRevision",
                            "createdByActorId",
                            "createdAt",
                            "updatedAt"
                          ],
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "projectId": {
                              "type": "string"
                            },
                            "title": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "sourceContent": {
                              "anyOf": [
                                {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "boolean"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                {
                                  "type": "array",
                                  "items": {}
                                },
                                {
                                  "type": "object",
                                  "patternProperties": {
                                    "^(.*)$": {}
                                  }
                                }
                              ]
                            },
                            "sourceRevision": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "createdByActorId": {
                              "type": "string"
                            },
                            "createdAt": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "updatedAt": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            }
                          }
                        },
                        "channel": {
                          "allOf": [
                            {
                              "type": "object",
                              "required": [
                                "id",
                                "projectId",
                                "name",
                                "profileVersionId",
                                "state",
                                "archivedAt",
                                "revision",
                                "createdAt",
                                "updatedAt"
                              ],
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "projectId": {
                                  "type": "string"
                                },
                                "name": {
                                  "type": "string"
                                },
                                "profileVersionId": {
                                  "type": "string"
                                },
                                "state": {
                                  "enum": [
                                    "active",
                                    "archived"
                                  ]
                                },
                                "archivedAt": {
                                  "anyOf": [
                                    {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "revision": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                "createdAt": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                "updatedAt": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                }
                              }
                            },
                            {
                              "type": "object",
                              "required": [
                                "profileId"
                              ],
                              "properties": {
                                "profileId": {
                                  "type": "string",
                                  "minLength": 1
                                }
                              }
                            }
                          ]
                        },
                        "profile": {
                          "type": "object",
                          "required": [
                            "id",
                            "projectId",
                            "channelId",
                            "profileId",
                            "version",
                            "origin",
                            "state",
                            "revision",
                            "profile",
                            "createdByActorId",
                            "createdAt",
                            "updatedAt"
                          ],
                          "properties": {
                            "id": {
                              "type": "string",
                              "minLength": 1
                            },
                            "projectId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "channelId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "profileId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "version": {
                              "type": "integer",
                              "minimum": 1
                            },
                            "origin": {
                              "type": "string",
                              "enum": [
                                "built_in",
                                "custom"
                              ]
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "draft",
                                "active",
                                "superseded",
                                "disabled"
                              ]
                            },
                            "revision": {
                              "type": "integer",
                              "minimum": 1
                            },
                            "profile": {
                              "type": "object",
                              "patternProperties": {
                                "^.*$": {}
                              }
                            },
                            "createdByActorId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "createdAt": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "updatedAt": {
                              "type": "integer",
                              "minimum": 0
                            }
                          }
                        },
                        "draft": {
                          "type": "object",
                          "required": [
                            "id",
                            "projectId",
                            "publicationId",
                            "profileVersionId",
                            "sourceRevision",
                            "baseSourceContent",
                            "content",
                            "reviewState",
                            "validationIssues",
                            "lastAssessedProfileVersionId",
                            "revision",
                            "updatedByActorId",
                            "createdAt",
                            "updatedAt"
                          ],
                          "properties": {
                            "id": {
                              "type": "string",
                              "minLength": 1
                            },
                            "projectId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "publicationId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "profileVersionId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "sourceRevision": {
                              "type": "integer",
                              "minimum": 1
                            },
                            "baseSourceContent": {
                              "type": "object",
                              "required": [
                                "media"
                              ],
                              "properties": {
                                "body": {
                                  "type": "object",
                                  "required": [
                                    "text",
                                    "format"
                                  ],
                                  "properties": {
                                    "text": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 1000000
                                    },
                                    "format": {
                                      "type": "string",
                                      "enum": [
                                        "plain_text",
                                        "markdown"
                                      ]
                                    }
                                  },
                                  "additionalProperties": false
                                },
                                "headline": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 10000
                                },
                                "language": {
                                  "type": "string",
                                  "minLength": 2,
                                  "maxLength": 35
                                },
                                "media": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "required": [
                                      "assetId"
                                    ],
                                    "properties": {
                                      "assetId": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 255
                                      },
                                      "accessibilityText": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 10000
                                      }
                                    },
                                    "additionalProperties": false
                                  },
                                  "maxItems": 256
                                }
                              },
                              "additionalProperties": false
                            },
                            "content": {
                              "type": "object",
                              "patternProperties": {
                                "^.*$": {}
                              }
                            },
                            "reviewState": {
                              "type": "string",
                              "enum": [
                                "compatible",
                                "review_required"
                              ]
                            },
                            "validationIssues": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "patternProperties": {
                                  "^.*$": {}
                                }
                              }
                            },
                            "lastAssessedProfileVersionId": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "revision": {
                              "type": "integer",
                              "minimum": 1
                            },
                            "updatedByActorId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "createdAt": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "updatedAt": {
                              "type": "integer",
                              "minimum": 0
                            }
                          }
                        },
                        "adoptionCount": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "selectedTargetProfile": {
                          "anyOf": [
                            {
                              "type": "object",
                              "required": [
                                "id",
                                "projectId",
                                "channelId",
                                "profileId",
                                "version",
                                "origin",
                                "state",
                                "revision",
                                "profile",
                                "createdByActorId",
                                "createdAt",
                                "updatedAt"
                              ],
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "projectId": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "channelId": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "profileId": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "version": {
                                  "type": "integer",
                                  "minimum": 1
                                },
                                "origin": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "const": "built_in"
                                    },
                                    {
                                      "type": "string",
                                      "const": "custom"
                                    }
                                  ]
                                },
                                "state": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "const": "draft"
                                    },
                                    {
                                      "type": "string",
                                      "const": "active"
                                    },
                                    {
                                      "type": "string",
                                      "const": "superseded"
                                    },
                                    {
                                      "type": "string",
                                      "const": "disabled"
                                    }
                                  ]
                                },
                                "revision": {
                                  "type": "integer",
                                  "minimum": 1
                                },
                                "profile": {
                                  "type": "object",
                                  "patternProperties": {
                                    "^.*$": {}
                                  }
                                },
                                "createdByActorId": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "createdAt": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "updatedAt": {
                                  "type": "integer",
                                  "minimum": 0
                                }
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "selectedTarget": {
                          "anyOf": [
                            {
                              "type": "object",
                              "required": [
                                "id",
                                "projectId",
                                "publicationId",
                                "sequence",
                                "profileVersionId",
                                "sourceRevision",
                                "deliveryMode",
                                "mediaReferenceCount",
                                "content",
                                "contentHash",
                                "profileHash",
                                "schemaHash",
                                "validationIssues",
                                "createdByActorId",
                                "createdAt"
                              ],
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "projectId": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "publicationId": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "sequence": {
                                  "type": "integer",
                                  "minimum": 1
                                },
                                "profileVersionId": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "sourceRevision": {
                                  "type": "integer",
                                  "minimum": 1
                                },
                                "deliveryMode": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "const": "manual"
                                    },
                                    {
                                      "type": "string",
                                      "const": "automatic"
                                    }
                                  ]
                                },
                                "mediaReferenceCount": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "content": {
                                  "type": "object",
                                  "patternProperties": {
                                    "^.*$": {}
                                  }
                                },
                                "contentHash": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "profileHash": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "schemaHash": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "validationIssues": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "patternProperties": {
                                      "^.*$": {}
                                    }
                                  }
                                },
                                "createdByActorId": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "createdAt": {
                                  "type": "integer",
                                  "minimum": 0
                                }
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/publications/{publicationId}/publish": {
      "post": {
        "operationId": "publishManualPublication",
        "summary": "Record that a manual publication was completed",
        "tags": [
          "Publications"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "publicationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "externalId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "externalUrl": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "externalId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "externalUrl": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "externalId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "externalUrl": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "publication"
                  ],
                  "properties": {
                    "publication": {
                      "allOf": [
                        {
                          "type": "object",
                          "required": [
                            "id",
                            "projectId",
                            "postId",
                            "channelId",
                            "targetRevisionId",
                            "deliveryMode",
                            "reviewState",
                            "state",
                            "scheduledAt",
                            "publishedAt",
                            "externalId",
                            "externalUrl",
                            "errorMessage",
                            "createdByActorId",
                            "scheduledByActorId",
                            "stateChangedByActorId",
                            "publishedByActorId",
                            "lastAssessedProfileVersionId",
                            "createdAt",
                            "updatedAt"
                          ],
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "projectId": {
                              "type": "string"
                            },
                            "postId": {
                              "type": "string"
                            },
                            "channelId": {
                              "type": "string"
                            },
                            "targetRevisionId": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "deliveryMode": {
                              "enum": [
                                "manual",
                                "automatic"
                              ]
                            },
                            "reviewState": {
                              "enum": [
                                "compatible",
                                "review_required"
                              ]
                            },
                            "state": {
                              "enum": [
                                "draft",
                                "scheduled",
                                "ready",
                                "publishing",
                                "published",
                                "failed",
                                "ambiguous",
                                "cancelled"
                              ]
                            },
                            "scheduledAt": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "publishedAt": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "externalId": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "externalUrl": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "errorMessage": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "createdByActorId": {
                              "type": "string"
                            },
                            "scheduledByActorId": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "stateChangedByActorId": {
                              "type": "string"
                            },
                            "publishedByActorId": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "lastAssessedProfileVersionId": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "createdAt": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "updatedAt": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            }
                          }
                        },
                        {
                          "type": "object",
                          "required": [
                            "profileAssessmentIssues"
                          ],
                          "properties": {
                            "profileAssessmentIssues": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "patternProperties": {
                                  "^.*$": {}
                                }
                              }
                            }
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/publications/{publicationId}/retry": {
      "post": {
        "operationId": "retryFailedPublication",
        "summary": "Requeue a failed automatic publication using its current target",
        "tags": [
          "Publications"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "publicationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "publication"
                  ],
                  "properties": {
                    "publication": {
                      "allOf": [
                        {
                          "type": "object",
                          "required": [
                            "id",
                            "projectId",
                            "postId",
                            "channelId",
                            "targetRevisionId",
                            "deliveryMode",
                            "reviewState",
                            "state",
                            "scheduledAt",
                            "publishedAt",
                            "externalId",
                            "externalUrl",
                            "errorMessage",
                            "createdByActorId",
                            "scheduledByActorId",
                            "stateChangedByActorId",
                            "publishedByActorId",
                            "lastAssessedProfileVersionId",
                            "createdAt",
                            "updatedAt"
                          ],
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "projectId": {
                              "type": "string"
                            },
                            "postId": {
                              "type": "string"
                            },
                            "channelId": {
                              "type": "string"
                            },
                            "targetRevisionId": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "deliveryMode": {
                              "enum": [
                                "manual",
                                "automatic"
                              ]
                            },
                            "reviewState": {
                              "enum": [
                                "compatible",
                                "review_required"
                              ]
                            },
                            "state": {
                              "enum": [
                                "draft",
                                "scheduled",
                                "ready",
                                "publishing",
                                "published",
                                "failed",
                                "ambiguous",
                                "cancelled"
                              ]
                            },
                            "scheduledAt": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "publishedAt": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "externalId": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "externalUrl": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "errorMessage": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "createdByActorId": {
                              "type": "string"
                            },
                            "scheduledByActorId": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "stateChangedByActorId": {
                              "type": "string"
                            },
                            "publishedByActorId": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "lastAssessedProfileVersionId": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "createdAt": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "updatedAt": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            }
                          }
                        },
                        {
                          "type": "object",
                          "required": [
                            "profileAssessmentIssues"
                          ],
                          "properties": {
                            "profileAssessmentIssues": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "patternProperties": {
                                  "^.*$": {}
                                }
                              }
                            }
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/publications/{publicationId}/reconcile": {
      "post": {
        "operationId": "reconcileAmbiguousPublication",
        "summary": "Resolve a publication whose external outcome is unknown",
        "tags": [
          "Publications"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "publicationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "resolution"
                ],
                "properties": {
                  "resolution": {
                    "type": "string",
                    "enum": [
                      "published",
                      "failed"
                    ]
                  },
                  "externalId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "externalUrl": {
                    "type": "string",
                    "minLength": 1
                  },
                  "errorMessage": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "resolution"
                ],
                "properties": {
                  "resolution": {
                    "type": "string",
                    "enum": [
                      "published",
                      "failed"
                    ]
                  },
                  "externalId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "externalUrl": {
                    "type": "string",
                    "minLength": 1
                  },
                  "errorMessage": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "resolution"
                ],
                "properties": {
                  "resolution": {
                    "type": "string",
                    "enum": [
                      "published",
                      "failed"
                    ]
                  },
                  "externalId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "externalUrl": {
                    "type": "string",
                    "minLength": 1
                  },
                  "errorMessage": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "publication"
                  ],
                  "properties": {
                    "publication": {
                      "allOf": [
                        {
                          "type": "object",
                          "required": [
                            "id",
                            "projectId",
                            "postId",
                            "channelId",
                            "targetRevisionId",
                            "deliveryMode",
                            "reviewState",
                            "state",
                            "scheduledAt",
                            "publishedAt",
                            "externalId",
                            "externalUrl",
                            "errorMessage",
                            "createdByActorId",
                            "scheduledByActorId",
                            "stateChangedByActorId",
                            "publishedByActorId",
                            "lastAssessedProfileVersionId",
                            "createdAt",
                            "updatedAt"
                          ],
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "projectId": {
                              "type": "string"
                            },
                            "postId": {
                              "type": "string"
                            },
                            "channelId": {
                              "type": "string"
                            },
                            "targetRevisionId": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "deliveryMode": {
                              "enum": [
                                "manual",
                                "automatic"
                              ]
                            },
                            "reviewState": {
                              "enum": [
                                "compatible",
                                "review_required"
                              ]
                            },
                            "state": {
                              "enum": [
                                "draft",
                                "scheduled",
                                "ready",
                                "publishing",
                                "published",
                                "failed",
                                "ambiguous",
                                "cancelled"
                              ]
                            },
                            "scheduledAt": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "publishedAt": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "externalId": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "externalUrl": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "errorMessage": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "createdByActorId": {
                              "type": "string"
                            },
                            "scheduledByActorId": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "stateChangedByActorId": {
                              "type": "string"
                            },
                            "publishedByActorId": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "lastAssessedProfileVersionId": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "createdAt": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "updatedAt": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            }
                          }
                        },
                        {
                          "type": "object",
                          "required": [
                            "profileAssessmentIssues"
                          ],
                          "properties": {
                            "profileAssessmentIssues": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "patternProperties": {
                                  "^.*$": {}
                                }
                              }
                            }
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/media/uploads": {
      "post": {
        "operationId": "reserveMediaUpload",
        "summary": "Reserve a project media upload",
        "tags": [
          "Media"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "originalFilename"
                ],
                "properties": {
                  "originalFilename": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "defaultAccessibilityText": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 10000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "expectedSize": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "contentType": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "originalFilename"
                ],
                "properties": {
                  "originalFilename": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "defaultAccessibilityText": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 10000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "expectedSize": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "contentType": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "originalFilename"
                ],
                "properties": {
                  "originalFilename": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "defaultAccessibilityText": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 10000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "expectedSize": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "contentType": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Response for status 201",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "asset",
                    "representation",
                    "intent",
                    "upload"
                  ],
                  "properties": {
                    "asset": {
                      "type": "object",
                      "required": [
                        "id",
                        "projectId",
                        "originalFilename",
                        "defaultAccessibilityText",
                        "state",
                        "archivedAt",
                        "deletionRequestedAt",
                        "deletedAt",
                        "failureCode",
                        "failureMessage",
                        "createdByActorId",
                        "createdAt",
                        "updatedAt"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1
                        },
                        "projectId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "originalFilename": {
                          "type": "string",
                          "minLength": 1
                        },
                        "defaultAccessibilityText": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "reserved",
                            "stored",
                            "inspecting",
                            "ready",
                            "failed",
                            "deletion_requested",
                            "deleted"
                          ]
                        },
                        "archivedAt": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": 0
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "deletionRequestedAt": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": 0
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "deletedAt": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": 0
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "failureCode": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "failureMessage": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "createdByActorId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    },
                    "representation": {
                      "type": "object",
                      "required": [
                        "id",
                        "projectId",
                        "assetId",
                        "kind",
                        "state",
                        "declaredContentType",
                        "detectedContentType",
                        "detectedFormat",
                        "family",
                        "byteSize",
                        "sha256",
                        "width",
                        "height",
                        "durationMs",
                        "pageCount",
                        "isAnimated",
                        "processorId",
                        "processorVersion",
                        "recipeJson",
                        "failureCode",
                        "failureMessage",
                        "createdAt",
                        "updatedAt"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1
                        },
                        "projectId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "assetId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "kind": {
                          "type": "string",
                          "enum": [
                            "original",
                            "derived"
                          ]
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "reserved",
                            "stored",
                            "inspecting",
                            "ready",
                            "failed",
                            "deletion_requested",
                            "deleted"
                          ]
                        },
                        "declaredContentType": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "detectedContentType": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "detectedFormat": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "family": {
                          "anyOf": [
                            {
                              "type": "string",
                              "const": "image"
                            },
                            {
                              "type": "string",
                              "const": "video"
                            },
                            {
                              "type": "string",
                              "const": "audio"
                            },
                            {
                              "type": "string",
                              "const": "document"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "byteSize": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": 0
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "sha256": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "width": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "height": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "durationMs": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": 0
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "pageCount": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "isAnimated": {
                          "anyOf": [
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "processorId": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "processorVersion": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "recipeJson": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "failureCode": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "failureMessage": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    },
                    "intent": {
                      "type": "object",
                      "required": [
                        "id",
                        "projectId",
                        "assetId",
                        "representationId",
                        "state",
                        "expectedSize",
                        "maxBytes",
                        "contentTypeHint",
                        "expiresAt",
                        "uploadStartedAt",
                        "completedAt",
                        "failureCode",
                        "failureMessage",
                        "createdAt",
                        "updatedAt"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1
                        },
                        "projectId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "assetId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "representationId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "pending",
                            "uploading",
                            "uploaded",
                            "consumed",
                            "expired",
                            "failed"
                          ]
                        },
                        "expectedSize": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": 0
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "maxBytes": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "contentTypeHint": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "expiresAt": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "uploadStartedAt": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": 0
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "completedAt": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": 0
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "failureCode": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "failureMessage": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    },
                    "upload": {
                      "type": "object",
                      "required": [
                        "intentId",
                        "storeId",
                        "maxBytes",
                        "expectedSize",
                        "contentType"
                      ],
                      "properties": {
                        "intentId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "storeId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "maxBytes": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "expectedSize": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": 0
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "contentType": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Response for status 503",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/media/uploads/{intentId}": {
      "put": {
        "operationId": "uploadMedia",
        "summary": "Stream bytes into a reserved media upload",
        "tags": [
          "Media"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "intentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "media"
                  ],
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "uploaded",
                        "already_complete"
                      ]
                    },
                    "media": {
                      "type": "object",
                      "required": [
                        "asset",
                        "representation",
                        "intent",
                        "upload"
                      ],
                      "properties": {
                        "asset": {
                          "type": "object",
                          "required": [
                            "id",
                            "projectId",
                            "originalFilename",
                            "defaultAccessibilityText",
                            "state",
                            "archivedAt",
                            "deletionRequestedAt",
                            "deletedAt",
                            "failureCode",
                            "failureMessage",
                            "createdByActorId",
                            "createdAt",
                            "updatedAt"
                          ],
                          "properties": {
                            "id": {
                              "type": "string",
                              "minLength": 1
                            },
                            "projectId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "originalFilename": {
                              "type": "string",
                              "minLength": 1
                            },
                            "defaultAccessibilityText": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "reserved",
                                "stored",
                                "inspecting",
                                "ready",
                                "failed",
                                "deletion_requested",
                                "deleted"
                              ]
                            },
                            "archivedAt": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "deletionRequestedAt": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "deletedAt": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "failureCode": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "failureMessage": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "createdByActorId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "createdAt": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "updatedAt": {
                              "type": "integer",
                              "minimum": 0
                            }
                          }
                        },
                        "representation": {
                          "type": "object",
                          "required": [
                            "id",
                            "projectId",
                            "assetId",
                            "kind",
                            "state",
                            "declaredContentType",
                            "detectedContentType",
                            "detectedFormat",
                            "family",
                            "byteSize",
                            "sha256",
                            "width",
                            "height",
                            "durationMs",
                            "pageCount",
                            "isAnimated",
                            "processorId",
                            "processorVersion",
                            "recipeJson",
                            "failureCode",
                            "failureMessage",
                            "createdAt",
                            "updatedAt"
                          ],
                          "properties": {
                            "id": {
                              "type": "string",
                              "minLength": 1
                            },
                            "projectId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "assetId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "kind": {
                              "type": "string",
                              "enum": [
                                "original",
                                "derived"
                              ]
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "reserved",
                                "stored",
                                "inspecting",
                                "ready",
                                "failed",
                                "deletion_requested",
                                "deleted"
                              ]
                            },
                            "declaredContentType": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "detectedContentType": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "detectedFormat": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "family": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "const": "image"
                                },
                                {
                                  "type": "string",
                                  "const": "video"
                                },
                                {
                                  "type": "string",
                                  "const": "audio"
                                },
                                {
                                  "type": "string",
                                  "const": "document"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "byteSize": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "sha256": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "width": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": 1
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "height": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": 1
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "durationMs": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "pageCount": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": 1
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "isAnimated": {
                              "anyOf": [
                                {
                                  "type": "boolean"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "processorId": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "processorVersion": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "recipeJson": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "failureCode": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "failureMessage": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "createdAt": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "updatedAt": {
                              "type": "integer",
                              "minimum": 0
                            }
                          }
                        },
                        "intent": {
                          "type": "object",
                          "required": [
                            "id",
                            "projectId",
                            "assetId",
                            "representationId",
                            "state",
                            "expectedSize",
                            "maxBytes",
                            "contentTypeHint",
                            "expiresAt",
                            "uploadStartedAt",
                            "completedAt",
                            "failureCode",
                            "failureMessage",
                            "createdAt",
                            "updatedAt"
                          ],
                          "properties": {
                            "id": {
                              "type": "string",
                              "minLength": 1
                            },
                            "projectId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "assetId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "representationId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "pending",
                                "uploading",
                                "uploaded",
                                "consumed",
                                "expired",
                                "failed"
                              ]
                            },
                            "expectedSize": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "maxBytes": {
                              "type": "integer",
                              "minimum": 1
                            },
                            "contentTypeHint": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "expiresAt": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "uploadStartedAt": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "completedAt": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "failureCode": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "failureMessage": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "createdAt": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "updatedAt": {
                              "type": "integer",
                              "minimum": 0
                            }
                          }
                        },
                        "upload": {
                          "type": "object",
                          "required": [
                            "intentId",
                            "storeId",
                            "maxBytes",
                            "expectedSize",
                            "contentType"
                          ],
                          "properties": {
                            "intentId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "storeId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "maxBytes": {
                              "type": "integer",
                              "minimum": 1
                            },
                            "expectedSize": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "contentType": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Response for status 503",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/media/uploads/{intentId}/finalize": {
      "post": {
        "operationId": "finalizeMediaUpload",
        "summary": "Verify and finalize a project media upload",
        "tags": [
          "Media"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "intentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "media"
                  ],
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "ready",
                        "failed"
                      ]
                    },
                    "media": {
                      "type": "object",
                      "required": [
                        "asset",
                        "representations"
                      ],
                      "properties": {
                        "asset": {
                          "type": "object",
                          "required": [
                            "id",
                            "projectId",
                            "originalFilename",
                            "defaultAccessibilityText",
                            "state",
                            "archivedAt",
                            "deletionRequestedAt",
                            "deletedAt",
                            "failureCode",
                            "failureMessage",
                            "createdByActorId",
                            "createdAt",
                            "updatedAt"
                          ],
                          "properties": {
                            "id": {
                              "type": "string",
                              "minLength": 1
                            },
                            "projectId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "originalFilename": {
                              "type": "string",
                              "minLength": 1
                            },
                            "defaultAccessibilityText": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "reserved",
                                "stored",
                                "inspecting",
                                "ready",
                                "failed",
                                "deletion_requested",
                                "deleted"
                              ]
                            },
                            "archivedAt": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "deletionRequestedAt": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "deletedAt": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "failureCode": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "failureMessage": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "createdByActorId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "createdAt": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "updatedAt": {
                              "type": "integer",
                              "minimum": 0
                            }
                          }
                        },
                        "representations": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "id",
                              "projectId",
                              "assetId",
                              "kind",
                              "state",
                              "declaredContentType",
                              "detectedContentType",
                              "detectedFormat",
                              "family",
                              "byteSize",
                              "sha256",
                              "width",
                              "height",
                              "durationMs",
                              "pageCount",
                              "isAnimated",
                              "processorId",
                              "processorVersion",
                              "recipeJson",
                              "failureCode",
                              "failureMessage",
                              "createdAt",
                              "updatedAt"
                            ],
                            "properties": {
                              "id": {
                                "type": "string",
                                "minLength": 1
                              },
                              "projectId": {
                                "type": "string",
                                "minLength": 1
                              },
                              "assetId": {
                                "type": "string",
                                "minLength": 1
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "original",
                                  "derived"
                                ]
                              },
                              "state": {
                                "type": "string",
                                "enum": [
                                  "reserved",
                                  "stored",
                                  "inspecting",
                                  "ready",
                                  "failed",
                                  "deletion_requested",
                                  "deleted"
                                ]
                              },
                              "declaredContentType": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "detectedContentType": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "detectedFormat": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "family": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "const": "image"
                                  },
                                  {
                                    "type": "string",
                                    "const": "video"
                                  },
                                  {
                                    "type": "string",
                                    "const": "audio"
                                  },
                                  {
                                    "type": "string",
                                    "const": "document"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "byteSize": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "sha256": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "width": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 1
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "height": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 1
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "durationMs": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "pageCount": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 1
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "isAnimated": {
                                "anyOf": [
                                  {
                                    "type": "boolean"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "processorId": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "processorVersion": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "recipeJson": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "failureCode": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "failureMessage": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "createdAt": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "updatedAt": {
                                "type": "integer",
                                "minimum": 0
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "202": {
            "description": "Response for status 202",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "media"
                  ],
                  "properties": {
                    "status": {
                      "type": "string",
                      "const": "pending"
                    },
                    "media": {
                      "type": "object",
                      "required": [
                        "asset",
                        "representation",
                        "intent",
                        "upload"
                      ],
                      "properties": {
                        "asset": {
                          "type": "object",
                          "required": [
                            "id",
                            "projectId",
                            "originalFilename",
                            "defaultAccessibilityText",
                            "state",
                            "archivedAt",
                            "deletionRequestedAt",
                            "deletedAt",
                            "failureCode",
                            "failureMessage",
                            "createdByActorId",
                            "createdAt",
                            "updatedAt"
                          ],
                          "properties": {
                            "id": {
                              "type": "string",
                              "minLength": 1
                            },
                            "projectId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "originalFilename": {
                              "type": "string",
                              "minLength": 1
                            },
                            "defaultAccessibilityText": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "reserved",
                                "stored",
                                "inspecting",
                                "ready",
                                "failed",
                                "deletion_requested",
                                "deleted"
                              ]
                            },
                            "archivedAt": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "deletionRequestedAt": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "deletedAt": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "failureCode": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "failureMessage": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "createdByActorId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "createdAt": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "updatedAt": {
                              "type": "integer",
                              "minimum": 0
                            }
                          }
                        },
                        "representation": {
                          "type": "object",
                          "required": [
                            "id",
                            "projectId",
                            "assetId",
                            "kind",
                            "state",
                            "declaredContentType",
                            "detectedContentType",
                            "detectedFormat",
                            "family",
                            "byteSize",
                            "sha256",
                            "width",
                            "height",
                            "durationMs",
                            "pageCount",
                            "isAnimated",
                            "processorId",
                            "processorVersion",
                            "recipeJson",
                            "failureCode",
                            "failureMessage",
                            "createdAt",
                            "updatedAt"
                          ],
                          "properties": {
                            "id": {
                              "type": "string",
                              "minLength": 1
                            },
                            "projectId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "assetId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "kind": {
                              "type": "string",
                              "enum": [
                                "original",
                                "derived"
                              ]
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "reserved",
                                "stored",
                                "inspecting",
                                "ready",
                                "failed",
                                "deletion_requested",
                                "deleted"
                              ]
                            },
                            "declaredContentType": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "detectedContentType": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "detectedFormat": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "family": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "const": "image"
                                },
                                {
                                  "type": "string",
                                  "const": "video"
                                },
                                {
                                  "type": "string",
                                  "const": "audio"
                                },
                                {
                                  "type": "string",
                                  "const": "document"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "byteSize": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "sha256": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "width": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": 1
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "height": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": 1
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "durationMs": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "pageCount": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": 1
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "isAnimated": {
                              "anyOf": [
                                {
                                  "type": "boolean"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "processorId": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "processorVersion": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "recipeJson": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "failureCode": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "failureMessage": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "createdAt": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "updatedAt": {
                              "type": "integer",
                              "minimum": 0
                            }
                          }
                        },
                        "intent": {
                          "type": "object",
                          "required": [
                            "id",
                            "projectId",
                            "assetId",
                            "representationId",
                            "state",
                            "expectedSize",
                            "maxBytes",
                            "contentTypeHint",
                            "expiresAt",
                            "uploadStartedAt",
                            "completedAt",
                            "failureCode",
                            "failureMessage",
                            "createdAt",
                            "updatedAt"
                          ],
                          "properties": {
                            "id": {
                              "type": "string",
                              "minLength": 1
                            },
                            "projectId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "assetId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "representationId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "pending",
                                "uploading",
                                "uploaded",
                                "consumed",
                                "expired",
                                "failed"
                              ]
                            },
                            "expectedSize": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "maxBytes": {
                              "type": "integer",
                              "minimum": 1
                            },
                            "contentTypeHint": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "expiresAt": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "uploadStartedAt": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "completedAt": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "failureCode": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "failureMessage": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "createdAt": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "updatedAt": {
                              "type": "integer",
                              "minimum": 0
                            }
                          }
                        },
                        "upload": {
                          "type": "object",
                          "required": [
                            "intentId",
                            "storeId",
                            "maxBytes",
                            "expectedSize",
                            "contentType"
                          ],
                          "properties": {
                            "intentId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "storeId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "maxBytes": {
                              "type": "integer",
                              "minimum": 1
                            },
                            "expectedSize": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "contentType": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Response for status 503",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/media/imports/url": {
      "post": {
        "operationId": "importMediaFromUrl",
        "summary": "Import a project media asset from a URL",
        "tags": [
          "Media"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "url"
                ],
                "properties": {
                  "url": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2048
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "url"
                ],
                "properties": {
                  "url": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2048
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "url"
                ],
                "properties": {
                  "url": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2048
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Response for status 201",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "media"
                  ],
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "ready",
                        "failed"
                      ]
                    },
                    "media": {
                      "type": "object",
                      "required": [
                        "asset",
                        "representations"
                      ],
                      "properties": {
                        "asset": {
                          "type": "object",
                          "required": [
                            "id",
                            "projectId",
                            "originalFilename",
                            "defaultAccessibilityText",
                            "state",
                            "archivedAt",
                            "deletionRequestedAt",
                            "deletedAt",
                            "failureCode",
                            "failureMessage",
                            "createdByActorId",
                            "createdAt",
                            "updatedAt"
                          ],
                          "properties": {
                            "id": {
                              "type": "string",
                              "minLength": 1
                            },
                            "projectId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "originalFilename": {
                              "type": "string",
                              "minLength": 1
                            },
                            "defaultAccessibilityText": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "reserved",
                                "stored",
                                "inspecting",
                                "ready",
                                "failed",
                                "deletion_requested",
                                "deleted"
                              ]
                            },
                            "archivedAt": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "deletionRequestedAt": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "deletedAt": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "failureCode": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "failureMessage": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "createdByActorId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "createdAt": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "updatedAt": {
                              "type": "integer",
                              "minimum": 0
                            }
                          }
                        },
                        "representations": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "id",
                              "projectId",
                              "assetId",
                              "kind",
                              "state",
                              "declaredContentType",
                              "detectedContentType",
                              "detectedFormat",
                              "family",
                              "byteSize",
                              "sha256",
                              "width",
                              "height",
                              "durationMs",
                              "pageCount",
                              "isAnimated",
                              "processorId",
                              "processorVersion",
                              "recipeJson",
                              "failureCode",
                              "failureMessage",
                              "createdAt",
                              "updatedAt"
                            ],
                            "properties": {
                              "id": {
                                "type": "string",
                                "minLength": 1
                              },
                              "projectId": {
                                "type": "string",
                                "minLength": 1
                              },
                              "assetId": {
                                "type": "string",
                                "minLength": 1
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "original",
                                  "derived"
                                ]
                              },
                              "state": {
                                "type": "string",
                                "enum": [
                                  "reserved",
                                  "stored",
                                  "inspecting",
                                  "ready",
                                  "failed",
                                  "deletion_requested",
                                  "deleted"
                                ]
                              },
                              "declaredContentType": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "detectedContentType": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "detectedFormat": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "family": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "const": "image"
                                  },
                                  {
                                    "type": "string",
                                    "const": "video"
                                  },
                                  {
                                    "type": "string",
                                    "const": "audio"
                                  },
                                  {
                                    "type": "string",
                                    "const": "document"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "byteSize": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "sha256": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "width": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 1
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "height": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 1
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "durationMs": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "pageCount": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 1
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "isAnimated": {
                                "anyOf": [
                                  {
                                    "type": "boolean"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "processorId": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "processorVersion": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "recipeJson": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "failureCode": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "failureMessage": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "createdAt": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "updatedAt": {
                                "type": "integer",
                                "minimum": 0
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "202": {
            "description": "Response for status 202",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "media"
                  ],
                  "properties": {
                    "status": {
                      "type": "string",
                      "const": "pending"
                    },
                    "media": {
                      "type": "object",
                      "required": [
                        "asset",
                        "representation",
                        "intent",
                        "upload"
                      ],
                      "properties": {
                        "asset": {
                          "type": "object",
                          "required": [
                            "id",
                            "projectId",
                            "originalFilename",
                            "defaultAccessibilityText",
                            "state",
                            "archivedAt",
                            "deletionRequestedAt",
                            "deletedAt",
                            "failureCode",
                            "failureMessage",
                            "createdByActorId",
                            "createdAt",
                            "updatedAt"
                          ],
                          "properties": {
                            "id": {
                              "type": "string",
                              "minLength": 1
                            },
                            "projectId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "originalFilename": {
                              "type": "string",
                              "minLength": 1
                            },
                            "defaultAccessibilityText": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "reserved",
                                "stored",
                                "inspecting",
                                "ready",
                                "failed",
                                "deletion_requested",
                                "deleted"
                              ]
                            },
                            "archivedAt": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "deletionRequestedAt": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "deletedAt": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "failureCode": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "failureMessage": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "createdByActorId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "createdAt": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "updatedAt": {
                              "type": "integer",
                              "minimum": 0
                            }
                          }
                        },
                        "representation": {
                          "type": "object",
                          "required": [
                            "id",
                            "projectId",
                            "assetId",
                            "kind",
                            "state",
                            "declaredContentType",
                            "detectedContentType",
                            "detectedFormat",
                            "family",
                            "byteSize",
                            "sha256",
                            "width",
                            "height",
                            "durationMs",
                            "pageCount",
                            "isAnimated",
                            "processorId",
                            "processorVersion",
                            "recipeJson",
                            "failureCode",
                            "failureMessage",
                            "createdAt",
                            "updatedAt"
                          ],
                          "properties": {
                            "id": {
                              "type": "string",
                              "minLength": 1
                            },
                            "projectId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "assetId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "kind": {
                              "type": "string",
                              "enum": [
                                "original",
                                "derived"
                              ]
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "reserved",
                                "stored",
                                "inspecting",
                                "ready",
                                "failed",
                                "deletion_requested",
                                "deleted"
                              ]
                            },
                            "declaredContentType": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "detectedContentType": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "detectedFormat": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "family": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "const": "image"
                                },
                                {
                                  "type": "string",
                                  "const": "video"
                                },
                                {
                                  "type": "string",
                                  "const": "audio"
                                },
                                {
                                  "type": "string",
                                  "const": "document"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "byteSize": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "sha256": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "width": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": 1
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "height": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": 1
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "durationMs": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "pageCount": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": 1
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "isAnimated": {
                              "anyOf": [
                                {
                                  "type": "boolean"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "processorId": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "processorVersion": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "recipeJson": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "failureCode": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "failureMessage": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "createdAt": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "updatedAt": {
                              "type": "integer",
                              "minimum": 0
                            }
                          }
                        },
                        "intent": {
                          "type": "object",
                          "required": [
                            "id",
                            "projectId",
                            "assetId",
                            "representationId",
                            "state",
                            "expectedSize",
                            "maxBytes",
                            "contentTypeHint",
                            "expiresAt",
                            "uploadStartedAt",
                            "completedAt",
                            "failureCode",
                            "failureMessage",
                            "createdAt",
                            "updatedAt"
                          ],
                          "properties": {
                            "id": {
                              "type": "string",
                              "minLength": 1
                            },
                            "projectId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "assetId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "representationId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "pending",
                                "uploading",
                                "uploaded",
                                "consumed",
                                "expired",
                                "failed"
                              ]
                            },
                            "expectedSize": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "maxBytes": {
                              "type": "integer",
                              "minimum": 1
                            },
                            "contentTypeHint": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "expiresAt": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "uploadStartedAt": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "completedAt": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "failureCode": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "failureMessage": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "createdAt": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "updatedAt": {
                              "type": "integer",
                              "minimum": 0
                            }
                          }
                        },
                        "upload": {
                          "type": "object",
                          "required": [
                            "intentId",
                            "storeId",
                            "maxBytes",
                            "expectedSize",
                            "contentType"
                          ],
                          "properties": {
                            "intentId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "storeId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "maxBytes": {
                              "type": "integer",
                              "minimum": 1
                            },
                            "expectedSize": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "contentType": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "413": {
            "description": "Response for status 413",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "415": {
            "description": "Response for status 415",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Response for status 422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "502": {
            "description": "Response for status 502",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Response for status 503",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/media/upload-policy": {
      "get": {
        "operationId": "getProjectMediaUploadPolicy",
        "summary": "Describe the project media upload policy",
        "tags": [
          "Media"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "allowedContentTypes",
                    "maxFileSize"
                  ],
                  "properties": {
                    "allowedContentTypes": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "maxFileSize": {
                      "type": "integer",
                      "minimum": 1
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Response for status 503",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/media/sources": {
      "get": {
        "operationId": "getProjectMediaImportSources",
        "summary": "List configured project media import sources",
        "tags": [
          "Media"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "sources"
                  ],
                  "properties": {
                    "sources": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "transfer",
                          "requiresAuthentication"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "enum": [
                              "device",
                              "webcam",
                              "url"
                            ]
                          },
                          "transfer": {
                            "type": "string",
                            "enum": [
                              "browser",
                              "server"
                            ]
                          },
                          "requiresAuthentication": {
                            "type": "boolean"
                          }
                        }
                      },
                      "minItems": 1
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Response for status 503",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/media": {
      "get": {
        "operationId": "listProjectMedia",
        "summary": "List project media assets",
        "tags": [
          "Media"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "view",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "library",
                "trash"
              ]
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "newest",
                "oldest",
                "name_asc",
                "name_desc",
                "largest",
                "smallest"
              ]
            }
          },
          {
            "name": "family",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "image",
                "video",
                "audio",
                "document"
              ]
            }
          },
          {
            "name": "date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "last_24_hours",
                "last_7_days",
                "last_30_days"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "media",
                    "restorableAssetIds",
                    "nextCursor",
                    "total",
                    "trashCount",
                    "retentionMs"
                  ],
                  "properties": {
                    "media": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "asset",
                          "representations"
                        ],
                        "properties": {
                          "asset": {
                            "type": "object",
                            "required": [
                              "id",
                              "projectId",
                              "originalFilename",
                              "defaultAccessibilityText",
                              "state",
                              "archivedAt",
                              "deletionRequestedAt",
                              "deletedAt",
                              "failureCode",
                              "failureMessage",
                              "createdByActorId",
                              "createdAt",
                              "updatedAt"
                            ],
                            "properties": {
                              "id": {
                                "type": "string",
                                "minLength": 1
                              },
                              "projectId": {
                                "type": "string",
                                "minLength": 1
                              },
                              "originalFilename": {
                                "type": "string",
                                "minLength": 1
                              },
                              "defaultAccessibilityText": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "state": {
                                "type": "string",
                                "enum": [
                                  "reserved",
                                  "stored",
                                  "inspecting",
                                  "ready",
                                  "failed",
                                  "deletion_requested",
                                  "deleted"
                                ]
                              },
                              "archivedAt": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "deletionRequestedAt": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "deletedAt": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "failureCode": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "failureMessage": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "createdByActorId": {
                                "type": "string",
                                "minLength": 1
                              },
                              "createdAt": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "updatedAt": {
                                "type": "integer",
                                "minimum": 0
                              }
                            }
                          },
                          "representations": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "id",
                                "projectId",
                                "assetId",
                                "kind",
                                "state",
                                "declaredContentType",
                                "detectedContentType",
                                "detectedFormat",
                                "family",
                                "byteSize",
                                "sha256",
                                "width",
                                "height",
                                "durationMs",
                                "pageCount",
                                "isAnimated",
                                "processorId",
                                "processorVersion",
                                "recipeJson",
                                "failureCode",
                                "failureMessage",
                                "createdAt",
                                "updatedAt"
                              ],
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "projectId": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "assetId": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "original",
                                    "derived"
                                  ]
                                },
                                "state": {
                                  "type": "string",
                                  "enum": [
                                    "reserved",
                                    "stored",
                                    "inspecting",
                                    "ready",
                                    "failed",
                                    "deletion_requested",
                                    "deleted"
                                  ]
                                },
                                "declaredContentType": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "detectedContentType": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "detectedFormat": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "family": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "const": "image"
                                    },
                                    {
                                      "type": "string",
                                      "const": "video"
                                    },
                                    {
                                      "type": "string",
                                      "const": "audio"
                                    },
                                    {
                                      "type": "string",
                                      "const": "document"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "byteSize": {
                                  "anyOf": [
                                    {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "sha256": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "width": {
                                  "anyOf": [
                                    {
                                      "type": "integer",
                                      "minimum": 1
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "height": {
                                  "anyOf": [
                                    {
                                      "type": "integer",
                                      "minimum": 1
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "durationMs": {
                                  "anyOf": [
                                    {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "pageCount": {
                                  "anyOf": [
                                    {
                                      "type": "integer",
                                      "minimum": 1
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "isAnimated": {
                                  "anyOf": [
                                    {
                                      "type": "boolean"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "processorId": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "processorVersion": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "recipeJson": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "failureCode": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "failureMessage": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "createdAt": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "updatedAt": {
                                  "type": "integer",
                                  "minimum": 0
                                }
                              }
                            }
                          }
                        }
                      }
                    },
                    "restorableAssetIds": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "nextCursor": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "total": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "trashCount": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "retentionMs": {
                      "type": "integer",
                      "minimum": 0
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Response for status 503",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/media/{assetId}/usage": {
      "get": {
        "operationId": "getProjectMediaUsage",
        "summary": "Describe project media usage",
        "tags": [
          "Media"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "assetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "assetId",
                    "active",
                    "history",
                    "auditEventCount"
                  ],
                  "properties": {
                    "assetId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "active": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "kind",
                          "id",
                          "postId",
                          "publicationId",
                          "title",
                          "publicationState",
                          "scheduledAt",
                          "channelName",
                          "locations"
                        ],
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "post",
                              "publication"
                            ]
                          },
                          "id": {
                            "type": "string",
                            "minLength": 1
                          },
                          "postId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "publicationId": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "title": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "publicationState": {
                            "anyOf": [
                              {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "const": "draft"
                                  },
                                  {
                                    "type": "string",
                                    "const": "scheduled"
                                  },
                                  {
                                    "type": "string",
                                    "const": "ready"
                                  },
                                  {
                                    "type": "string",
                                    "const": "publishing"
                                  },
                                  {
                                    "type": "string",
                                    "const": "published"
                                  },
                                  {
                                    "type": "string",
                                    "const": "failed"
                                  },
                                  {
                                    "type": "string",
                                    "const": "ambiguous"
                                  },
                                  {
                                    "type": "string",
                                    "const": "cancelled"
                                  }
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "scheduledAt": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": 0
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "channelName": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "locations": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "enum": [
                                "source",
                                "draft",
                                "target",
                                "execution"
                              ]
                            },
                            "minItems": 1
                          }
                        }
                      }
                    },
                    "history": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "kind",
                          "id",
                          "postId",
                          "publicationId",
                          "title",
                          "publicationState",
                          "scheduledAt",
                          "channelName",
                          "locations"
                        ],
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "post",
                              "publication"
                            ]
                          },
                          "id": {
                            "type": "string",
                            "minLength": 1
                          },
                          "postId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "publicationId": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "title": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "publicationState": {
                            "anyOf": [
                              {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "const": "draft"
                                  },
                                  {
                                    "type": "string",
                                    "const": "scheduled"
                                  },
                                  {
                                    "type": "string",
                                    "const": "ready"
                                  },
                                  {
                                    "type": "string",
                                    "const": "publishing"
                                  },
                                  {
                                    "type": "string",
                                    "const": "published"
                                  },
                                  {
                                    "type": "string",
                                    "const": "failed"
                                  },
                                  {
                                    "type": "string",
                                    "const": "ambiguous"
                                  },
                                  {
                                    "type": "string",
                                    "const": "cancelled"
                                  }
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "scheduledAt": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": 0
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "channelName": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "locations": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "enum": [
                                "source",
                                "draft",
                                "target",
                                "execution"
                              ]
                            },
                            "minItems": 1
                          }
                        }
                      }
                    },
                    "auditEventCount": {
                      "type": "integer",
                      "minimum": 0
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Response for status 503",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/media/{assetId}/content": {
      "get": {
        "operationId": "streamProjectMedia",
        "summary": "Stream verified media bytes for a project asset",
        "tags": [
          "Media"
        ],
        "responses": {
          "200": {
            "description": "The verified media bytes",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "206": {
            "description": "Authenticated byte range of media content"
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "The API key does not allow this action",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Media content not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "416": {
            "description": "The requested media byte range is not satisfiable"
          },
          "503": {
            "description": "Media storage is not configured",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "assetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "variant",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "thumbnail",
                "preview"
              ]
            }
          }
        ]
      }
    },
    "/api/projects/{projectId}/media/{assetId}": {
      "get": {
        "operationId": "getProjectMedia",
        "summary": "Get project media metadata",
        "tags": [
          "Media"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "assetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "asset",
                    "representations"
                  ],
                  "properties": {
                    "asset": {
                      "type": "object",
                      "required": [
                        "id",
                        "projectId",
                        "originalFilename",
                        "defaultAccessibilityText",
                        "state",
                        "archivedAt",
                        "deletionRequestedAt",
                        "deletedAt",
                        "failureCode",
                        "failureMessage",
                        "createdByActorId",
                        "createdAt",
                        "updatedAt"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1
                        },
                        "projectId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "originalFilename": {
                          "type": "string",
                          "minLength": 1
                        },
                        "defaultAccessibilityText": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "reserved",
                            "stored",
                            "inspecting",
                            "ready",
                            "failed",
                            "deletion_requested",
                            "deleted"
                          ]
                        },
                        "archivedAt": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": 0
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "deletionRequestedAt": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": 0
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "deletedAt": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": 0
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "failureCode": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "failureMessage": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "createdByActorId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    },
                    "representations": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "projectId",
                          "assetId",
                          "kind",
                          "state",
                          "declaredContentType",
                          "detectedContentType",
                          "detectedFormat",
                          "family",
                          "byteSize",
                          "sha256",
                          "width",
                          "height",
                          "durationMs",
                          "pageCount",
                          "isAnimated",
                          "processorId",
                          "processorVersion",
                          "recipeJson",
                          "failureCode",
                          "failureMessage",
                          "createdAt",
                          "updatedAt"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "minLength": 1
                          },
                          "projectId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "assetId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "original",
                              "derived"
                            ]
                          },
                          "state": {
                            "type": "string",
                            "enum": [
                              "reserved",
                              "stored",
                              "inspecting",
                              "ready",
                              "failed",
                              "deletion_requested",
                              "deleted"
                            ]
                          },
                          "declaredContentType": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "detectedContentType": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "detectedFormat": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "family": {
                            "anyOf": [
                              {
                                "type": "string",
                                "const": "image"
                              },
                              {
                                "type": "string",
                                "const": "video"
                              },
                              {
                                "type": "string",
                                "const": "audio"
                              },
                              {
                                "type": "string",
                                "const": "document"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "byteSize": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": 0
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "sha256": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "width": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "height": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "durationMs": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": 0
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "pageCount": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "isAnimated": {
                            "anyOf": [
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "processorId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "processorVersion": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "recipeJson": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "failureCode": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "failureMessage": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "updatedAt": {
                            "type": "integer",
                            "minimum": 0
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Response for status 503",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "requestMediaDeletion",
        "summary": "Archive a project media asset for deletion",
        "tags": [
          "Media"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "assetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "media"
                  ],
                  "properties": {
                    "status": {
                      "type": "string",
                      "const": "deletion_requested"
                    },
                    "media": {
                      "type": "object",
                      "required": [
                        "asset",
                        "representations"
                      ],
                      "properties": {
                        "asset": {
                          "type": "object",
                          "required": [
                            "id",
                            "projectId",
                            "originalFilename",
                            "defaultAccessibilityText",
                            "state",
                            "archivedAt",
                            "deletionRequestedAt",
                            "deletedAt",
                            "failureCode",
                            "failureMessage",
                            "createdByActorId",
                            "createdAt",
                            "updatedAt"
                          ],
                          "properties": {
                            "id": {
                              "type": "string",
                              "minLength": 1
                            },
                            "projectId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "originalFilename": {
                              "type": "string",
                              "minLength": 1
                            },
                            "defaultAccessibilityText": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "reserved",
                                "stored",
                                "inspecting",
                                "ready",
                                "failed",
                                "deletion_requested",
                                "deleted"
                              ]
                            },
                            "archivedAt": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "deletionRequestedAt": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "deletedAt": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "failureCode": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "failureMessage": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "createdByActorId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "createdAt": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "updatedAt": {
                              "type": "integer",
                              "minimum": 0
                            }
                          }
                        },
                        "representations": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "id",
                              "projectId",
                              "assetId",
                              "kind",
                              "state",
                              "declaredContentType",
                              "detectedContentType",
                              "detectedFormat",
                              "family",
                              "byteSize",
                              "sha256",
                              "width",
                              "height",
                              "durationMs",
                              "pageCount",
                              "isAnimated",
                              "processorId",
                              "processorVersion",
                              "recipeJson",
                              "failureCode",
                              "failureMessage",
                              "createdAt",
                              "updatedAt"
                            ],
                            "properties": {
                              "id": {
                                "type": "string",
                                "minLength": 1
                              },
                              "projectId": {
                                "type": "string",
                                "minLength": 1
                              },
                              "assetId": {
                                "type": "string",
                                "minLength": 1
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "original",
                                  "derived"
                                ]
                              },
                              "state": {
                                "type": "string",
                                "enum": [
                                  "reserved",
                                  "stored",
                                  "inspecting",
                                  "ready",
                                  "failed",
                                  "deletion_requested",
                                  "deleted"
                                ]
                              },
                              "declaredContentType": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "detectedContentType": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "detectedFormat": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "family": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "const": "image"
                                  },
                                  {
                                    "type": "string",
                                    "const": "video"
                                  },
                                  {
                                    "type": "string",
                                    "const": "audio"
                                  },
                                  {
                                    "type": "string",
                                    "const": "document"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "byteSize": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "sha256": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "width": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 1
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "height": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 1
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "durationMs": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "pageCount": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 1
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "isAnimated": {
                                "anyOf": [
                                  {
                                    "type": "boolean"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "processorId": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "processorVersion": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "recipeJson": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "failureCode": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "failureMessage": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "createdAt": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "updatedAt": {
                                "type": "integer",
                                "minimum": 0
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "202": {
            "description": "Response for status 202",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "media"
                  ],
                  "properties": {
                    "status": {
                      "type": "string",
                      "const": "deletion_requested"
                    },
                    "media": {
                      "type": "object",
                      "required": [
                        "asset",
                        "representations"
                      ],
                      "properties": {
                        "asset": {
                          "type": "object",
                          "required": [
                            "id",
                            "projectId",
                            "originalFilename",
                            "defaultAccessibilityText",
                            "state",
                            "archivedAt",
                            "deletionRequestedAt",
                            "deletedAt",
                            "failureCode",
                            "failureMessage",
                            "createdByActorId",
                            "createdAt",
                            "updatedAt"
                          ],
                          "properties": {
                            "id": {
                              "type": "string",
                              "minLength": 1
                            },
                            "projectId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "originalFilename": {
                              "type": "string",
                              "minLength": 1
                            },
                            "defaultAccessibilityText": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "reserved",
                                "stored",
                                "inspecting",
                                "ready",
                                "failed",
                                "deletion_requested",
                                "deleted"
                              ]
                            },
                            "archivedAt": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "deletionRequestedAt": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "deletedAt": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "failureCode": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "failureMessage": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "createdByActorId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "createdAt": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "updatedAt": {
                              "type": "integer",
                              "minimum": 0
                            }
                          }
                        },
                        "representations": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "id",
                              "projectId",
                              "assetId",
                              "kind",
                              "state",
                              "declaredContentType",
                              "detectedContentType",
                              "detectedFormat",
                              "family",
                              "byteSize",
                              "sha256",
                              "width",
                              "height",
                              "durationMs",
                              "pageCount",
                              "isAnimated",
                              "processorId",
                              "processorVersion",
                              "recipeJson",
                              "failureCode",
                              "failureMessage",
                              "createdAt",
                              "updatedAt"
                            ],
                            "properties": {
                              "id": {
                                "type": "string",
                                "minLength": 1
                              },
                              "projectId": {
                                "type": "string",
                                "minLength": 1
                              },
                              "assetId": {
                                "type": "string",
                                "minLength": 1
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "original",
                                  "derived"
                                ]
                              },
                              "state": {
                                "type": "string",
                                "enum": [
                                  "reserved",
                                  "stored",
                                  "inspecting",
                                  "ready",
                                  "failed",
                                  "deletion_requested",
                                  "deleted"
                                ]
                              },
                              "declaredContentType": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "detectedContentType": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "detectedFormat": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "family": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "const": "image"
                                  },
                                  {
                                    "type": "string",
                                    "const": "video"
                                  },
                                  {
                                    "type": "string",
                                    "const": "audio"
                                  },
                                  {
                                    "type": "string",
                                    "const": "document"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "byteSize": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "sha256": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "width": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 1
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "height": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 1
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "durationMs": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "pageCount": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 1
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "isAnimated": {
                                "anyOf": [
                                  {
                                    "type": "boolean"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "processorId": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "processorVersion": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "recipeJson": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "failureCode": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "failureMessage": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "createdAt": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "updatedAt": {
                                "type": "integer",
                                "minimum": 0
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Response for status 503",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/media/deletion-requests": {
      "post": {
        "operationId": "requestMediaDeletions",
        "summary": "Archive project media assets for deletion",
        "tags": [
          "Media"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "assetIds"
                ],
                "properties": {
                  "assetIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 255
                    },
                    "minItems": 1,
                    "maxItems": 1000
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "assetIds"
                ],
                "properties": {
                  "assetIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 255
                    },
                    "minItems": 1,
                    "maxItems": 1000
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "assetIds"
                ],
                "properties": {
                  "assetIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 255
                    },
                    "minItems": 1,
                    "maxItems": 1000
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "deletions"
                  ],
                  "properties": {
                    "deletions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "assetId",
                          "status"
                        ],
                        "properties": {
                          "assetId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "deletion_requested",
                              "already_requested",
                              "blocked",
                              "not_found"
                            ]
                          }
                        }
                      },
                      "minItems": 1
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Response for status 503",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/media/{assetId}/permanent": {
      "post": {
        "operationId": "permanentlyDeleteProjectMedia",
        "summary": "Permanently delete a trashed project media asset",
        "tags": [
          "Media"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "assetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status"
                  ],
                  "properties": {
                    "status": {
                      "type": "string",
                      "const": "deleted"
                    }
                  }
                }
              }
            }
          },
          "202": {
            "description": "Response for status 202",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status"
                  ],
                  "properties": {
                    "status": {
                      "type": "string",
                      "const": "cleanup_pending"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Response for status 503",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/media/{assetId}/restore": {
      "post": {
        "operationId": "restoreProjectMedia",
        "summary": "Restore a project media asset from the trash",
        "tags": [
          "Media"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "assetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "media"
                  ],
                  "properties": {
                    "status": {
                      "type": "string",
                      "const": "restored"
                    },
                    "media": {
                      "type": "object",
                      "required": [
                        "asset",
                        "representations"
                      ],
                      "properties": {
                        "asset": {
                          "type": "object",
                          "required": [
                            "id",
                            "projectId",
                            "originalFilename",
                            "defaultAccessibilityText",
                            "state",
                            "archivedAt",
                            "deletionRequestedAt",
                            "deletedAt",
                            "failureCode",
                            "failureMessage",
                            "createdByActorId",
                            "createdAt",
                            "updatedAt"
                          ],
                          "properties": {
                            "id": {
                              "type": "string",
                              "minLength": 1
                            },
                            "projectId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "originalFilename": {
                              "type": "string",
                              "minLength": 1
                            },
                            "defaultAccessibilityText": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "reserved",
                                "stored",
                                "inspecting",
                                "ready",
                                "failed",
                                "deletion_requested",
                                "deleted"
                              ]
                            },
                            "archivedAt": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "deletionRequestedAt": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "deletedAt": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "failureCode": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "failureMessage": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "createdByActorId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "createdAt": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "updatedAt": {
                              "type": "integer",
                              "minimum": 0
                            }
                          }
                        },
                        "representations": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "id",
                              "projectId",
                              "assetId",
                              "kind",
                              "state",
                              "declaredContentType",
                              "detectedContentType",
                              "detectedFormat",
                              "family",
                              "byteSize",
                              "sha256",
                              "width",
                              "height",
                              "durationMs",
                              "pageCount",
                              "isAnimated",
                              "processorId",
                              "processorVersion",
                              "recipeJson",
                              "failureCode",
                              "failureMessage",
                              "createdAt",
                              "updatedAt"
                            ],
                            "properties": {
                              "id": {
                                "type": "string",
                                "minLength": 1
                              },
                              "projectId": {
                                "type": "string",
                                "minLength": 1
                              },
                              "assetId": {
                                "type": "string",
                                "minLength": 1
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "original",
                                  "derived"
                                ]
                              },
                              "state": {
                                "type": "string",
                                "enum": [
                                  "reserved",
                                  "stored",
                                  "inspecting",
                                  "ready",
                                  "failed",
                                  "deletion_requested",
                                  "deleted"
                                ]
                              },
                              "declaredContentType": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "detectedContentType": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "detectedFormat": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "family": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "const": "image"
                                  },
                                  {
                                    "type": "string",
                                    "const": "video"
                                  },
                                  {
                                    "type": "string",
                                    "const": "audio"
                                  },
                                  {
                                    "type": "string",
                                    "const": "document"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "byteSize": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "sha256": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "width": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 1
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "height": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 1
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "durationMs": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "pageCount": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 1
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "isAnimated": {
                                "anyOf": [
                                  {
                                    "type": "boolean"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "processorId": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "processorVersion": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "recipeJson": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "failureCode": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "failureMessage": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "createdAt": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "updatedAt": {
                                "type": "integer",
                                "minimum": 0
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "410": {
            "description": "Response for status 410",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Response for status 503",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/email-alerts": {
      "get": {
        "operationId": "getProjectEmailAlerts",
        "summary": "Read personal project email alerts",
        "tags": [
          "Notifications"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "lastDeliveryState",
                    "enabled",
                    "available",
                    "email",
                    "verified"
                  ],
                  "properties": {
                    "lastDeliveryState": {
                      "anyOf": [
                        {
                          "type": "string",
                          "const": "pending"
                        },
                        {
                          "type": "string",
                          "const": "running"
                        },
                        {
                          "type": "string",
                          "const": "delivered"
                        },
                        {
                          "type": "string",
                          "const": "failed"
                        },
                        {
                          "type": "string",
                          "const": "ambiguous"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "available": {
                      "type": "boolean"
                    },
                    "email": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "verified": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "setProjectEmailAlerts",
        "summary": "Enable or disable personal project email alerts",
        "tags": [
          "Notifications"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "enabled"
                ],
                "properties": {
                  "enabled": {
                    "type": "boolean"
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "enabled"
                ],
                "properties": {
                  "enabled": {
                    "type": "boolean"
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "enabled"
                ],
                "properties": {
                  "enabled": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "lastDeliveryState",
                    "enabled",
                    "available",
                    "email",
                    "verified"
                  ],
                  "properties": {
                    "lastDeliveryState": {
                      "anyOf": [
                        {
                          "type": "string",
                          "const": "pending"
                        },
                        {
                          "type": "string",
                          "const": "running"
                        },
                        {
                          "type": "string",
                          "const": "delivered"
                        },
                        {
                          "type": "string",
                          "const": "failed"
                        },
                        {
                          "type": "string",
                          "const": "ambiguous"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "available": {
                      "type": "boolean"
                    },
                    "email": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "verified": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/notifications": {
      "get": {
        "operationId": "listUserNotifications",
        "summary": "List the signed-in user notification inbox",
        "tags": [
          "Notifications"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "view",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "all"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "notifications",
                    "unreadCount",
                    "totalUnreadCount",
                    "nextCursor"
                  ],
                  "properties": {
                    "notifications": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "projectId",
                          "sourceEventId",
                          "kind",
                          "severity",
                          "subject",
                          "title",
                          "body",
                          "readAt",
                          "archivedAt",
                          "createdAt"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "minLength": 1
                          },
                          "projectId": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "sourceEventId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "publication_published",
                              "publication_failed",
                              "publication_ambiguous"
                            ]
                          },
                          "severity": {
                            "type": "string",
                            "enum": [
                              "success",
                              "warning",
                              "error"
                            ]
                          },
                          "subject": {
                            "type": "object",
                            "required": [
                              "type",
                              "id"
                            ],
                            "properties": {
                              "type": {
                                "type": "string",
                                "minLength": 1
                              },
                              "id": {
                                "type": "string",
                                "minLength": 1
                              }
                            }
                          },
                          "title": {
                            "type": "string",
                            "minLength": 1
                          },
                          "body": {
                            "type": "string",
                            "minLength": 1
                          },
                          "readAt": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": 0
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "archivedAt": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": 0
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": 0
                          }
                        }
                      }
                    },
                    "unreadCount": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "totalUnreadCount": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "nextCursor": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/notifications/{notificationId}/read": {
      "post": {
        "operationId": "markUserNotificationRead",
        "summary": "Mark a user notification as read",
        "tags": [
          "Notifications"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "notificationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "projectId",
                    "sourceEventId",
                    "kind",
                    "severity",
                    "subject",
                    "title",
                    "body",
                    "readAt",
                    "archivedAt",
                    "createdAt"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1
                    },
                    "projectId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "sourceEventId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "publication_published",
                        "publication_failed",
                        "publication_ambiguous"
                      ]
                    },
                    "severity": {
                      "type": "string",
                      "enum": [
                        "success",
                        "warning",
                        "error"
                      ]
                    },
                    "subject": {
                      "type": "object",
                      "required": [
                        "type",
                        "id"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "minLength": 1
                        },
                        "id": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    },
                    "title": {
                      "type": "string",
                      "minLength": 1
                    },
                    "body": {
                      "type": "string",
                      "minLength": 1
                    },
                    "readAt": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 0
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "archivedAt": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 0
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "integer",
                      "minimum": 0
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/notifications/{notificationId}/archive": {
      "post": {
        "operationId": "archiveUserNotification",
        "summary": "Archive a user notification",
        "tags": [
          "Notifications"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "notificationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "projectId",
                    "sourceEventId",
                    "kind",
                    "severity",
                    "subject",
                    "title",
                    "body",
                    "readAt",
                    "archivedAt",
                    "createdAt"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1
                    },
                    "projectId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "sourceEventId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "publication_published",
                        "publication_failed",
                        "publication_ambiguous"
                      ]
                    },
                    "severity": {
                      "type": "string",
                      "enum": [
                        "success",
                        "warning",
                        "error"
                      ]
                    },
                    "subject": {
                      "type": "object",
                      "required": [
                        "type",
                        "id"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "minLength": 1
                        },
                        "id": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    },
                    "title": {
                      "type": "string",
                      "minLength": 1
                    },
                    "body": {
                      "type": "string",
                      "minLength": 1
                    },
                    "readAt": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 0
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "archivedAt": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 0
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "integer",
                      "minimum": 0
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/notification-preferences": {
      "get": {
        "operationId": "listUserNotificationPreferences",
        "summary": "List signed-in user notification preferences",
        "tags": [
          "Notifications"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "preferences"
                  ],
                  "properties": {
                    "preferences": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "kind",
                          "inAppEnabled"
                        ],
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "publication_published",
                              "publication_failed",
                              "publication_ambiguous"
                            ]
                          },
                          "inAppEnabled": {
                            "type": "boolean"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/notification-preferences/{kind}": {
      "patch": {
        "operationId": "updateUserNotificationPreference",
        "summary": "Update one signed-in user notification preference",
        "tags": [
          "Notifications"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "kind",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "publication_published",
                "publication_failed",
                "publication_ambiguous"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "inAppEnabled"
                ],
                "properties": {
                  "inAppEnabled": {
                    "type": "boolean"
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "inAppEnabled"
                ],
                "properties": {
                  "inAppEnabled": {
                    "type": "boolean"
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "inAppEnabled"
                ],
                "properties": {
                  "inAppEnabled": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "kind",
                    "inAppEnabled"
                  ],
                  "properties": {
                    "kind": {
                      "type": "string",
                      "enum": [
                        "publication_published",
                        "publication_failed",
                        "publication_ambiguous"
                      ]
                    },
                    "inAppEnabled": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/notifications": {
      "get": {
        "operationId": "listProjectNotifications",
        "summary": "List the current human notification inbox",
        "tags": [
          "Notifications"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "projectId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "view",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "all"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "notifications",
                    "unreadCount",
                    "totalUnreadCount",
                    "nextCursor"
                  ],
                  "properties": {
                    "notifications": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "projectId",
                          "sourceEventId",
                          "kind",
                          "severity",
                          "subject",
                          "title",
                          "body",
                          "readAt",
                          "archivedAt",
                          "createdAt"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "minLength": 1
                          },
                          "projectId": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "sourceEventId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "publication_published",
                              "publication_failed",
                              "publication_ambiguous"
                            ]
                          },
                          "severity": {
                            "type": "string",
                            "enum": [
                              "success",
                              "warning",
                              "error"
                            ]
                          },
                          "subject": {
                            "type": "object",
                            "required": [
                              "type",
                              "id"
                            ],
                            "properties": {
                              "type": {
                                "type": "string",
                                "minLength": 1
                              },
                              "id": {
                                "type": "string",
                                "minLength": 1
                              }
                            }
                          },
                          "title": {
                            "type": "string",
                            "minLength": 1
                          },
                          "body": {
                            "type": "string",
                            "minLength": 1
                          },
                          "readAt": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": 0
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "archivedAt": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": 0
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": 0
                          }
                        }
                      }
                    },
                    "unreadCount": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "totalUnreadCount": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "nextCursor": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/notifications/{notificationId}/read": {
      "post": {
        "operationId": "markProjectNotificationRead",
        "summary": "Mark a notification as read",
        "tags": [
          "Notifications"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "notificationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "projectId",
                    "sourceEventId",
                    "kind",
                    "severity",
                    "subject",
                    "title",
                    "body",
                    "readAt",
                    "archivedAt",
                    "createdAt"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1
                    },
                    "projectId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "sourceEventId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "publication_published",
                        "publication_failed",
                        "publication_ambiguous"
                      ]
                    },
                    "severity": {
                      "type": "string",
                      "enum": [
                        "success",
                        "warning",
                        "error"
                      ]
                    },
                    "subject": {
                      "type": "object",
                      "required": [
                        "type",
                        "id"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "minLength": 1
                        },
                        "id": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    },
                    "title": {
                      "type": "string",
                      "minLength": 1
                    },
                    "body": {
                      "type": "string",
                      "minLength": 1
                    },
                    "readAt": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 0
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "archivedAt": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 0
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "integer",
                      "minimum": 0
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/notifications/{notificationId}/archive": {
      "post": {
        "operationId": "archiveProjectNotification",
        "summary": "Archive a notification",
        "tags": [
          "Notifications"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "notificationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "projectId",
                    "sourceEventId",
                    "kind",
                    "severity",
                    "subject",
                    "title",
                    "body",
                    "readAt",
                    "archivedAt",
                    "createdAt"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1
                    },
                    "projectId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "sourceEventId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "publication_published",
                        "publication_failed",
                        "publication_ambiguous"
                      ]
                    },
                    "severity": {
                      "type": "string",
                      "enum": [
                        "success",
                        "warning",
                        "error"
                      ]
                    },
                    "subject": {
                      "type": "object",
                      "required": [
                        "type",
                        "id"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "minLength": 1
                        },
                        "id": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    },
                    "title": {
                      "type": "string",
                      "minLength": 1
                    },
                    "body": {
                      "type": "string",
                      "minLength": 1
                    },
                    "readAt": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 0
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "archivedAt": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 0
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "integer",
                      "minimum": 0
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/notification-preferences": {
      "get": {
        "operationId": "listProjectNotificationPreferences",
        "summary": "List the current human notification preferences",
        "tags": [
          "Notifications"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "preferences"
                  ],
                  "properties": {
                    "preferences": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "kind",
                          "inAppEnabled"
                        ],
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "publication_published",
                              "publication_failed",
                              "publication_ambiguous"
                            ]
                          },
                          "inAppEnabled": {
                            "type": "boolean"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/notification-preferences/{kind}": {
      "patch": {
        "operationId": "updateProjectNotificationPreference",
        "summary": "Update one notification preference",
        "tags": [
          "Notifications"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "kind",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "publication_published",
                "publication_failed",
                "publication_ambiguous"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "inAppEnabled"
                ],
                "properties": {
                  "inAppEnabled": {
                    "type": "boolean"
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "inAppEnabled"
                ],
                "properties": {
                  "inAppEnabled": {
                    "type": "boolean"
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "inAppEnabled"
                ],
                "properties": {
                  "inAppEnabled": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "kind",
                    "inAppEnabled"
                  ],
                  "properties": {
                    "kind": {
                      "type": "string",
                      "enum": [
                        "publication_published",
                        "publication_failed",
                        "publication_ambiguous"
                      ]
                    },
                    "inAppEnabled": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/analytics": {
      "get": {
        "operationId": "getProjectAnalytics",
        "summary": "Read provider-neutral publication analytics",
        "tags": [
          "Analytics"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          },
          {
            "name": "channelId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "provider",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "deliveryMode",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "manual",
                "automatic"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "contractVersion",
                    "projectId",
                    "projectTimeZone",
                    "observedAt",
                    "range",
                    "current",
                    "historical",
                    "coverage"
                  ],
                  "properties": {
                    "contractVersion": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "projectId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "projectTimeZone": {
                      "type": "string",
                      "minLength": 1
                    },
                    "observedAt": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "range": {
                      "type": "object",
                      "required": [
                        "from",
                        "to"
                      ],
                      "properties": {
                        "from": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "to": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    },
                    "current": {
                      "type": "object",
                      "required": [
                        "publications",
                        "executions",
                        "workload"
                      ],
                      "properties": {
                        "publications": {
                          "type": "object",
                          "required": [
                            "total",
                            "byState",
                            "byDeliveryMode",
                            "byDimension"
                          ],
                          "properties": {
                            "total": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "byState": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "required": [
                                  "state",
                                  "count"
                                ],
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "draft",
                                      "scheduled",
                                      "ready",
                                      "publishing",
                                      "published",
                                      "failed",
                                      "ambiguous",
                                      "cancelled"
                                    ]
                                  },
                                  "count": {
                                    "type": "integer",
                                    "minimum": 0
                                  }
                                }
                              }
                            },
                            "byDeliveryMode": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "required": [
                                  "deliveryMode",
                                  "count"
                                ],
                                "properties": {
                                  "deliveryMode": {
                                    "type": "string",
                                    "enum": [
                                      "manual",
                                      "automatic"
                                    ]
                                  },
                                  "count": {
                                    "type": "integer",
                                    "minimum": 0
                                  }
                                }
                              }
                            },
                            "byDimension": {
                              "type": "array",
                              "items": {
                                "allOf": [
                                  {
                                    "type": "object",
                                    "required": [
                                      "channelId",
                                      "channelName",
                                      "provider",
                                      "deliveryMode"
                                    ],
                                    "properties": {
                                      "channelId": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "minLength": 1
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "channelName": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "minLength": 1
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "provider": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "deliveryMode": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "const": "manual"
                                          },
                                          {
                                            "type": "string",
                                            "const": "automatic"
                                          },
                                          {
                                            "type": "string",
                                            "const": "unknown"
                                          }
                                        ]
                                      }
                                    }
                                  },
                                  {
                                    "type": "object",
                                    "required": [
                                      "count"
                                    ],
                                    "properties": {
                                      "count": {
                                        "type": "integer",
                                        "minimum": 0
                                      }
                                    }
                                  }
                                ]
                              }
                            }
                          }
                        },
                        "executions": {
                          "type": "object",
                          "required": [
                            "scheduled",
                            "due",
                            "running",
                            "retryablePending",
                            "succeeded",
                            "failed",
                            "ambiguous"
                          ],
                          "properties": {
                            "scheduled": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "due": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "running": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "retryablePending": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "succeeded": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "failed": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "ambiguous": {
                              "type": "integer",
                              "minimum": 0
                            }
                          }
                        },
                        "workload": {
                          "type": "object",
                          "required": [
                            "manualDue",
                            "ambiguousReconciliation",
                            "oldestDueAt",
                            "nextRunAt",
                            "futureScheduled",
                            "overdue"
                          ],
                          "properties": {
                            "manualDue": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "ambiguousReconciliation": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "oldestDueAt": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "nextRunAt": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "futureScheduled": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "overdue": {
                              "type": "integer",
                              "minimum": 0
                            }
                          }
                        }
                      }
                    },
                    "historical": {
                      "type": "object",
                      "required": [
                        "publications",
                        "executions",
                        "retries",
                        "latency",
                        "buckets"
                      ],
                      "properties": {
                        "publications": {
                          "type": "object",
                          "required": [
                            "created",
                            "published",
                            "failed",
                            "ambiguous",
                            "lifecycleTransitions",
                            "byDimension"
                          ],
                          "properties": {
                            "created": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "published": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "failed": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "ambiguous": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "lifecycleTransitions": {
                              "type": "object",
                              "required": [
                                "total",
                                "byState",
                                "byDimension"
                              ],
                              "properties": {
                                "total": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "byState": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "required": [
                                      "state",
                                      "count"
                                    ],
                                    "properties": {
                                      "state": {
                                        "type": "string",
                                        "enum": [
                                          "draft",
                                          "scheduled",
                                          "ready",
                                          "publishing",
                                          "published",
                                          "failed",
                                          "ambiguous",
                                          "cancelled"
                                        ]
                                      },
                                      "count": {
                                        "type": "integer",
                                        "minimum": 0
                                      }
                                    }
                                  }
                                },
                                "byDimension": {
                                  "type": "array",
                                  "items": {
                                    "allOf": [
                                      {
                                        "type": "object",
                                        "required": [
                                          "channelId",
                                          "channelName",
                                          "provider",
                                          "deliveryMode"
                                        ],
                                        "properties": {
                                          "channelId": {
                                            "anyOf": [
                                              {
                                                "type": "string",
                                                "minLength": 1
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "channelName": {
                                            "anyOf": [
                                              {
                                                "type": "string",
                                                "minLength": 1
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "provider": {
                                            "type": "string",
                                            "minLength": 1
                                          },
                                          "deliveryMode": {
                                            "anyOf": [
                                              {
                                                "type": "string",
                                                "const": "manual"
                                              },
                                              {
                                                "type": "string",
                                                "const": "automatic"
                                              },
                                              {
                                                "type": "string",
                                                "const": "unknown"
                                              }
                                            ]
                                          }
                                        }
                                      },
                                      {
                                        "type": "object",
                                        "required": [
                                          "count"
                                        ],
                                        "properties": {
                                          "count": {
                                            "type": "integer",
                                            "minimum": 0
                                          }
                                        }
                                      }
                                    ]
                                  }
                                }
                              }
                            },
                            "byDimension": {
                              "type": "object",
                              "required": [
                                "created",
                                "published",
                                "failed",
                                "ambiguous"
                              ],
                              "properties": {
                                "created": {
                                  "type": "array",
                                  "items": {
                                    "allOf": [
                                      {
                                        "type": "object",
                                        "required": [
                                          "channelId",
                                          "channelName",
                                          "provider",
                                          "deliveryMode"
                                        ],
                                        "properties": {
                                          "channelId": {
                                            "anyOf": [
                                              {
                                                "type": "string",
                                                "minLength": 1
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "channelName": {
                                            "anyOf": [
                                              {
                                                "type": "string",
                                                "minLength": 1
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "provider": {
                                            "type": "string",
                                            "minLength": 1
                                          },
                                          "deliveryMode": {
                                            "anyOf": [
                                              {
                                                "type": "string",
                                                "const": "manual"
                                              },
                                              {
                                                "type": "string",
                                                "const": "automatic"
                                              },
                                              {
                                                "type": "string",
                                                "const": "unknown"
                                              }
                                            ]
                                          }
                                        }
                                      },
                                      {
                                        "type": "object",
                                        "required": [
                                          "count"
                                        ],
                                        "properties": {
                                          "count": {
                                            "type": "integer",
                                            "minimum": 0
                                          }
                                        }
                                      }
                                    ]
                                  }
                                },
                                "published": {
                                  "type": "array",
                                  "items": {
                                    "allOf": [
                                      {
                                        "type": "object",
                                        "required": [
                                          "channelId",
                                          "channelName",
                                          "provider",
                                          "deliveryMode"
                                        ],
                                        "properties": {
                                          "channelId": {
                                            "anyOf": [
                                              {
                                                "type": "string",
                                                "minLength": 1
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "channelName": {
                                            "anyOf": [
                                              {
                                                "type": "string",
                                                "minLength": 1
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "provider": {
                                            "type": "string",
                                            "minLength": 1
                                          },
                                          "deliveryMode": {
                                            "anyOf": [
                                              {
                                                "type": "string",
                                                "const": "manual"
                                              },
                                              {
                                                "type": "string",
                                                "const": "automatic"
                                              },
                                              {
                                                "type": "string",
                                                "const": "unknown"
                                              }
                                            ]
                                          }
                                        }
                                      },
                                      {
                                        "type": "object",
                                        "required": [
                                          "count"
                                        ],
                                        "properties": {
                                          "count": {
                                            "type": "integer",
                                            "minimum": 0
                                          }
                                        }
                                      }
                                    ]
                                  }
                                },
                                "failed": {
                                  "type": "array",
                                  "items": {
                                    "allOf": [
                                      {
                                        "type": "object",
                                        "required": [
                                          "channelId",
                                          "channelName",
                                          "provider",
                                          "deliveryMode"
                                        ],
                                        "properties": {
                                          "channelId": {
                                            "anyOf": [
                                              {
                                                "type": "string",
                                                "minLength": 1
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "channelName": {
                                            "anyOf": [
                                              {
                                                "type": "string",
                                                "minLength": 1
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "provider": {
                                            "type": "string",
                                            "minLength": 1
                                          },
                                          "deliveryMode": {
                                            "anyOf": [
                                              {
                                                "type": "string",
                                                "const": "manual"
                                              },
                                              {
                                                "type": "string",
                                                "const": "automatic"
                                              },
                                              {
                                                "type": "string",
                                                "const": "unknown"
                                              }
                                            ]
                                          }
                                        }
                                      },
                                      {
                                        "type": "object",
                                        "required": [
                                          "count"
                                        ],
                                        "properties": {
                                          "count": {
                                            "type": "integer",
                                            "minimum": 0
                                          }
                                        }
                                      }
                                    ]
                                  }
                                },
                                "ambiguous": {
                                  "type": "array",
                                  "items": {
                                    "allOf": [
                                      {
                                        "type": "object",
                                        "required": [
                                          "channelId",
                                          "channelName",
                                          "provider",
                                          "deliveryMode"
                                        ],
                                        "properties": {
                                          "channelId": {
                                            "anyOf": [
                                              {
                                                "type": "string",
                                                "minLength": 1
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "channelName": {
                                            "anyOf": [
                                              {
                                                "type": "string",
                                                "minLength": 1
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "provider": {
                                            "type": "string",
                                            "minLength": 1
                                          },
                                          "deliveryMode": {
                                            "anyOf": [
                                              {
                                                "type": "string",
                                                "const": "manual"
                                              },
                                              {
                                                "type": "string",
                                                "const": "automatic"
                                              },
                                              {
                                                "type": "string",
                                                "const": "unknown"
                                              }
                                            ]
                                          }
                                        }
                                      },
                                      {
                                        "type": "object",
                                        "required": [
                                          "count"
                                        ],
                                        "properties": {
                                          "count": {
                                            "type": "integer",
                                            "minimum": 0
                                          }
                                        }
                                      }
                                    ]
                                  }
                                }
                              }
                            }
                          }
                        },
                        "executions": {
                          "type": "object",
                          "required": [
                            "claimed",
                            "attempts",
                            "succeeded",
                            "failed",
                            "retryable",
                            "ambiguous",
                            "directAmbiguous",
                            "claimRecoveries",
                            "ambiguityRecoveries",
                            "cancelled",
                            "byDimension"
                          ],
                          "properties": {
                            "claimed": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "attempts": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "succeeded": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "failed": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "retryable": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "ambiguous": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "directAmbiguous": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "claimRecoveries": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "ambiguityRecoveries": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "cancelled": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "byDimension": {
                              "type": "object",
                              "required": [
                                "claimed",
                                "attempts",
                                "succeeded",
                                "failed",
                                "retryable",
                                "ambiguous",
                                "directAmbiguous",
                                "claimRecoveries",
                                "ambiguityRecoveries",
                                "cancelled"
                              ],
                              "properties": {
                                "claimed": {
                                  "type": "array",
                                  "items": {
                                    "allOf": [
                                      {
                                        "type": "object",
                                        "required": [
                                          "channelId",
                                          "channelName",
                                          "provider",
                                          "deliveryMode"
                                        ],
                                        "properties": {
                                          "channelId": {
                                            "anyOf": [
                                              {
                                                "type": "string",
                                                "minLength": 1
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "channelName": {
                                            "anyOf": [
                                              {
                                                "type": "string",
                                                "minLength": 1
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "provider": {
                                            "type": "string",
                                            "minLength": 1
                                          },
                                          "deliveryMode": {
                                            "anyOf": [
                                              {
                                                "type": "string",
                                                "const": "manual"
                                              },
                                              {
                                                "type": "string",
                                                "const": "automatic"
                                              },
                                              {
                                                "type": "string",
                                                "const": "unknown"
                                              }
                                            ]
                                          }
                                        }
                                      },
                                      {
                                        "type": "object",
                                        "required": [
                                          "count"
                                        ],
                                        "properties": {
                                          "count": {
                                            "type": "integer",
                                            "minimum": 0
                                          }
                                        }
                                      }
                                    ]
                                  }
                                },
                                "attempts": {
                                  "type": "array",
                                  "items": {
                                    "allOf": [
                                      {
                                        "type": "object",
                                        "required": [
                                          "channelId",
                                          "channelName",
                                          "provider",
                                          "deliveryMode"
                                        ],
                                        "properties": {
                                          "channelId": {
                                            "anyOf": [
                                              {
                                                "type": "string",
                                                "minLength": 1
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "channelName": {
                                            "anyOf": [
                                              {
                                                "type": "string",
                                                "minLength": 1
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "provider": {
                                            "type": "string",
                                            "minLength": 1
                                          },
                                          "deliveryMode": {
                                            "anyOf": [
                                              {
                                                "type": "string",
                                                "const": "manual"
                                              },
                                              {
                                                "type": "string",
                                                "const": "automatic"
                                              },
                                              {
                                                "type": "string",
                                                "const": "unknown"
                                              }
                                            ]
                                          }
                                        }
                                      },
                                      {
                                        "type": "object",
                                        "required": [
                                          "count"
                                        ],
                                        "properties": {
                                          "count": {
                                            "type": "integer",
                                            "minimum": 0
                                          }
                                        }
                                      }
                                    ]
                                  }
                                },
                                "succeeded": {
                                  "type": "array",
                                  "items": {
                                    "allOf": [
                                      {
                                        "type": "object",
                                        "required": [
                                          "channelId",
                                          "channelName",
                                          "provider",
                                          "deliveryMode"
                                        ],
                                        "properties": {
                                          "channelId": {
                                            "anyOf": [
                                              {
                                                "type": "string",
                                                "minLength": 1
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "channelName": {
                                            "anyOf": [
                                              {
                                                "type": "string",
                                                "minLength": 1
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "provider": {
                                            "type": "string",
                                            "minLength": 1
                                          },
                                          "deliveryMode": {
                                            "anyOf": [
                                              {
                                                "type": "string",
                                                "const": "manual"
                                              },
                                              {
                                                "type": "string",
                                                "const": "automatic"
                                              },
                                              {
                                                "type": "string",
                                                "const": "unknown"
                                              }
                                            ]
                                          }
                                        }
                                      },
                                      {
                                        "type": "object",
                                        "required": [
                                          "count"
                                        ],
                                        "properties": {
                                          "count": {
                                            "type": "integer",
                                            "minimum": 0
                                          }
                                        }
                                      }
                                    ]
                                  }
                                },
                                "failed": {
                                  "type": "array",
                                  "items": {
                                    "allOf": [
                                      {
                                        "type": "object",
                                        "required": [
                                          "channelId",
                                          "channelName",
                                          "provider",
                                          "deliveryMode"
                                        ],
                                        "properties": {
                                          "channelId": {
                                            "anyOf": [
                                              {
                                                "type": "string",
                                                "minLength": 1
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "channelName": {
                                            "anyOf": [
                                              {
                                                "type": "string",
                                                "minLength": 1
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "provider": {
                                            "type": "string",
                                            "minLength": 1
                                          },
                                          "deliveryMode": {
                                            "anyOf": [
                                              {
                                                "type": "string",
                                                "const": "manual"
                                              },
                                              {
                                                "type": "string",
                                                "const": "automatic"
                                              },
                                              {
                                                "type": "string",
                                                "const": "unknown"
                                              }
                                            ]
                                          }
                                        }
                                      },
                                      {
                                        "type": "object",
                                        "required": [
                                          "count"
                                        ],
                                        "properties": {
                                          "count": {
                                            "type": "integer",
                                            "minimum": 0
                                          }
                                        }
                                      }
                                    ]
                                  }
                                },
                                "retryable": {
                                  "type": "array",
                                  "items": {
                                    "allOf": [
                                      {
                                        "type": "object",
                                        "required": [
                                          "channelId",
                                          "channelName",
                                          "provider",
                                          "deliveryMode"
                                        ],
                                        "properties": {
                                          "channelId": {
                                            "anyOf": [
                                              {
                                                "type": "string",
                                                "minLength": 1
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "channelName": {
                                            "anyOf": [
                                              {
                                                "type": "string",
                                                "minLength": 1
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "provider": {
                                            "type": "string",
                                            "minLength": 1
                                          },
                                          "deliveryMode": {
                                            "anyOf": [
                                              {
                                                "type": "string",
                                                "const": "manual"
                                              },
                                              {
                                                "type": "string",
                                                "const": "automatic"
                                              },
                                              {
                                                "type": "string",
                                                "const": "unknown"
                                              }
                                            ]
                                          }
                                        }
                                      },
                                      {
                                        "type": "object",
                                        "required": [
                                          "count"
                                        ],
                                        "properties": {
                                          "count": {
                                            "type": "integer",
                                            "minimum": 0
                                          }
                                        }
                                      }
                                    ]
                                  }
                                },
                                "ambiguous": {
                                  "type": "array",
                                  "items": {
                                    "allOf": [
                                      {
                                        "type": "object",
                                        "required": [
                                          "channelId",
                                          "channelName",
                                          "provider",
                                          "deliveryMode"
                                        ],
                                        "properties": {
                                          "channelId": {
                                            "anyOf": [
                                              {
                                                "type": "string",
                                                "minLength": 1
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "channelName": {
                                            "anyOf": [
                                              {
                                                "type": "string",
                                                "minLength": 1
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "provider": {
                                            "type": "string",
                                            "minLength": 1
                                          },
                                          "deliveryMode": {
                                            "anyOf": [
                                              {
                                                "type": "string",
                                                "const": "manual"
                                              },
                                              {
                                                "type": "string",
                                                "const": "automatic"
                                              },
                                              {
                                                "type": "string",
                                                "const": "unknown"
                                              }
                                            ]
                                          }
                                        }
                                      },
                                      {
                                        "type": "object",
                                        "required": [
                                          "count"
                                        ],
                                        "properties": {
                                          "count": {
                                            "type": "integer",
                                            "minimum": 0
                                          }
                                        }
                                      }
                                    ]
                                  }
                                },
                                "directAmbiguous": {
                                  "type": "array",
                                  "items": {
                                    "allOf": [
                                      {
                                        "type": "object",
                                        "required": [
                                          "channelId",
                                          "channelName",
                                          "provider",
                                          "deliveryMode"
                                        ],
                                        "properties": {
                                          "channelId": {
                                            "anyOf": [
                                              {
                                                "type": "string",
                                                "minLength": 1
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "channelName": {
                                            "anyOf": [
                                              {
                                                "type": "string",
                                                "minLength": 1
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "provider": {
                                            "type": "string",
                                            "minLength": 1
                                          },
                                          "deliveryMode": {
                                            "anyOf": [
                                              {
                                                "type": "string",
                                                "const": "manual"
                                              },
                                              {
                                                "type": "string",
                                                "const": "automatic"
                                              },
                                              {
                                                "type": "string",
                                                "const": "unknown"
                                              }
                                            ]
                                          }
                                        }
                                      },
                                      {
                                        "type": "object",
                                        "required": [
                                          "count"
                                        ],
                                        "properties": {
                                          "count": {
                                            "type": "integer",
                                            "minimum": 0
                                          }
                                        }
                                      }
                                    ]
                                  }
                                },
                                "claimRecoveries": {
                                  "type": "array",
                                  "items": {
                                    "allOf": [
                                      {
                                        "type": "object",
                                        "required": [
                                          "channelId",
                                          "channelName",
                                          "provider",
                                          "deliveryMode"
                                        ],
                                        "properties": {
                                          "channelId": {
                                            "anyOf": [
                                              {
                                                "type": "string",
                                                "minLength": 1
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "channelName": {
                                            "anyOf": [
                                              {
                                                "type": "string",
                                                "minLength": 1
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "provider": {
                                            "type": "string",
                                            "minLength": 1
                                          },
                                          "deliveryMode": {
                                            "anyOf": [
                                              {
                                                "type": "string",
                                                "const": "manual"
                                              },
                                              {
                                                "type": "string",
                                                "const": "automatic"
                                              },
                                              {
                                                "type": "string",
                                                "const": "unknown"
                                              }
                                            ]
                                          }
                                        }
                                      },
                                      {
                                        "type": "object",
                                        "required": [
                                          "count"
                                        ],
                                        "properties": {
                                          "count": {
                                            "type": "integer",
                                            "minimum": 0
                                          }
                                        }
                                      }
                                    ]
                                  }
                                },
                                "ambiguityRecoveries": {
                                  "type": "array",
                                  "items": {
                                    "allOf": [
                                      {
                                        "type": "object",
                                        "required": [
                                          "channelId",
                                          "channelName",
                                          "provider",
                                          "deliveryMode"
                                        ],
                                        "properties": {
                                          "channelId": {
                                            "anyOf": [
                                              {
                                                "type": "string",
                                                "minLength": 1
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "channelName": {
                                            "anyOf": [
                                              {
                                                "type": "string",
                                                "minLength": 1
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "provider": {
                                            "type": "string",
                                            "minLength": 1
                                          },
                                          "deliveryMode": {
                                            "anyOf": [
                                              {
                                                "type": "string",
                                                "const": "manual"
                                              },
                                              {
                                                "type": "string",
                                                "const": "automatic"
                                              },
                                              {
                                                "type": "string",
                                                "const": "unknown"
                                              }
                                            ]
                                          }
                                        }
                                      },
                                      {
                                        "type": "object",
                                        "required": [
                                          "count"
                                        ],
                                        "properties": {
                                          "count": {
                                            "type": "integer",
                                            "minimum": 0
                                          }
                                        }
                                      }
                                    ]
                                  }
                                },
                                "cancelled": {
                                  "type": "array",
                                  "items": {
                                    "allOf": [
                                      {
                                        "type": "object",
                                        "required": [
                                          "channelId",
                                          "channelName",
                                          "provider",
                                          "deliveryMode"
                                        ],
                                        "properties": {
                                          "channelId": {
                                            "anyOf": [
                                              {
                                                "type": "string",
                                                "minLength": 1
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "channelName": {
                                            "anyOf": [
                                              {
                                                "type": "string",
                                                "minLength": 1
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "provider": {
                                            "type": "string",
                                            "minLength": 1
                                          },
                                          "deliveryMode": {
                                            "anyOf": [
                                              {
                                                "type": "string",
                                                "const": "manual"
                                              },
                                              {
                                                "type": "string",
                                                "const": "automatic"
                                              },
                                              {
                                                "type": "string",
                                                "const": "unknown"
                                              }
                                            ]
                                          }
                                        }
                                      },
                                      {
                                        "type": "object",
                                        "required": [
                                          "count"
                                        ],
                                        "properties": {
                                          "count": {
                                            "type": "integer",
                                            "minimum": 0
                                          }
                                        }
                                      }
                                    ]
                                  }
                                }
                              }
                            }
                          }
                        },
                        "retries": {
                          "type": "object",
                          "required": [
                            "scheduled",
                            "rate",
                            "attemptsPerPublication"
                          ],
                          "properties": {
                            "scheduled": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "rate": {
                              "anyOf": [
                                {
                                  "type": "number",
                                  "minimum": 0,
                                  "maximum": 1
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "attemptsPerPublication": {
                              "anyOf": [
                                {
                                  "type": "number",
                                  "minimum": 0
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          }
                        },
                        "latency": {
                          "type": "object",
                          "required": [
                            "queueDelay",
                            "effectDuration",
                            "scheduledToOutcome",
                            "manualCompletion"
                          ],
                          "properties": {
                            "queueDelay": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "required": [
                                    "count",
                                    "totalMs",
                                    "minMs",
                                    "maxMs",
                                    "averageMs"
                                  ],
                                  "properties": {
                                    "count": {
                                      "type": "integer",
                                      "minimum": 1
                                    },
                                    "totalMs": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "minMs": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "maxMs": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "averageMs": {
                                      "type": "number",
                                      "minimum": 0
                                    }
                                  }
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "effectDuration": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "required": [
                                    "count",
                                    "totalMs",
                                    "minMs",
                                    "maxMs",
                                    "averageMs"
                                  ],
                                  "properties": {
                                    "count": {
                                      "type": "integer",
                                      "minimum": 1
                                    },
                                    "totalMs": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "minMs": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "maxMs": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "averageMs": {
                                      "type": "number",
                                      "minimum": 0
                                    }
                                  }
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "scheduledToOutcome": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "required": [
                                    "count",
                                    "totalMs",
                                    "minMs",
                                    "maxMs",
                                    "averageMs"
                                  ],
                                  "properties": {
                                    "count": {
                                      "type": "integer",
                                      "minimum": 1
                                    },
                                    "totalMs": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "minMs": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "maxMs": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "averageMs": {
                                      "type": "number",
                                      "minimum": 0
                                    }
                                  }
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "manualCompletion": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "required": [
                                    "count",
                                    "totalMs",
                                    "minMs",
                                    "maxMs",
                                    "averageMs"
                                  ],
                                  "properties": {
                                    "count": {
                                      "type": "integer",
                                      "minimum": 1
                                    },
                                    "totalMs": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "minMs": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "maxMs": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "averageMs": {
                                      "type": "number",
                                      "minimum": 0
                                    }
                                  }
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          }
                        },
                        "buckets": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "bucketDate",
                              "bucketStartUtc",
                              "bucketEndUtc",
                              "metrics",
                              "dimensions"
                            ],
                            "properties": {
                              "bucketDate": {
                                "type": "string",
                                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                              },
                              "bucketStartUtc": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "bucketEndUtc": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "metrics": {
                                "type": "object",
                                "required": [
                                  "publicationsCreated",
                                  "publicationsPublished",
                                  "publicationsFailed",
                                  "publicationsAmbiguous",
                                  "publicationLifecycleTransitions",
                                  "executionClaimed",
                                  "executionAttempts",
                                  "executionSucceeded",
                                  "executionFailed",
                                  "executionRetryable",
                                  "executionAmbiguous",
                                  "executionClaimRecoveries",
                                  "executionAmbiguityRecoveries",
                                  "executionCancelled"
                                ],
                                "properties": {
                                  "publicationsCreated": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "publicationsPublished": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "publicationsFailed": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "publicationsAmbiguous": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "publicationLifecycleTransitions": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "executionClaimed": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "executionAttempts": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "executionSucceeded": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "executionFailed": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "executionRetryable": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "executionAmbiguous": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "executionClaimRecoveries": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "executionAmbiguityRecoveries": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "executionCancelled": {
                                    "type": "integer",
                                    "minimum": 0
                                  }
                                }
                              },
                              "dimensions": {
                                "type": "array",
                                "items": {
                                  "allOf": [
                                    {
                                      "type": "object",
                                      "required": [
                                        "channelId",
                                        "channelName",
                                        "provider",
                                        "deliveryMode"
                                      ],
                                      "properties": {
                                        "channelId": {
                                          "anyOf": [
                                            {
                                              "type": "string",
                                              "minLength": 1
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "channelName": {
                                          "anyOf": [
                                            {
                                              "type": "string",
                                              "minLength": 1
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "provider": {
                                          "type": "string",
                                          "minLength": 1
                                        },
                                        "deliveryMode": {
                                          "anyOf": [
                                            {
                                              "type": "string",
                                              "const": "manual"
                                            },
                                            {
                                              "type": "string",
                                              "const": "automatic"
                                            },
                                            {
                                              "type": "string",
                                              "const": "unknown"
                                            }
                                          ]
                                        }
                                      }
                                    },
                                    {
                                      "type": "object",
                                      "required": [
                                        "metrics"
                                      ],
                                      "properties": {
                                        "metrics": {
                                          "type": "object",
                                          "required": [
                                            "publicationsCreated",
                                            "publicationsPublished",
                                            "publicationsFailed",
                                            "publicationsAmbiguous",
                                            "publicationLifecycleTransitions",
                                            "executionClaimed",
                                            "executionAttempts",
                                            "executionSucceeded",
                                            "executionFailed",
                                            "executionRetryable",
                                            "executionAmbiguous",
                                            "executionClaimRecoveries",
                                            "executionAmbiguityRecoveries",
                                            "executionCancelled"
                                          ],
                                          "properties": {
                                            "publicationsCreated": {
                                              "type": "integer",
                                              "minimum": 0
                                            },
                                            "publicationsPublished": {
                                              "type": "integer",
                                              "minimum": 0
                                            },
                                            "publicationsFailed": {
                                              "type": "integer",
                                              "minimum": 0
                                            },
                                            "publicationsAmbiguous": {
                                              "type": "integer",
                                              "minimum": 0
                                            },
                                            "publicationLifecycleTransitions": {
                                              "type": "integer",
                                              "minimum": 0
                                            },
                                            "executionClaimed": {
                                              "type": "integer",
                                              "minimum": 0
                                            },
                                            "executionAttempts": {
                                              "type": "integer",
                                              "minimum": 0
                                            },
                                            "executionSucceeded": {
                                              "type": "integer",
                                              "minimum": 0
                                            },
                                            "executionFailed": {
                                              "type": "integer",
                                              "minimum": 0
                                            },
                                            "executionRetryable": {
                                              "type": "integer",
                                              "minimum": 0
                                            },
                                            "executionAmbiguous": {
                                              "type": "integer",
                                              "minimum": 0
                                            },
                                            "executionClaimRecoveries": {
                                              "type": "integer",
                                              "minimum": 0
                                            },
                                            "executionAmbiguityRecoveries": {
                                              "type": "integer",
                                              "minimum": 0
                                            },
                                            "executionCancelled": {
                                              "type": "integer",
                                              "minimum": 0
                                            }
                                          }
                                        }
                                      }
                                    }
                                  ]
                                }
                              }
                            }
                          }
                        }
                      }
                    },
                    "coverage": {
                      "type": "object",
                      "required": [
                        "supportedFactVersions",
                        "skippedFactCount",
                        "dataQuality"
                      ],
                      "properties": {
                        "supportedFactVersions": {
                          "type": "array",
                          "items": {
                            "type": "integer",
                            "minimum": 1
                          }
                        },
                        "skippedFactCount": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "dataQuality": {
                          "type": "object",
                          "required": [
                            "unknownEventVersions",
                            "unsupportedFacts",
                            "invalidMetadata",
                            "missingLifecycleState",
                            "missingAttemptMetadata",
                            "missingHistoricalDimensions",
                            "incompleteLatencyPairs",
                            "incompleteQueueDelayPairs",
                            "contradictoryAttempts",
                            "duplicateFacts",
                            "duplicateAttemptFacts"
                          ],
                          "properties": {
                            "unknownEventVersions": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "unsupportedFacts": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "invalidMetadata": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "missingLifecycleState": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "missingAttemptMetadata": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "missingHistoricalDimensions": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "incompleteLatencyPairs": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "incompleteQueueDelayPairs": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "contradictoryAttempts": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "duplicateFacts": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "duplicateAttemptFacts": {
                              "type": "integer",
                              "minimum": 0
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Response for status 422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/analytics/provider/bluesky": {
      "get": {
        "operationId": "getBlueskyProviderAnalytics",
        "summary": "Read persisted Bluesky provider observations",
        "tags": [
          "Provider Analytics"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "subjectType",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "account",
                "content"
              ]
            }
          },
          {
            "name": "providerSubjectId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "postbotEntityId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "contractVersion",
                    "projectId",
                    "provider",
                    "observations",
                    "limit",
                    "hasMore"
                  ],
                  "properties": {
                    "contractVersion": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "projectId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "provider": {
                      "type": "string",
                      "minLength": 1
                    },
                    "observations": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "projectId",
                          "provider",
                          "subjectType",
                          "providerSubjectId",
                          "providerSubjectLabel",
                          "providerContentRevisionId",
                          "postbotEntityType",
                          "postbotEntityId",
                          "metricName",
                          "value",
                          "unit",
                          "aggregation",
                          "reportingPeriodStart",
                          "reportingPeriodEnd",
                          "observedAt",
                          "fetchedAt",
                          "availability",
                          "freshness",
                          "provenance"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "minLength": 1
                          },
                          "projectId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "provider": {
                            "type": "string",
                            "minLength": 1
                          },
                          "subjectType": {
                            "type": "string",
                            "enum": [
                              "account",
                              "content"
                            ]
                          },
                          "providerSubjectId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "providerSubjectLabel": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "providerContentRevisionId": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "postbotEntityType": {
                            "anyOf": [
                              {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "const": "channel"
                                  },
                                  {
                                    "type": "string",
                                    "const": "publication"
                                  }
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "postbotEntityId": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "metricName": {
                            "type": "string",
                            "minLength": 1
                          },
                          "value": {
                            "anyOf": [
                              {
                                "type": "number",
                                "minimum": 0
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "unit": {
                            "type": "string",
                            "minLength": 1
                          },
                          "aggregation": {
                            "type": "string",
                            "minLength": 1
                          },
                          "reportingPeriodStart": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": 0
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "reportingPeriodEnd": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": 0
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "observedAt": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": 0
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "fetchedAt": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "availability": {
                            "type": "string",
                            "enum": [
                              "measured",
                              "not_reported",
                              "not_found",
                              "blocked",
                              "disabled",
                              "temporarily_unavailable",
                              "rate_limited",
                              "invalid_response",
                              "partial_response",
                              "not_configured",
                              "not_authorized",
                              "not_supported"
                            ]
                          },
                          "freshness": {
                            "type": "string",
                            "enum": [
                              "fresh",
                              "stale",
                              "unknown"
                            ]
                          },
                          "provenance": {
                            "type": "string",
                            "minLength": 1
                          }
                        }
                      }
                    },
                    "limit": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 500
                    },
                    "hasMore": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Response for status 422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/analytics/provider/bluesky/latest": {
      "get": {
        "operationId": "getLatestBlueskyProviderAnalytics",
        "summary": "Read the latest persisted Bluesky observation per publication metric",
        "tags": [
          "Provider Analytics"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "publicationIds",
            "in": "query",
            "required": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1,
                "pattern": "\\S"
              },
              "minItems": 1,
              "maxItems": 25,
              "uniqueItems": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "contractVersion",
                    "projectId",
                    "provider",
                    "observations",
                    "limit",
                    "hasMore"
                  ],
                  "properties": {
                    "contractVersion": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "projectId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "provider": {
                      "type": "string",
                      "minLength": 1
                    },
                    "observations": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "projectId",
                          "provider",
                          "subjectType",
                          "providerSubjectId",
                          "providerSubjectLabel",
                          "providerContentRevisionId",
                          "postbotEntityType",
                          "postbotEntityId",
                          "metricName",
                          "value",
                          "unit",
                          "aggregation",
                          "reportingPeriodStart",
                          "reportingPeriodEnd",
                          "observedAt",
                          "fetchedAt",
                          "availability",
                          "freshness",
                          "provenance"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "minLength": 1
                          },
                          "projectId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "provider": {
                            "type": "string",
                            "minLength": 1
                          },
                          "subjectType": {
                            "type": "string",
                            "enum": [
                              "account",
                              "content"
                            ]
                          },
                          "providerSubjectId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "providerSubjectLabel": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "providerContentRevisionId": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "postbotEntityType": {
                            "anyOf": [
                              {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "const": "channel"
                                  },
                                  {
                                    "type": "string",
                                    "const": "publication"
                                  }
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "postbotEntityId": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "metricName": {
                            "type": "string",
                            "minLength": 1
                          },
                          "value": {
                            "anyOf": [
                              {
                                "type": "number",
                                "minimum": 0
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "unit": {
                            "type": "string",
                            "minLength": 1
                          },
                          "aggregation": {
                            "type": "string",
                            "minLength": 1
                          },
                          "reportingPeriodStart": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": 0
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "reportingPeriodEnd": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": 0
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "observedAt": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": 0
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "fetchedAt": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "availability": {
                            "type": "string",
                            "enum": [
                              "measured",
                              "not_reported",
                              "not_found",
                              "blocked",
                              "disabled",
                              "temporarily_unavailable",
                              "rate_limited",
                              "invalid_response",
                              "partial_response",
                              "not_configured",
                              "not_authorized",
                              "not_supported"
                            ]
                          },
                          "freshness": {
                            "type": "string",
                            "enum": [
                              "fresh",
                              "stale",
                              "unknown"
                            ]
                          },
                          "provenance": {
                            "type": "string",
                            "minLength": 1
                          }
                        }
                      }
                    },
                    "limit": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 500
                    },
                    "hasMore": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Response for status 422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/analytics/provider/bluesky/collect": {
      "post": {
        "operationId": "collectBlueskyProviderAnalytics",
        "summary": "Collect a bounded Bluesky provider observation snapshot",
        "tags": [
          "Provider Analytics"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "channelId"
                ],
                "properties": {
                  "channelId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "publicationIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    },
                    "maxItems": 25,
                    "uniqueItems": true
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "channelId"
                ],
                "properties": {
                  "channelId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "publicationIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    },
                    "maxItems": 25,
                    "uniqueItems": true
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "channelId"
                ],
                "properties": {
                  "channelId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "publicationIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    },
                    "maxItems": 25,
                    "uniqueItems": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "contractVersion",
                    "projectId",
                    "provider",
                    "fetchedAt",
                    "inserted",
                    "duplicates",
                    "coverage",
                    "observations"
                  ],
                  "properties": {
                    "contractVersion": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "projectId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "provider": {
                      "type": "string",
                      "const": "bluesky"
                    },
                    "fetchedAt": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "inserted": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "duplicates": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "coverage": {
                      "type": "object",
                      "required": [
                        "state",
                        "complete",
                        "requestedAccountMetricCount",
                        "measuredAccountMetricCount",
                        "requestedContentCount",
                        "returnedContentCount",
                        "requestedContentMetricCount",
                        "measuredContentMetricCount",
                        "notReportedMetricCount",
                        "unavailableMetricCount",
                        "gaps"
                      ],
                      "properties": {
                        "state": {
                          "type": "string",
                          "enum": [
                            "complete",
                            "partial",
                            "unavailable"
                          ]
                        },
                        "complete": {
                          "type": "boolean"
                        },
                        "requestedAccountMetricCount": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "measuredAccountMetricCount": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "requestedContentCount": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "returnedContentCount": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "requestedContentMetricCount": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "measuredContentMetricCount": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "notReportedMetricCount": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "unavailableMetricCount": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "gaps": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "subjectType",
                              "providerSubjectId",
                              "postbotEntityId",
                              "metricNames",
                              "availability"
                            ],
                            "properties": {
                              "subjectType": {
                                "type": "string",
                                "enum": [
                                  "account",
                                  "content"
                                ]
                              },
                              "providerSubjectId": {
                                "type": "string",
                                "minLength": 1
                              },
                              "postbotEntityId": {
                                "type": "string",
                                "minLength": 1
                              },
                              "metricNames": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1
                                }
                              },
                              "availability": {
                                "type": "string",
                                "enum": [
                                  "not_reported",
                                  "not_found",
                                  "blocked",
                                  "disabled",
                                  "temporarily_unavailable",
                                  "rate_limited",
                                  "invalid_response",
                                  "partial_response",
                                  "not_configured",
                                  "not_authorized",
                                  "not_supported"
                                ]
                              }
                            }
                          }
                        }
                      }
                    },
                    "observations": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "projectId",
                          "provider",
                          "subjectType",
                          "providerSubjectId",
                          "providerSubjectLabel",
                          "providerContentRevisionId",
                          "postbotEntityType",
                          "postbotEntityId",
                          "metricName",
                          "value",
                          "unit",
                          "aggregation",
                          "reportingPeriodStart",
                          "reportingPeriodEnd",
                          "observedAt",
                          "fetchedAt",
                          "availability",
                          "freshness",
                          "provenance"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "minLength": 1
                          },
                          "projectId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "provider": {
                            "type": "string",
                            "minLength": 1
                          },
                          "subjectType": {
                            "type": "string",
                            "enum": [
                              "account",
                              "content"
                            ]
                          },
                          "providerSubjectId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "providerSubjectLabel": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "providerContentRevisionId": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "postbotEntityType": {
                            "anyOf": [
                              {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "const": "channel"
                                  },
                                  {
                                    "type": "string",
                                    "const": "publication"
                                  }
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "postbotEntityId": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "metricName": {
                            "type": "string",
                            "minLength": 1
                          },
                          "value": {
                            "anyOf": [
                              {
                                "type": "number",
                                "minimum": 0
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "unit": {
                            "type": "string",
                            "minLength": 1
                          },
                          "aggregation": {
                            "type": "string",
                            "minLength": 1
                          },
                          "reportingPeriodStart": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": 0
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "reportingPeriodEnd": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": 0
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "observedAt": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": 0
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "fetchedAt": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "availability": {
                            "type": "string",
                            "enum": [
                              "measured",
                              "not_reported",
                              "not_found",
                              "blocked",
                              "disabled",
                              "temporarily_unavailable",
                              "rate_limited",
                              "invalid_response",
                              "partial_response",
                              "not_configured",
                              "not_authorized",
                              "not_supported"
                            ]
                          },
                          "freshness": {
                            "type": "string",
                            "enum": [
                              "fresh",
                              "stale",
                              "unknown"
                            ]
                          },
                          "provenance": {
                            "type": "string",
                            "minLength": 1
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Response for status 422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/analytics/provider/devto": {
      "get": {
        "operationId": "getDevtoProviderAnalytics",
        "summary": "Read persisted DEV.to provider observations",
        "tags": [
          "Provider Analytics"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "subjectType",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "account",
                "content"
              ]
            }
          },
          {
            "name": "providerSubjectId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "postbotEntityId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "contractVersion",
                    "projectId",
                    "provider",
                    "observations",
                    "limit",
                    "hasMore"
                  ],
                  "properties": {
                    "contractVersion": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "projectId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "provider": {
                      "type": "string",
                      "minLength": 1
                    },
                    "observations": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "projectId",
                          "provider",
                          "subjectType",
                          "providerSubjectId",
                          "providerSubjectLabel",
                          "providerContentRevisionId",
                          "postbotEntityType",
                          "postbotEntityId",
                          "metricName",
                          "value",
                          "unit",
                          "aggregation",
                          "reportingPeriodStart",
                          "reportingPeriodEnd",
                          "observedAt",
                          "fetchedAt",
                          "availability",
                          "freshness",
                          "provenance"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "minLength": 1
                          },
                          "projectId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "provider": {
                            "type": "string",
                            "minLength": 1
                          },
                          "subjectType": {
                            "type": "string",
                            "enum": [
                              "account",
                              "content"
                            ]
                          },
                          "providerSubjectId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "providerSubjectLabel": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "providerContentRevisionId": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "postbotEntityType": {
                            "anyOf": [
                              {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "const": "channel"
                                  },
                                  {
                                    "type": "string",
                                    "const": "publication"
                                  }
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "postbotEntityId": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "metricName": {
                            "type": "string",
                            "minLength": 1
                          },
                          "value": {
                            "anyOf": [
                              {
                                "type": "number",
                                "minimum": 0
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "unit": {
                            "type": "string",
                            "minLength": 1
                          },
                          "aggregation": {
                            "type": "string",
                            "minLength": 1
                          },
                          "reportingPeriodStart": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": 0
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "reportingPeriodEnd": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": 0
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "observedAt": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": 0
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "fetchedAt": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "availability": {
                            "type": "string",
                            "enum": [
                              "measured",
                              "not_reported",
                              "not_found",
                              "blocked",
                              "disabled",
                              "temporarily_unavailable",
                              "rate_limited",
                              "invalid_response",
                              "partial_response",
                              "not_configured",
                              "not_authorized",
                              "not_supported"
                            ]
                          },
                          "freshness": {
                            "type": "string",
                            "enum": [
                              "fresh",
                              "stale",
                              "unknown"
                            ]
                          },
                          "provenance": {
                            "type": "string",
                            "minLength": 1
                          }
                        }
                      }
                    },
                    "limit": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 500
                    },
                    "hasMore": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Response for status 422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/analytics/provider/devto/latest": {
      "get": {
        "operationId": "getLatestDevtoProviderAnalytics",
        "summary": "Read the latest persisted DEV.to observation per publication metric",
        "tags": [
          "Provider Analytics"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "publicationIds",
            "in": "query",
            "required": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1,
                "pattern": "\\S"
              },
              "minItems": 1,
              "maxItems": 25,
              "uniqueItems": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "contractVersion",
                    "projectId",
                    "provider",
                    "observations",
                    "limit",
                    "hasMore"
                  ],
                  "properties": {
                    "contractVersion": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "projectId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "provider": {
                      "type": "string",
                      "minLength": 1
                    },
                    "observations": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "projectId",
                          "provider",
                          "subjectType",
                          "providerSubjectId",
                          "providerSubjectLabel",
                          "providerContentRevisionId",
                          "postbotEntityType",
                          "postbotEntityId",
                          "metricName",
                          "value",
                          "unit",
                          "aggregation",
                          "reportingPeriodStart",
                          "reportingPeriodEnd",
                          "observedAt",
                          "fetchedAt",
                          "availability",
                          "freshness",
                          "provenance"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "minLength": 1
                          },
                          "projectId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "provider": {
                            "type": "string",
                            "minLength": 1
                          },
                          "subjectType": {
                            "type": "string",
                            "enum": [
                              "account",
                              "content"
                            ]
                          },
                          "providerSubjectId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "providerSubjectLabel": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "providerContentRevisionId": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "postbotEntityType": {
                            "anyOf": [
                              {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "const": "channel"
                                  },
                                  {
                                    "type": "string",
                                    "const": "publication"
                                  }
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "postbotEntityId": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "metricName": {
                            "type": "string",
                            "minLength": 1
                          },
                          "value": {
                            "anyOf": [
                              {
                                "type": "number",
                                "minimum": 0
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "unit": {
                            "type": "string",
                            "minLength": 1
                          },
                          "aggregation": {
                            "type": "string",
                            "minLength": 1
                          },
                          "reportingPeriodStart": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": 0
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "reportingPeriodEnd": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": 0
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "observedAt": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": 0
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "fetchedAt": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "availability": {
                            "type": "string",
                            "enum": [
                              "measured",
                              "not_reported",
                              "not_found",
                              "blocked",
                              "disabled",
                              "temporarily_unavailable",
                              "rate_limited",
                              "invalid_response",
                              "partial_response",
                              "not_configured",
                              "not_authorized",
                              "not_supported"
                            ]
                          },
                          "freshness": {
                            "type": "string",
                            "enum": [
                              "fresh",
                              "stale",
                              "unknown"
                            ]
                          },
                          "provenance": {
                            "type": "string",
                            "minLength": 1
                          }
                        }
                      }
                    },
                    "limit": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 500
                    },
                    "hasMore": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Response for status 422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/analytics/provider/devto/collect": {
      "post": {
        "operationId": "collectDevtoProviderAnalytics",
        "summary": "Collect one bounded DEV.to publication snapshot",
        "tags": [
          "Provider Analytics"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "channelId",
                  "publicationId"
                ],
                "properties": {
                  "channelId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "publicationId": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "channelId",
                  "publicationId"
                ],
                "properties": {
                  "channelId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "publicationId": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "channelId",
                  "publicationId"
                ],
                "properties": {
                  "channelId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "publicationId": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "contractVersion",
                    "projectId",
                    "provider",
                    "fetchedAt",
                    "inserted",
                    "duplicates",
                    "observations"
                  ],
                  "properties": {
                    "contractVersion": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "projectId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "provider": {
                      "type": "string",
                      "const": "devto"
                    },
                    "fetchedAt": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "inserted": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "duplicates": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "observations": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "projectId",
                          "provider",
                          "subjectType",
                          "providerSubjectId",
                          "providerSubjectLabel",
                          "providerContentRevisionId",
                          "postbotEntityType",
                          "postbotEntityId",
                          "metricName",
                          "value",
                          "unit",
                          "aggregation",
                          "reportingPeriodStart",
                          "reportingPeriodEnd",
                          "observedAt",
                          "fetchedAt",
                          "availability",
                          "freshness",
                          "provenance"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "minLength": 1
                          },
                          "projectId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "provider": {
                            "type": "string",
                            "minLength": 1
                          },
                          "subjectType": {
                            "type": "string",
                            "enum": [
                              "account",
                              "content"
                            ]
                          },
                          "providerSubjectId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "providerSubjectLabel": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "providerContentRevisionId": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "postbotEntityType": {
                            "anyOf": [
                              {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "const": "channel"
                                  },
                                  {
                                    "type": "string",
                                    "const": "publication"
                                  }
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "postbotEntityId": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "metricName": {
                            "type": "string",
                            "minLength": 1
                          },
                          "value": {
                            "anyOf": [
                              {
                                "type": "number",
                                "minimum": 0
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "unit": {
                            "type": "string",
                            "minLength": 1
                          },
                          "aggregation": {
                            "type": "string",
                            "minLength": 1
                          },
                          "reportingPeriodStart": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": 0
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "reportingPeriodEnd": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": 0
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "observedAt": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": 0
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "fetchedAt": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "availability": {
                            "type": "string",
                            "enum": [
                              "measured",
                              "not_reported",
                              "not_found",
                              "blocked",
                              "disabled",
                              "temporarily_unavailable",
                              "rate_limited",
                              "invalid_response",
                              "partial_response",
                              "not_configured",
                              "not_authorized",
                              "not_supported"
                            ]
                          },
                          "freshness": {
                            "type": "string",
                            "enum": [
                              "fresh",
                              "stale",
                              "unknown"
                            ]
                          },
                          "provenance": {
                            "type": "string",
                            "minLength": 1
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Response for status 422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/analytics/provider/mastodon": {
      "get": {
        "operationId": "getMastodonProviderAnalytics",
        "summary": "Read persisted Mastodon provider observations",
        "tags": [
          "Provider Analytics"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "subjectType",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "account",
                "content"
              ]
            }
          },
          {
            "name": "providerSubjectId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "postbotEntityId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "contractVersion",
                    "projectId",
                    "provider",
                    "observations",
                    "limit",
                    "hasMore"
                  ],
                  "properties": {
                    "contractVersion": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "projectId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "provider": {
                      "type": "string",
                      "minLength": 1
                    },
                    "observations": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "projectId",
                          "provider",
                          "subjectType",
                          "providerSubjectId",
                          "providerSubjectLabel",
                          "providerContentRevisionId",
                          "postbotEntityType",
                          "postbotEntityId",
                          "metricName",
                          "value",
                          "unit",
                          "aggregation",
                          "reportingPeriodStart",
                          "reportingPeriodEnd",
                          "observedAt",
                          "fetchedAt",
                          "availability",
                          "freshness",
                          "provenance"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "minLength": 1
                          },
                          "projectId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "provider": {
                            "type": "string",
                            "minLength": 1
                          },
                          "subjectType": {
                            "type": "string",
                            "enum": [
                              "account",
                              "content"
                            ]
                          },
                          "providerSubjectId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "providerSubjectLabel": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "providerContentRevisionId": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "postbotEntityType": {
                            "anyOf": [
                              {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "const": "channel"
                                  },
                                  {
                                    "type": "string",
                                    "const": "publication"
                                  }
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "postbotEntityId": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "metricName": {
                            "type": "string",
                            "minLength": 1
                          },
                          "value": {
                            "anyOf": [
                              {
                                "type": "number",
                                "minimum": 0
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "unit": {
                            "type": "string",
                            "minLength": 1
                          },
                          "aggregation": {
                            "type": "string",
                            "minLength": 1
                          },
                          "reportingPeriodStart": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": 0
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "reportingPeriodEnd": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": 0
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "observedAt": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": 0
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "fetchedAt": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "availability": {
                            "type": "string",
                            "enum": [
                              "measured",
                              "not_reported",
                              "not_found",
                              "blocked",
                              "disabled",
                              "temporarily_unavailable",
                              "rate_limited",
                              "invalid_response",
                              "partial_response",
                              "not_configured",
                              "not_authorized",
                              "not_supported"
                            ]
                          },
                          "freshness": {
                            "type": "string",
                            "enum": [
                              "fresh",
                              "stale",
                              "unknown"
                            ]
                          },
                          "provenance": {
                            "type": "string",
                            "minLength": 1
                          }
                        }
                      }
                    },
                    "limit": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 500
                    },
                    "hasMore": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Response for status 422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/analytics/provider/mastodon/latest": {
      "get": {
        "operationId": "getLatestMastodonProviderAnalytics",
        "summary": "Read the latest persisted Mastodon observation per publication metric",
        "tags": [
          "Provider Analytics"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "publicationIds",
            "in": "query",
            "required": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1,
                "pattern": "\\S"
              },
              "minItems": 1,
              "maxItems": 25,
              "uniqueItems": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "contractVersion",
                    "projectId",
                    "provider",
                    "observations",
                    "limit",
                    "hasMore"
                  ],
                  "properties": {
                    "contractVersion": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "projectId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "provider": {
                      "type": "string",
                      "minLength": 1
                    },
                    "observations": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "projectId",
                          "provider",
                          "subjectType",
                          "providerSubjectId",
                          "providerSubjectLabel",
                          "providerContentRevisionId",
                          "postbotEntityType",
                          "postbotEntityId",
                          "metricName",
                          "value",
                          "unit",
                          "aggregation",
                          "reportingPeriodStart",
                          "reportingPeriodEnd",
                          "observedAt",
                          "fetchedAt",
                          "availability",
                          "freshness",
                          "provenance"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "minLength": 1
                          },
                          "projectId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "provider": {
                            "type": "string",
                            "minLength": 1
                          },
                          "subjectType": {
                            "type": "string",
                            "enum": [
                              "account",
                              "content"
                            ]
                          },
                          "providerSubjectId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "providerSubjectLabel": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "providerContentRevisionId": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "postbotEntityType": {
                            "anyOf": [
                              {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "const": "channel"
                                  },
                                  {
                                    "type": "string",
                                    "const": "publication"
                                  }
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "postbotEntityId": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "metricName": {
                            "type": "string",
                            "minLength": 1
                          },
                          "value": {
                            "anyOf": [
                              {
                                "type": "number",
                                "minimum": 0
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "unit": {
                            "type": "string",
                            "minLength": 1
                          },
                          "aggregation": {
                            "type": "string",
                            "minLength": 1
                          },
                          "reportingPeriodStart": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": 0
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "reportingPeriodEnd": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": 0
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "observedAt": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": 0
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "fetchedAt": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "availability": {
                            "type": "string",
                            "enum": [
                              "measured",
                              "not_reported",
                              "not_found",
                              "blocked",
                              "disabled",
                              "temporarily_unavailable",
                              "rate_limited",
                              "invalid_response",
                              "partial_response",
                              "not_configured",
                              "not_authorized",
                              "not_supported"
                            ]
                          },
                          "freshness": {
                            "type": "string",
                            "enum": [
                              "fresh",
                              "stale",
                              "unknown"
                            ]
                          },
                          "provenance": {
                            "type": "string",
                            "minLength": 1
                          }
                        }
                      }
                    },
                    "limit": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 500
                    },
                    "hasMore": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Response for status 422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/analytics/provider/mastodon/collect": {
      "post": {
        "operationId": "collectMastodonProviderAnalytics",
        "summary": "Collect one bounded Mastodon publication snapshot",
        "tags": [
          "Provider Analytics"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "channelId",
                  "publicationId"
                ],
                "properties": {
                  "channelId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "publicationId": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "channelId",
                  "publicationId"
                ],
                "properties": {
                  "channelId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "publicationId": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "channelId",
                  "publicationId"
                ],
                "properties": {
                  "channelId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "publicationId": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "contractVersion",
                    "projectId",
                    "provider",
                    "fetchedAt",
                    "inserted",
                    "duplicates",
                    "observations"
                  ],
                  "properties": {
                    "contractVersion": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "projectId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "provider": {
                      "type": "string",
                      "const": "mastodon"
                    },
                    "fetchedAt": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "inserted": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "duplicates": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "observations": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "projectId",
                          "provider",
                          "subjectType",
                          "providerSubjectId",
                          "providerSubjectLabel",
                          "providerContentRevisionId",
                          "postbotEntityType",
                          "postbotEntityId",
                          "metricName",
                          "value",
                          "unit",
                          "aggregation",
                          "reportingPeriodStart",
                          "reportingPeriodEnd",
                          "observedAt",
                          "fetchedAt",
                          "availability",
                          "freshness",
                          "provenance"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "minLength": 1
                          },
                          "projectId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "provider": {
                            "type": "string",
                            "minLength": 1
                          },
                          "subjectType": {
                            "type": "string",
                            "enum": [
                              "account",
                              "content"
                            ]
                          },
                          "providerSubjectId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "providerSubjectLabel": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "providerContentRevisionId": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "postbotEntityType": {
                            "anyOf": [
                              {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "const": "channel"
                                  },
                                  {
                                    "type": "string",
                                    "const": "publication"
                                  }
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "postbotEntityId": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "metricName": {
                            "type": "string",
                            "minLength": 1
                          },
                          "value": {
                            "anyOf": [
                              {
                                "type": "number",
                                "minimum": 0
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "unit": {
                            "type": "string",
                            "minLength": 1
                          },
                          "aggregation": {
                            "type": "string",
                            "minLength": 1
                          },
                          "reportingPeriodStart": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": 0
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "reportingPeriodEnd": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": 0
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "observedAt": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": 0
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "fetchedAt": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "availability": {
                            "type": "string",
                            "enum": [
                              "measured",
                              "not_reported",
                              "not_found",
                              "blocked",
                              "disabled",
                              "temporarily_unavailable",
                              "rate_limited",
                              "invalid_response",
                              "partial_response",
                              "not_configured",
                              "not_authorized",
                              "not_supported"
                            ]
                          },
                          "freshness": {
                            "type": "string",
                            "enum": [
                              "fresh",
                              "stale",
                              "unknown"
                            ]
                          },
                          "provenance": {
                            "type": "string",
                            "minLength": 1
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Response for status 422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/publications/{publicationId}/comments": {
      "get": {
        "operationId": "getPublicationComments",
        "summary": "Read the stored comment snapshot",
        "tags": [
          "Publications"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "publicationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "publicationId",
                    "provider",
                    "snapshot",
                    "lastAttemptAt",
                    "lastError"
                  ],
                  "properties": {
                    "publicationId": {
                      "type": "string"
                    },
                    "provider": {
                      "type": "string",
                      "enum": [
                        "bluesky",
                        "mastodon"
                      ]
                    },
                    "snapshot": {
                      "anyOf": [
                        {
                          "type": "object",
                          "required": [
                            "fetchedAt",
                            "rootUri",
                            "availability",
                            "truncated",
                            "comments"
                          ],
                          "properties": {
                            "fetchedAt": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "rootUri": {
                              "type": "string"
                            },
                            "availability": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "const": "available"
                                },
                                {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "const": "blocked"
                                    },
                                    {
                                      "type": "string",
                                      "const": "disabled"
                                    },
                                    {
                                      "type": "string",
                                      "const": "invalid_response"
                                    },
                                    {
                                      "type": "string",
                                      "const": "not_authorized"
                                    },
                                    {
                                      "type": "string",
                                      "const": "not_found"
                                    },
                                    {
                                      "type": "string",
                                      "const": "not_supported"
                                    },
                                    {
                                      "type": "string",
                                      "const": "partial_response"
                                    },
                                    {
                                      "type": "string",
                                      "const": "rate_limited"
                                    },
                                    {
                                      "type": "string",
                                      "const": "temporarily_unavailable"
                                    }
                                  ]
                                }
                              ]
                            },
                            "truncated": {
                              "type": "boolean"
                            },
                            "comments": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "required": [
                                  "id",
                                  "parentUri",
                                  "depth",
                                  "availability",
                                  "authorDid",
                                  "authorHandle",
                                  "text",
                                  "createdAt",
                                  "externalUrl"
                                ],
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "parentUri": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "depth": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 6
                                  },
                                  "availability": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "const": "available"
                                      },
                                      {
                                        "type": "string",
                                        "const": "blocked"
                                      },
                                      {
                                        "type": "string",
                                        "const": "not_found"
                                      },
                                      {
                                        "type": "string",
                                        "const": "invalid_response"
                                      }
                                    ]
                                  },
                                  "authorDid": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "authorHandle": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "text": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "createdAt": {
                                    "anyOf": [
                                      {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "externalUrl": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                }
                              },
                              "maxItems": 100
                            }
                          }
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "lastAttemptAt": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 0
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "lastError": {
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "type": "string",
                              "const": "blocked"
                            },
                            {
                              "type": "string",
                              "const": "disabled"
                            },
                            {
                              "type": "string",
                              "const": "invalid_response"
                            },
                            {
                              "type": "string",
                              "const": "not_authorized"
                            },
                            {
                              "type": "string",
                              "const": "not_found"
                            },
                            {
                              "type": "string",
                              "const": "not_supported"
                            },
                            {
                              "type": "string",
                              "const": "partial_response"
                            },
                            {
                              "type": "string",
                              "const": "rate_limited"
                            },
                            {
                              "type": "string",
                              "const": "temporarily_unavailable"
                            }
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Response for status 422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/publications/{publicationId}/comments/refresh": {
      "post": {
        "operationId": "refreshPublicationComments",
        "summary": "Refresh the latest public comment snapshot",
        "tags": [
          "Publications"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "publicationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "publicationId",
                    "provider",
                    "snapshot",
                    "lastAttemptAt",
                    "lastError"
                  ],
                  "properties": {
                    "publicationId": {
                      "type": "string"
                    },
                    "provider": {
                      "type": "string",
                      "enum": [
                        "bluesky",
                        "mastodon"
                      ]
                    },
                    "snapshot": {
                      "anyOf": [
                        {
                          "type": "object",
                          "required": [
                            "fetchedAt",
                            "rootUri",
                            "availability",
                            "truncated",
                            "comments"
                          ],
                          "properties": {
                            "fetchedAt": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "rootUri": {
                              "type": "string"
                            },
                            "availability": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "const": "available"
                                },
                                {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "const": "blocked"
                                    },
                                    {
                                      "type": "string",
                                      "const": "disabled"
                                    },
                                    {
                                      "type": "string",
                                      "const": "invalid_response"
                                    },
                                    {
                                      "type": "string",
                                      "const": "not_authorized"
                                    },
                                    {
                                      "type": "string",
                                      "const": "not_found"
                                    },
                                    {
                                      "type": "string",
                                      "const": "not_supported"
                                    },
                                    {
                                      "type": "string",
                                      "const": "partial_response"
                                    },
                                    {
                                      "type": "string",
                                      "const": "rate_limited"
                                    },
                                    {
                                      "type": "string",
                                      "const": "temporarily_unavailable"
                                    }
                                  ]
                                }
                              ]
                            },
                            "truncated": {
                              "type": "boolean"
                            },
                            "comments": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "required": [
                                  "id",
                                  "parentUri",
                                  "depth",
                                  "availability",
                                  "authorDid",
                                  "authorHandle",
                                  "text",
                                  "createdAt",
                                  "externalUrl"
                                ],
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "parentUri": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "depth": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 6
                                  },
                                  "availability": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "const": "available"
                                      },
                                      {
                                        "type": "string",
                                        "const": "blocked"
                                      },
                                      {
                                        "type": "string",
                                        "const": "not_found"
                                      },
                                      {
                                        "type": "string",
                                        "const": "invalid_response"
                                      }
                                    ]
                                  },
                                  "authorDid": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "authorHandle": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "text": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "createdAt": {
                                    "anyOf": [
                                      {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "externalUrl": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                }
                              },
                              "maxItems": 100
                            }
                          }
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "lastAttemptAt": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 0
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "lastError": {
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "type": "string",
                              "const": "blocked"
                            },
                            {
                              "type": "string",
                              "const": "disabled"
                            },
                            {
                              "type": "string",
                              "const": "invalid_response"
                            },
                            {
                              "type": "string",
                              "const": "not_authorized"
                            },
                            {
                              "type": "string",
                              "const": "not_found"
                            },
                            {
                              "type": "string",
                              "const": "not_supported"
                            },
                            {
                              "type": "string",
                              "const": "partial_response"
                            },
                            {
                              "type": "string",
                              "const": "rate_limited"
                            },
                            {
                              "type": "string",
                              "const": "temporarily_unavailable"
                            }
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Response for status 422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/publications/{publicationId}/comments/replies": {
      "get": {
        "operationId": "getPublicationReplies",
        "summary": "Read outgoing conversation reply history",
        "tags": [
          "Publications"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "publicationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "replies",
                    "nextBefore",
                    "canReply",
                    "accountName",
                    "provider",
                    "textLimit",
                    "instanceOrigin"
                  ],
                  "properties": {
                    "replies": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "parentUri",
                          "text",
                          "state",
                          "authorName",
                          "createdAt",
                          "updatedAt",
                          "externalUrl",
                          "lastError"
                        ],
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "parentUri": {
                            "type": "string"
                          },
                          "text": {
                            "type": "string"
                          },
                          "state": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "running",
                              "sent",
                              "failed",
                              "ambiguous"
                            ]
                          },
                          "authorName": {
                            "type": "string"
                          },
                          "createdAt": {
                            "type": "integer"
                          },
                          "updatedAt": {
                            "type": "integer"
                          },
                          "externalUrl": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "lastError": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        }
                      }
                    },
                    "nextBefore": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "canReply": {
                      "type": "boolean"
                    },
                    "accountName": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "provider": {
                      "type": "string",
                      "enum": [
                        "bluesky",
                        "mastodon"
                      ]
                    },
                    "textLimit": {
                      "type": "integer"
                    },
                    "instanceOrigin": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Response for status 422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "sendPublicationReply",
        "summary": "Request a text reply to a stored public comment",
        "tags": [
          "Publications"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "publicationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "requestId",
                  "parentUri",
                  "text"
                ],
                "properties": {
                  "requestId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "parentUri": {
                    "type": "string",
                    "maxLength": 2048
                  },
                  "text": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 3000
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "requestId",
                  "parentUri",
                  "text"
                ],
                "properties": {
                  "requestId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "parentUri": {
                    "type": "string",
                    "maxLength": 2048
                  },
                  "text": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 3000
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "requestId",
                  "parentUri",
                  "text"
                ],
                "properties": {
                  "requestId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "parentUri": {
                    "type": "string",
                    "maxLength": 2048
                  },
                  "text": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 3000
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "replies",
                    "nextBefore",
                    "canReply",
                    "accountName",
                    "provider",
                    "textLimit",
                    "instanceOrigin"
                  ],
                  "properties": {
                    "replies": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "parentUri",
                          "text",
                          "state",
                          "authorName",
                          "createdAt",
                          "updatedAt",
                          "externalUrl",
                          "lastError"
                        ],
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "parentUri": {
                            "type": "string"
                          },
                          "text": {
                            "type": "string"
                          },
                          "state": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "running",
                              "sent",
                              "failed",
                              "ambiguous"
                            ]
                          },
                          "authorName": {
                            "type": "string"
                          },
                          "createdAt": {
                            "type": "integer"
                          },
                          "updatedAt": {
                            "type": "integer"
                          },
                          "externalUrl": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "lastError": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        }
                      }
                    },
                    "nextBefore": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "canReply": {
                      "type": "boolean"
                    },
                    "accountName": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "provider": {
                      "type": "string",
                      "enum": [
                        "bluesky",
                        "mastodon"
                      ]
                    },
                    "textLimit": {
                      "type": "integer"
                    },
                    "instanceOrigin": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Response for status 422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/publications/{publicationId}/first-comment": {
      "get": {
        "operationId": "getPublicationFirstComment",
        "summary": "Read prepared first comment and its independent outcome",
        "tags": [
          "Publications"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "publicationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "providerId",
                    "textLimit",
                    "instanceOrigin",
                    "firstComment",
                    "canConfigure",
                    "canManage"
                  ],
                  "properties": {
                    "providerId": {
                      "type": "string",
                      "enum": [
                        "bluesky",
                        "mastodon"
                      ]
                    },
                    "textLimit": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 3000
                    },
                    "instanceOrigin": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "firstComment": {
                      "anyOf": [
                        {
                          "type": "object",
                          "required": [
                            "id",
                            "text",
                            "delaySeconds",
                            "state",
                            "revision",
                            "dueAt",
                            "createdAt",
                            "updatedAt",
                            "externalUrl",
                            "lastError",
                            "authorName"
                          ],
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "text": {
                              "type": "string"
                            },
                            "delaySeconds": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 604800
                            },
                            "state": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "const": "waiting"
                                },
                                {
                                  "type": "string",
                                  "const": "pending"
                                },
                                {
                                  "type": "string",
                                  "const": "running"
                                },
                                {
                                  "type": "string",
                                  "const": "suspended"
                                },
                                {
                                  "type": "string",
                                  "const": "sent"
                                },
                                {
                                  "type": "string",
                                  "const": "failed"
                                },
                                {
                                  "type": "string",
                                  "const": "ambiguous"
                                },
                                {
                                  "type": "string",
                                  "const": "cancelled"
                                }
                              ]
                            },
                            "revision": {
                              "type": "integer",
                              "minimum": 1
                            },
                            "dueAt": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "createdAt": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "updatedAt": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "externalUrl": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "lastError": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "authorName": {
                              "type": "string"
                            }
                          }
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "canConfigure": {
                      "type": "boolean"
                    },
                    "canManage": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Response for status 422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "savePublicationFirstComment",
        "summary": "Save and enable a prepared first comment",
        "tags": [
          "Publications"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "publicationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "text",
                  "delaySeconds",
                  "expectedRevision"
                ],
                "properties": {
                  "text": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 3000
                  },
                  "delaySeconds": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 604800
                  },
                  "expectedRevision": {
                    "type": "integer",
                    "minimum": 0
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "text",
                  "delaySeconds",
                  "expectedRevision"
                ],
                "properties": {
                  "text": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 3000
                  },
                  "delaySeconds": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 604800
                  },
                  "expectedRevision": {
                    "type": "integer",
                    "minimum": 0
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "text",
                  "delaySeconds",
                  "expectedRevision"
                ],
                "properties": {
                  "text": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 3000
                  },
                  "delaySeconds": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 604800
                  },
                  "expectedRevision": {
                    "type": "integer",
                    "minimum": 0
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "providerId",
                    "textLimit",
                    "instanceOrigin",
                    "firstComment",
                    "canConfigure",
                    "canManage"
                  ],
                  "properties": {
                    "providerId": {
                      "type": "string",
                      "enum": [
                        "bluesky",
                        "mastodon"
                      ]
                    },
                    "textLimit": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 3000
                    },
                    "instanceOrigin": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "firstComment": {
                      "anyOf": [
                        {
                          "type": "object",
                          "required": [
                            "id",
                            "text",
                            "delaySeconds",
                            "state",
                            "revision",
                            "dueAt",
                            "createdAt",
                            "updatedAt",
                            "externalUrl",
                            "lastError",
                            "authorName"
                          ],
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "text": {
                              "type": "string"
                            },
                            "delaySeconds": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 604800
                            },
                            "state": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "const": "waiting"
                                },
                                {
                                  "type": "string",
                                  "const": "pending"
                                },
                                {
                                  "type": "string",
                                  "const": "running"
                                },
                                {
                                  "type": "string",
                                  "const": "suspended"
                                },
                                {
                                  "type": "string",
                                  "const": "sent"
                                },
                                {
                                  "type": "string",
                                  "const": "failed"
                                },
                                {
                                  "type": "string",
                                  "const": "ambiguous"
                                },
                                {
                                  "type": "string",
                                  "const": "cancelled"
                                }
                              ]
                            },
                            "revision": {
                              "type": "integer",
                              "minimum": 1
                            },
                            "dueAt": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "createdAt": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "updatedAt": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "externalUrl": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "lastError": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "authorName": {
                              "type": "string"
                            }
                          }
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "canConfigure": {
                      "type": "boolean"
                    },
                    "canManage": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Response for status 422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/publications/{publicationId}/first-comment/cancel": {
      "post": {
        "operationId": "cancelPublicationFirstComment",
        "summary": "Cancel an unclaimed prepared first comment",
        "tags": [
          "Publications"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "publicationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "expectedRevision"
                ],
                "properties": {
                  "expectedRevision": {
                    "type": "integer",
                    "minimum": 1
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "expectedRevision"
                ],
                "properties": {
                  "expectedRevision": {
                    "type": "integer",
                    "minimum": 1
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "expectedRevision"
                ],
                "properties": {
                  "expectedRevision": {
                    "type": "integer",
                    "minimum": 1
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "providerId",
                    "textLimit",
                    "instanceOrigin",
                    "firstComment",
                    "canConfigure",
                    "canManage"
                  ],
                  "properties": {
                    "providerId": {
                      "type": "string",
                      "enum": [
                        "bluesky",
                        "mastodon"
                      ]
                    },
                    "textLimit": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 3000
                    },
                    "instanceOrigin": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "firstComment": {
                      "anyOf": [
                        {
                          "type": "object",
                          "required": [
                            "id",
                            "text",
                            "delaySeconds",
                            "state",
                            "revision",
                            "dueAt",
                            "createdAt",
                            "updatedAt",
                            "externalUrl",
                            "lastError",
                            "authorName"
                          ],
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "text": {
                              "type": "string"
                            },
                            "delaySeconds": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 604800
                            },
                            "state": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "const": "waiting"
                                },
                                {
                                  "type": "string",
                                  "const": "pending"
                                },
                                {
                                  "type": "string",
                                  "const": "running"
                                },
                                {
                                  "type": "string",
                                  "const": "suspended"
                                },
                                {
                                  "type": "string",
                                  "const": "sent"
                                },
                                {
                                  "type": "string",
                                  "const": "failed"
                                },
                                {
                                  "type": "string",
                                  "const": "ambiguous"
                                },
                                {
                                  "type": "string",
                                  "const": "cancelled"
                                }
                              ]
                            },
                            "revision": {
                              "type": "integer",
                              "minimum": 1
                            },
                            "dueAt": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "createdAt": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "updatedAt": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "externalUrl": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "lastError": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "authorName": {
                              "type": "string"
                            }
                          }
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "canConfigure": {
                      "type": "boolean"
                    },
                    "canManage": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Response for status 422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/audit-events": {
      "get": {
        "operationId": "listProjectAuditEvents",
        "summary": "List the audit events for a project",
        "tags": [
          "Audit"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for status 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "events"
                  ],
                  "properties": {
                    "events": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "projectId",
                          "actorId",
                          "action",
                          "entityType",
                          "entityId",
                          "metadataJson",
                          "createdAt"
                        ],
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "projectId": {
                            "type": "string"
                          },
                          "actorId": {
                            "type": "string"
                          },
                          "action": {
                            "type": "string"
                          },
                          "entityType": {
                            "type": "string"
                          },
                          "entityId": {
                            "type": "string"
                          },
                          "metadataJson": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/projects/{projectId}/events": {
      "get": {
        "operationId": "streamProjectEvents",
        "summary": "Stream safe project updates over Server-Sent Events",
        "tags": [
          "Projects"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "responses": {
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Response for status 404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ]
      }
    },
    "/api/notifications/events": {
      "get": {
        "operationId": "streamUserNotificationEvents",
        "summary": "Stream user-visible updates over Server-Sent Events",
        "tags": [
          "Notifications"
        ],
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "responses": {
          "400": {
            "description": "Response for status 400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Response for status 401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Response for status 403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Response for status 409",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/media/public/{token}": {
      "get": {
        "operationId": "streamPublicMedia",
        "summary": "Stream media through a short-lived signed URL",
        "tags": [
          "Media"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "The verified media bytes",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "404": {
            "description": "The signed media URL is invalid or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Media storage is temporarily unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ]
      }
    }
  }
}
