# Register a web app (an existing URL is updated)

POST /api/agent/apps. Required scopes: apps:write.

HTML: https://notify.belweave.ai/docs/api/postApps

Required scopes: `apps:write`

```http
POST /api/agent/apps
Authorization: Bearer ntf_your_token
```

## Operation schema

```json
{
  "summary": "Register a web app (an existing URL is updated)",
  "operationId": "postApps",
  "security": [
    {
      "bearer": [
        "apps:write"
      ]
    }
  ],
  "x-notify-scopes": [
    "apps:write"
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string",
              "minLength": 1,
              "maxLength": 40
            },
            "url": {
              "type": "string",
              "maxLength": 2048,
              "format": "uri"
            },
            "iconUrl": {
              "type": "string",
              "maxLength": 2048,
              "format": "uri"
            },
            "project": {
              "type": "string",
              "minLength": 1,
              "maxLength": 80
            },
            "teamId": {
              "type": "string",
              "pattern": "^team_[A-Za-z0-9_-]{8,64}$",
              "description": "Team or free Family ID (team_…) returned by teams_create or teams_list"
            }
          },
          "required": [
            "name",
            "url"
          ]
        }
      }
    }
  },
  "responses": {
    "201": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "app": {
                "$ref": "#/components/schemas/App"
              },
              "created": {
                "type": "boolean"
              },
              "message": {
                "type": "string"
              }
            },
            "required": [
              "app",
              "created"
            ]
          }
        }
      }
    },
    "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).
