{
  "openapi": "3.0.3",
  "info": {
    "title": "macrocontent Publisher API",
    "version": "1.0.0",
    "description": "Publisher portal (`/publisher/me`) and automation (`/publisher/v1`).\n\nGenerated from route inventory (44 operations). Request/response schemas are summarized — use Try it out with Authorize. Excluded: Stripe webhook, internal screenshot capture."
  },
  "servers": [
    {
      "url": "https://api.macrocontent.dev",
      "description": "Production"
    },
    {
      "url": "http://localhost:3000",
      "description": "Local development"
    }
  ],
  "tags": [
    {
      "name": "Automation v1"
    },
    {
      "name": "Portal me"
    },
    {
      "name": "Publisher"
    }
  ],
  "components": {
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "Platform access JWT from `/auth/login` (or refresh). Used by dashboard, account, store/me, publisher/me."
      },
      "PublisherToken": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Macro-Token",
        "description": "Publisher API token for `/publisher/v1`."
      }
    }
  },
  "paths": {
    "/publisher/me": {
      "get": {
        "tags": [
          "Portal me"
        ],
        "summary": "Get publisher me",
        "description": "Auth: JWT",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          }
        }
      },
      "patch": {
        "tags": [
          "Portal me"
        ],
        "summary": "Update publisher me",
        "description": "Auth: JWT",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          }
        }
      },
      "post": {
        "tags": [
          "Portal me"
        ],
        "summary": "Create publisher me",
        "description": "Auth: JWT",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/publisher/me/avatar": {
      "post": {
        "tags": [
          "Portal me"
        ],
        "summary": "Create me avatar",
        "description": "Auth: JWT",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/publisher/me/close": {
      "post": {
        "tags": [
          "Portal me"
        ],
        "summary": "close",
        "description": "Auth: JWT",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/publisher/me/close/prepare": {
      "post": {
        "tags": [
          "Portal me"
        ],
        "summary": "prepare",
        "description": "Auth: JWT",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/publisher/me/invoices": {
      "get": {
        "tags": [
          "Portal me"
        ],
        "summary": "Get publisher me invoices",
        "description": "Auth: JWT",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/publisher/me/lifecycle": {
      "get": {
        "tags": [
          "Portal me"
        ],
        "summary": "Get publisher me lifecycle",
        "description": "Auth: JWT",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/publisher/me/listings": {
      "get": {
        "tags": [
          "Portal me"
        ],
        "summary": "Get publisher me listings",
        "description": "Auth: JWT",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          }
        }
      },
      "post": {
        "tags": [
          "Portal me"
        ],
        "summary": "Create me listings",
        "description": "Auth: JWT",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/publisher/me/listings/{id}": {
      "delete": {
        "tags": [
          "Portal me"
        ],
        "summary": "Delete listings id",
        "description": "Auth: JWT",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          }
        }
      },
      "get": {
        "tags": [
          "Portal me"
        ],
        "summary": "Get me listings id",
        "description": "Auth: JWT",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          }
        }
      },
      "patch": {
        "tags": [
          "Portal me"
        ],
        "summary": "Update listings id",
        "description": "Auth: JWT",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/publisher/me/listings/{id}/bundle": {
      "get": {
        "tags": [
          "Portal me"
        ],
        "summary": "Get listings id bundle",
        "description": "Auth: JWT",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/publisher/me/listings/{id}/cover": {
      "post": {
        "tags": [
          "Portal me"
        ],
        "summary": "Create id cover",
        "description": "Auth: JWT",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/publisher/me/listings/validate-bundle": {
      "post": {
        "tags": [
          "Portal me"
        ],
        "summary": "validate bundle",
        "description": "Auth: JWT",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/publisher/me/revenue": {
      "get": {
        "tags": [
          "Portal me"
        ],
        "summary": "Get publisher me revenue",
        "description": "Auth: JWT",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/publisher/me/sales": {
      "get": {
        "tags": [
          "Portal me"
        ],
        "summary": "Get publisher me sales",
        "description": "Auth: JWT",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/publisher/me/stripe/account": {
      "get": {
        "tags": [
          "Portal me"
        ],
        "summary": "Get me stripe account",
        "description": "Auth: JWT",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/publisher/me/stripe/connect": {
      "post": {
        "tags": [
          "Portal me"
        ],
        "summary": "connect",
        "description": "Auth: JWT",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/publisher/me/stripe/disconnect": {
      "post": {
        "tags": [
          "Portal me"
        ],
        "summary": "disconnect",
        "description": "Auth: JWT",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/publisher/me/stripe/sync": {
      "post": {
        "tags": [
          "Portal me"
        ],
        "summary": "sync",
        "description": "Auth: JWT",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/publisher/me/transfer/cancel": {
      "post": {
        "tags": [
          "Portal me"
        ],
        "summary": "cancel",
        "description": "Auth: JWT",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/publisher/me/transfer/confirm": {
      "post": {
        "tags": [
          "Portal me"
        ],
        "summary": "confirm",
        "description": "Auth: JWT",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/publisher/me/transfer/prepare": {
      "post": {
        "tags": [
          "Portal me"
        ],
        "summary": "prepare",
        "description": "Auth: JWT",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/publisher/me/transfer/respond": {
      "post": {
        "tags": [
          "Portal me"
        ],
        "summary": "respond",
        "description": "Auth: JWT",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/publisher/me/api-tokens": {
      "get": {
        "tags": [
          "Portal me"
        ],
        "summary": "Get publisher me api tokens",
        "description": "Auth: JWT",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          }
        }
      },
      "post": {
        "tags": [
          "Portal me"
        ],
        "summary": "Create me api tokens",
        "description": "Auth: JWT",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/publisher/me/api-tokens/{tokenId}": {
      "delete": {
        "tags": [
          "Portal me"
        ],
        "summary": "Delete api tokens tokenId",
        "description": "Auth: JWT",
        "parameters": [
          {
            "name": "tokenId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          }
        }
      },
      "patch": {
        "tags": [
          "Portal me"
        ],
        "summary": "Update api tokens tokenId",
        "description": "Auth: JWT",
        "parameters": [
          {
            "name": "tokenId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/publisher/me/api-tokens/{tokenId}/deactivate": {
      "post": {
        "tags": [
          "Portal me"
        ],
        "summary": "deactivate",
        "description": "Auth: JWT",
        "parameters": [
          {
            "name": "tokenId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/publisher/me/api-tokens/{tokenId}/reactivate": {
      "post": {
        "tags": [
          "Portal me"
        ],
        "summary": "reactivate",
        "description": "Auth: JWT",
        "parameters": [
          {
            "name": "tokenId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/publisher/me/api-tokens/permission-catalog": {
      "get": {
        "tags": [
          "Portal me"
        ],
        "summary": "Get me api tokens permission catalog",
        "description": "Auth: JWT",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/publisher/v1/listings": {
      "get": {
        "tags": [
          "Automation v1"
        ],
        "summary": "Get publisher v1 listings",
        "description": "Auth: publisher token",
        "security": [
          {
            "PublisherToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          }
        }
      },
      "post": {
        "tags": [
          "Automation v1"
        ],
        "summary": "Create v1 listings",
        "description": "Auth: publisher token",
        "security": [
          {
            "PublisherToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/publisher/v1/listings/{id}": {
      "delete": {
        "tags": [
          "Automation v1"
        ],
        "summary": "Delete listings id",
        "description": "Auth: publisher token",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "PublisherToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          }
        }
      },
      "get": {
        "tags": [
          "Automation v1"
        ],
        "summary": "Get v1 listings id",
        "description": "Auth: publisher token",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "PublisherToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          }
        }
      },
      "patch": {
        "tags": [
          "Automation v1"
        ],
        "summary": "Update listings id",
        "description": "Auth: publisher token",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "PublisherToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/publisher/v1/listings/validate-bundle": {
      "post": {
        "tags": [
          "Automation v1"
        ],
        "summary": "validate bundle",
        "description": "Auth: publisher token",
        "security": [
          {
            "PublisherToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/publisher/v1/permission-catalog": {
      "get": {
        "tags": [
          "Automation v1"
        ],
        "summary": "Get publisher v1 permission catalog",
        "description": "Auth: publisher token",
        "security": [
          {
            "PublisherToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/publisher/v1/whoami": {
      "get": {
        "tags": [
          "Automation v1"
        ],
        "summary": "Publisher token identity",
        "description": "Auth: publisher token",
        "security": [
          {
            "PublisherToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/": {
      "post": {
        "tags": [
          "Publisher"
        ],
        "summary": "`routes/contentTypes.ts`",
        "description": "Auth: Dead — not mounted",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          }
        }
      },
      "get": {
        "tags": [
          "Publisher"
        ],
        "summary": "`routes/contentTypes.ts`",
        "description": "Auth: Dead — not mounted",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/{typeId}": {
      "delete": {
        "tags": [
          "Publisher"
        ],
        "summary": "`routes/contentTypes.ts`",
        "description": "Auth: Dead — not mounted",
        "parameters": [
          {
            "name": "typeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    }
  },
  "x-macro-stats": {
    "included": 44,
    "excluded": 0,
    "sourceRows": 44
  }
}
