PPanel Edge

notification-center

由 openapi.json 自动生成的 11 个端点及其请求、响应和权限元数据。

此参考由已发布 API 契约生成。字段、请求头和权限要求如下。

下载完整 OpenAPI 文档 · SHA-256: ccaa20cec11fad96e369b88073ce3608a5b071ce55d6dc03fa31df7b0f08c525

标识符和数据结构与公开契约一致,说明直接给出调用规则。共享模型见 数据模型.

GET /api/v1/admin/notify/digest-preview

GET /api/v1/admin/notify/digest-preview

Preview the previous business day operations digest

{
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "properties": {
              "billed_bytes": {
                "type": "string"
              },
              "business_date": {
                "type": "string"
              },
              "currency": {
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "orders": {
                "type": "integer"
              },
              "paid_minor": {
                "type": "string"
              },
              "registered_users": {
                "type": "integer"
              },
              "time_zone": {
                "type": "string"
              }
            },
            "required": [
              "business_date",
              "time_zone",
              "currency",
              "orders",
              "paid_minor",
              "registered_users",
              "billed_bytes",
              "message"
            ],
            "type": "object"
          }
        }
      },
      "description": "Daily digest"
    },
    "403": {
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      },
      "description": "Permission required"
    }
  },
  "summary": "Preview the previous business day operations digest",
  "tags": [
    "notification-center"
  ],
  "x-body": "none",
  "x-body-limit": 0,
  "x-idempotency": "none",
  "x-permission": "notify.provider.manage",
  "x-rate-limit": "notify.center",
  "x-reauth": false,
  "effectiveSecurity": []
}

GET /api/v1/me/notification-preferences

GET /api/v1/me/notification-preferences

Read my optional notification preferences

{
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/NotificationPreferences"
          }
        }
      },
      "description": "Preferences"
    },
    "401": {
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      },
      "description": "Authentication required"
    },
    "404": {
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      },
      "description": "Not found"
    },
    "422": {
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      },
      "description": "Invalid input"
    }
  },
  "summary": "Read my optional notification preferences",
  "tags": [
    "notification-center"
  ],
  "x-body": "none",
  "x-body-limit": 0,
  "x-idempotency": "none",
  "x-rate-limit": "notify.center",
  "x-reauth": false,
  "effectiveSecurity": []
}

PUT /api/v1/me/notification-preferences

PUT /api/v1/me/notification-preferences

Save optional notification preferences

{
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/NotificationPreferences"
        }
      }
    },
    "required": true
  },
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/NotificationPreferences"
          }
        }
      },
      "description": "Preferences"
    },
    "401": {
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      },
      "description": "Authentication required"
    },
    "404": {
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      },
      "description": "Not found"
    },
    "422": {
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      },
      "description": "Invalid input"
    }
  },
  "summary": "Save optional notification preferences",
  "tags": [
    "notification-center"
  ],
  "x-audit": "notify.preferences.update",
  "x-body": "json",
  "x-body-limit": 4096,
  "x-idempotency": "none",
  "x-rate-limit": "notify.center",
  "x-reauth": false,
  "effectiveSecurity": []
}

GET /api/v1/me/notifications

GET /api/v1/me/notifications

List my inbox

{
  "parameters": [
    {
      "in": "query",
      "name": "cursor",
      "required": false,
      "schema": {
        "format": "uuid",
        "type": "string"
      }
    },
    {
      "in": "query",
      "name": "page_size",
      "required": false,
      "schema": {
        "default": 20,
        "maximum": 100,
        "minimum": 1,
        "type": "integer"
      }
    },
    {
      "in": "query",
      "name": "unread",
      "required": false,
      "schema": {
        "enum": [
          "true",
          "false"
        ],
        "type": "string"
      }
    }
  ],
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "properties": {
              "has_more": {
                "type": "boolean"
              },
              "items": {
                "items": {
                  "$ref": "#/components/schemas/InboxMessage"
                },
                "type": "array"
              },
              "next_cursor": {
                "format": "uuid",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "items",
              "next_cursor",
              "has_more"
            ],
            "type": "object"
          }
        }
      },
      "description": "Inbox page"
    },
    "401": {
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      },
      "description": "Authentication required"
    },
    "404": {
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      },
      "description": "Not found"
    },
    "422": {
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      },
      "description": "Invalid input"
    }
  },
  "summary": "List my inbox",
  "tags": [
    "notification-center"
  ],
  "x-body": "none",
  "x-body-limit": 0,
  "x-idempotency": "none",
  "x-rate-limit": "notify.center",
  "x-reauth": false,
  "effectiveSecurity": []
}

POST /api/v1/me/notifications/read-all

POST /api/v1/me/notifications/read-all

Mark my inbox read

{
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/InboxUnreadCount"
          }
        }
      },
      "description": "Unread count"
    },
    "401": {
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      },
      "description": "Authentication required"
    },
    "404": {
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      },
      "description": "Not found"
    },
    "422": {
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      },
      "description": "Invalid input"
    }
  },
  "summary": "Mark my inbox read",
  "tags": [
    "notification-center"
  ],
  "x-audit": "notify.inbox.read_all",
  "x-body": "none",
  "x-body-limit": 0,
  "x-idempotency": "none",
  "x-rate-limit": "notify.center",
  "x-reauth": false,
  "effectiveSecurity": []
}

GET /api/v1/me/notifications/telegram

GET /api/v1/me/notifications/telegram

Read my Telegram binding status

