# Publish an immutable free personal web package

Uncompressed archive maximum 12 MiB, decoded maximum 8 MiB. Publisher must equal authenticated account. Publication is personal-only, never approved.

HTML: https://notify.belweave.tech/docs/api/postMiniAppsPublish

Required scopes: `apps:write`

```http
POST /api/agent/mini-apps/publish
Authorization: Bearer ntf_your_token
```

## Operation schema

```json
{
  "summary": "Publish an immutable free personal web package",
  "description": "Uncompressed archive maximum 12 MiB, decoded maximum 8 MiB. Publisher must equal authenticated account. Publication is personal-only, never approved.",
  "operationId": "postMiniAppsPublish",
  "security": [
    {
      "bearer": [
        "apps:write"
      ]
    }
  ],
  "x-notify-scopes": [
    "apps:write"
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "properties": {
            "manifest": {
              "type": "object",
              "properties": {
                "schemaVersion": {
                  "type": "number",
                  "const": 1
                },
                "appId": {
                  "type": "string",
                  "maxLength": 64,
                  "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                },
                "name": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100
                },
                "version": {
                  "type": "string",
                  "maxLength": 64,
                  "pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-(?:0|[1-9]\\d*|\\d*[A-Za-z-][0-9A-Za-z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[A-Za-z-][0-9A-Za-z-]*))*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$"
                },
                "publisher": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 100
                    }
                  },
                  "required": [
                    "id",
                    "name"
                  ],
                  "additionalProperties": false
                },
                "format": {
                  "type": "string",
                  "enum": [
                    "web",
                    "react-native"
                  ]
                },
                "runtime": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64
                },
                "entryPoint": {
                  "type": "string",
                  "maxLength": 240,
                  "pattern": "^[a-zA-Z0-9_-]+(?:[.][a-zA-Z0-9_-]+)*(?:\\/[a-zA-Z0-9_-]+(?:[.][a-zA-Z0-9_-]+)*)*$"
                },
                "files": {
                  "minItems": 1,
                  "maxItems": 256,
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "path": {
                        "type": "string",
                        "maxLength": 240,
                        "pattern": "^[a-zA-Z0-9_-]+(?:[.][a-zA-Z0-9_-]+)*(?:\\/[a-zA-Z0-9_-]+(?:[.][a-zA-Z0-9_-]+)*)*$"
                      },
                      "size": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 4194304
                      },
                      "sha256": {
                        "type": "string",
                        "pattern": "^[a-f0-9]{64}$"
                      },
                      "mediaType": {
                        "type": "string",
                        "maxLength": 100,
                        "pattern": "^[a-z0-9.+-]+\\/[a-z0-9.+-]+$"
                      }
                    },
                    "required": [
                      "path",
                      "size",
                      "sha256",
                      "mediaType"
                    ],
                    "additionalProperties": false
                  }
                },
                "capabilities": {
                  "maxItems": 1,
                  "type": "array",
                  "items": {
                    "type": "string",
                    "const": "local-storage"
                  }
                },
                "ageRating": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 4
                    },
                    {
                      "type": "number",
                      "const": 9
                    },
                    {
                      "type": "number",
                      "const": 13
                    },
                    {
                      "type": "number",
                      "const": 16
                    },
                    {
                      "type": "number",
                      "const": 18
                    }
                  ]
                },
                "commerce": {
                  "type": "string",
                  "const": "none"
                },
                "aliases": {
                  "maxItems": 8,
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  }
                },
                "privacyUrl": {
                  "type": "string",
                  "maxLength": 2048,
                  "format": "uri"
                },
                "supportUrl": {
                  "type": "string",
                  "maxLength": 2048,
                  "format": "uri"
                }
              },
              "required": [
                "schemaVersion",
                "appId",
                "name",
                "version",
                "publisher",
                "format",
                "runtime",
                "entryPoint",
                "files",
                "capabilities",
                "ageRating",
                "commerce"
              ],
              "additionalProperties": false
            },
            "files": {
              "minItems": 1,
              "maxItems": 256,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "path": {
                    "type": "string"
                  },
                  "data": {
                    "type": "string"
                  }
                },
                "required": [
                  "path",
                  "data"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "manifest",
            "files"
          ],
          "additionalProperties": false
        }
      }
    }
  },
  "responses": {
    "201": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "package": {
                "$ref": "#/components/schemas/MiniAppPackage"
              }
            },
            "required": [
              "package"
            ]
          }
        }
      }
    },
    "400": {
      "description": "Invalid request",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "401": {
      "description": "Missing, unknown, revoked, or expired token",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "403": {
      "description": "The token lacks a required scope or the account lacks permission",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "404": {
      "description": "Not found for this account",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    }
  }
}
```

Resolve schema references against [OpenAPI](https://notify.belweave.ai/openapi.json).