{
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "properties": {
              "bound": {
                "type": "boolean"
              }
            },
            "required": [
              "bound"
            ],
            "type": "object"
          }
        }
      },
      "description": "Binding status"
    },
    "401": {
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      },
      "description": "Authentication required"
    },
    "404": {
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      },
      "description": "Not found"
    },
    "422": {
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      },
      "description": "Invalid input"
    }
  },
  "summary": "Read my Telegram binding status",
  "tags": [
    "notification-center"
  ],
  "x-body": "none",
  "x-body-limit": 0,
  "x-idempotency": "none",
  "x-rate-limit": "notify.center",
  "x-reauth": false,
  "effectiveSecurity": []
}

POST /api/v1/me/notifications/telegram/bind

POST /api/v1/me/notifications/telegram/bind

Create a one-time Telegram binding link

{
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "additionalProperties": false,
          "properties": {
            "bot_key": {
              "pattern": "^[a-z0-9][a-z0-9_-]{0,31}$",
              "type": "string"
            }
          },
          "type": "object"
        }
      }
    },
    "required": true
  },
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "properties": {
              "expires_at": {
                "format": "date-time",
                "type": "string"
              },
              "url": {
                "type": "string"
              }
            },
            "required": [
              "url",
              "expires_at"
            ],
            "type": "object"
          }
        }
      },
      "description": "Private binding link"
    },
    "401": {
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      },
      "description": "Authentication required"
    },
    "403": {
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      },
      "description": "Reauthentication required"
    },
    "404": {
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      },
      "description": "Not found"
    },
    "422": {
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      },
      "description": "Invalid input"
    },
    "503": {
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      },
      "description": "Bot unavailable"
    }
  },
  "summary": "Create a one-time Telegram binding link",
  "tags": [
    "notification-center"
  ],
  "x-audit": "notify.telegram.bind",
  "x-body": "json",
  "x-body-limit": 1024,
  "x-idempotency": "none",
  "x-rate-limit": "notify.telegram.bind",
  "x-reauth": true,
  "effectiveSecurity": []
}

GET /api/v1/me/notifications/unread-count

GET /api/v1/me/notifications/unread-count

Count my unread messages

{
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/InboxUnreadCount"
          }
        }
      },
      "description": "Unread count"
    },
    "401": {
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      },
      "description": "Authentication required"
    },
    "404": {
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      },
      "description": "Not found"
    },
    "422": {
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      },
      "description": "Invalid input"
    }
  },
  "summary": "Count my unread messages",
  "tags": [
    "notification-center"
  ],
  "x-body": "none",
  "x-body-limit": 0,
  "x-idempotency": "none",
  "x-rate-limit": "notify.center",
  "x-reauth": false,
  "effectiveSecurity": []
}

PUT /api/v1/me/notifications/{id}/read

PUT /api/v1/me/notifications/{id}/read

Mark my message read

{
  "parameters": [
    {
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
        "format": "uuid",
        "type": "string"
      }
    }
  ],
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/InboxMessage"
          }
        }
      },
      "description": "Read message"
    },
    "401": {
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      },
      "description": "Authentication required"
    },
    "404": {
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      },
      "description": "Not found"
    },
    "422": {
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      },
      "description": "Invalid input"
    }
  },
  "summary": "Mark my message read",
  "tags": [
    "notification-center"
  ],
  "x-audit": "notify.inbox.read",
  "x-body": "none",
  "x-body-limit": 0,
  "x-idempotency": "none",
  "x-rate-limit": "notify.center",
  "x-reauth": false,
  "effectiveSecurity": []
}

GET /api/v1/public/unsubscribe/{token}

GET /api/v1/public/unsubscribe/{token}

Preview a signed unsubscribe action

{
  "parameters": [
    {
      "in": "path",
      "name": "token",
      "required": true,
      "schema": {
        "maxLength": 2048,
        "minLength": 1,
        "type": "string"
      }
    }
  ],
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "properties": {
              "category": {
                "enum": [
                  "marketing"
                ],
                "type": "string"
              },
              "channel": {
                "enum": [
                  "email",
                  "sms",
                  "telegram",
                  "inbox"
                ],
                "type": "string"
              }
            },
            "required": [
              "category",
              "channel"
            ],
            "type": "object"
          }
        }
      },
      "description": "Confirmation"
    },
    "400": {
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      },
      "description": "Invalid token"
    }
  },
  "summary": "Preview a signed unsubscribe action",
  "tags": [
    "notification-center"
  ],
  "x-body": "none",
  "x-body-limit": 0,
  "x-idempotency": "none",
  "x-rate-limit": "notify.unsubscribe",
  "x-reauth": false,
  "effectiveSecurity": []
}

POST /api/v1/public/unsubscribe/{token}

POST /api/v1/public/unsubscribe/{token}

Unsubscribe an optional notification channel

{
  "parameters": [
    {
      "in": "path",
      "name": "token",
      "required": true,
      "schema": {
        "maxLength": 2048,
        "minLength": 1,
        "type": "string"
      }
    }
  ],
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "properties": {
              "category": {
                "enum": [
                  "marketing"
                ],
                "type": "string"
              },
              "channel": {
                "enum": [
                  "email",
                  "sms",
                  "telegram",
                  "inbox"
                ],
                "type": "string"
              },
              "unsubscribed": {
                "enum": [
                  true
                ],
                "type": "boolean"
              }
            },
            "required": [
              "category",
              "channel",
              "unsubscribed"
            ],
            "type": "object"
          }
        }
      },
      "description": "Unsubscribed"
    },
    "400": {
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      },
      "description": "Invalid token"
    }
  },
  "summary": "Unsubscribe an optional notification channel",
  "tags": [
    "notification-center"
  ],
  "x-audit": "notify.unsubscribe",
  "x-body": "none",
  "x-body-limit": 0,
  "x-idempotency": "none",
  "x-rate-limit": "notify.unsubscribe",
  "x-reauth": false,
  "effectiveSecurity": []
}