• Product Introduction
  • Quick Start
    • Importing a Git Repository
    • Starting From a Template
    • Direct Upload
    • Start with AI
  • Framework Guide
    • Frontends
      • Vite
      • React
      • Vue
      • Other Frameworks
    • Backends
    • Full-stack
      • Next.js
      • Nuxt
      • Astro
      • React Router
      • SvelteKit
      • TanStack Start
      • Vike
    • Custom 404 Page
  • Project Guide
    • Project Management
    • edgeone.json
    • Configuring Cache
    • Error Codes
  • Build Guide
  • Deployment Guide
    • Overview
    • Create Deploys
    • Manage Deploys
    • Deploy Button
    • Using Github Actions
    • Using Gitlab CI/CD
    • Using CNB Plugin
    • Using IDE PlugIn
    • Using CodeBuddy IDE
  • Domain Management
    • Overview
    • Custom Domain
    • HTTPS Configuration
      • Overview
      • Apply for Free Certificate
      • Using Managed SSL Certificate
    • Configure DNS CNAME Record
  • Observability
    • Overview
    • Metric Analysis
    • Log Analysis
  • Pages Functions
    • Overview
    • Edge Functions
    • Cloud Functions
      • Overview
      • Node Functions
  • Middleware
  • KV Storage
  • Edge AI
  • API Token
  • EdgeOne CLI
  • Pages MCP
  • Message Notification
  • Integration Guide
    • AI
      • Dialogue Large Models Integration
      • Large Models for Images Integration
    • Database
      • Supabase Integration
      • Pages KV Integration
    • Ecommerce
      • Shopify Integration
      • WooCommerce Integration
    • Payment
      • Stripe Integration
      • Integrating Paddle
    • CMS
      • WordPress Integration
      • Contentful Integration
      • Sanity Integration
      • Payload Integration
    • Authentication
      • Supabase Integration
      • Clerk Integration
  • Best Practices
    • Using General Large Model to Quickly Build AI Application
    • Use the DeepSeek model to quickly build a conversational AI site
    • Building an Ecommerce Platform with Shopify
    • Building a SaaS Site Using Supabase and Stripe
    • Building a Company Brand Site Quickly
    • How to Quickly Build a Blog Site
  • Migration Guides
    • Migrating from Vercel to EdgeOne Pages
    • Migrating from Cloudflare Pages to EdgeOne Pages
    • Migrating from Netlify to EdgeOne Pages
  • Troubleshooting
  • FAQs
  • Contact Us
  • Release Notes

Message Notification

Message notification is an event push feature provided by EdgeOne Pages. When a specific event occurs in your project, Pages will send you a notification through different channels (Message Center, mailbox, SMS) or Webhook to help you promptly learn about the running state of your project.

Supported Event Types

Pages supports notifications for the following event types:
Category
Event
Field
Description
Domain
Domain name configuration
domain.added
Trigger when adding a custom domain (Temporary not including CNAME configuration, certificate configuration and delete event)
Deployment
Deployment failed
deployment.failed
Trigger when an error occurs during deployment
Deployment successful
deployment.succeeded
Trigger when deployment completed and successful
Deployment created
deployment.created
Trigger when a new deployment starts
Project
Delete Project
project.deleted
Trigger when a project is deleted
Update project
project.settings.updated
Trigger when project setting is modified
Create project
project.created
Trigger when new project is created

Use Notifications to Receive Messages

The notification feature allows you to receive Pages events via Message Center, mailbox or SMS. See the following operation steps:
1. You can use a Gmail Account to quickly register and log in to the Tencent Cloud console.
2. Enter the Pages setting, click Notification, toggle on the notification setting and select the notification events to receive.

Once enabled, the notification feature includes the following notification channels:
Message Center - Receive notifications in the Tencent Cloud console.
Mailbox - Receive email notifications.
SMS - Receive SMS notifications.
For each event type, you can separately select whether to receive notifications.

Using Webhook for Custom Push Channel

Webhook allows you to push EdgeOne Pages events in real time to your own server or a third-party service. When a specific event occurs in Pages, an HTTP POST request is sent to your configured Webhook endpoint, containing complete event data. See the following operation steps:
1. You can use a Gmail Account to quickly register and log in to the Tencent Cloud console.
2. Enter the Pages setting, click Webhooks, fill in the Webhook configuration details. The configuration reference is as follows:
Configuration Item
Description
Project
All items: Webhook takes effect for all projects under the account.
Designated Project: Webhook is only applicable to select projects.
Event
Select the Event Type to listen, supporting multiple selections.
Webhook URL (required): The domain names or IP addresses of your server to receive event notifications.
Key token (Optional): Used to validate requests source. Leave empty to be automatically generated by the platform.


Related Reference

Webhook Endpoint Configuration Explanation

What Is an Endpoint

An endpoint is a URL on the server used to receive Webhook requests from Pages.

Request Format

When an event occurs, Pages will send an HTTP POST request to your endpoint.
HTTP request header:
POST /webhooks/edgeone-pages HTTP/1.1
Host: example.com
Content-Type: application/json
Accept: application/json, text/plain, */*
Accept-Encoding: gzip, compress, deflate, br
Authorization: Bearer xxx
Connection: keep-alive
Request body example (JSON format):
Event example for deployment (deployment.created):
{
"eventType": "deployment.created",
"appId": "app-123",
"projectId": "project-456",
"deploymentId": "deploy-789",
"projectName": "my-project",
"repoBranch": "main",
"timestamp": "2024-01-13T12:34:56.789Z"
}
Event example for project (project.created):
{
"eventType": "project.created",
"appId": "app-123",
"projectId": "project-456",
"projectName": "my-project",
"repoUrl": "https://github.com/user/repo",
"timestamp": "2024-01-13T12:34:56.789Z"
}
Event example for domain name (domain.added):
{
"eventType": "domain.added",
"appId": "app-123",
"projectId": "project-456",
"projectName": "my-project",
"domainName": "example.com",
"domainId": "domain-789",
"timestamp": "2024-01-13T12:34:56.789Z"
}
Field description:
Field
Type
Description
Usage Scenario
eventType
string
Event type
ALL (all events)
appId
string
account ID
ALL (all events)
projectId
string
project ID
ALL (all events)
timestamp
string
Event occurrence timestamp (ISO 8601 format).
ALL (all events)
projectName
string
Project Name
ALL (all events)
deploymentId
string
Deployment ID
Deployment event
repoBranch
string
Git branch
Deployment event
repoUrl
string
Repository URL
Project event
domainName
string
Domain name
Domain name event
domainId
string
Domain name ID
Domain name event
Note:
If your endpoint returns a non-2xx status code or cannot be accessed, Pages will automatically retry up to 3 times with an exponential backoff policy.

How to Achieve an Endpoint

You need to implement an endpoint on your own server to receive Webhook requests. The following is a Cloud Functions example:
/**
* API path: /webhooks/demo
*/

/**
* Verify Bearer Token (optional)
*/
function verifyToken(authHeader, expectedToken) {
if (!expectedToken) return true; // skip verification if unconfigured
const parts = authHeader?.split(' ');
if (parts?.length !== 2 || parts[0] !== 'Bearer') return false;
return parts[1] === expectedToken;
}

/**
* Handle webhook events
*/
function handleEvent(eventType, data) {
switch (eventType) {
case 'deployment.created':
console.log(`🚀 Deployment created: ${data.projectName} (${data.repoBranch})`);
// Add your business logic herein
// For example: send notifications, update database
return { message: 'Deployment event processed', projectName: data.projectName };
case 'project.created':
console.log(`📁 Project created: ${data.projectName}`);
return { message: 'Project event processed', projectName: data.projectName };
// For more events, see supported event types
default:
console.log(`⚠️ Unknown event: ${eventType}`);
return { message: 'Unknown event type', eventType };
}
}

/**
* Cloud Function portal
*/
export async function onRequest(context) {
const { request, env } = context;

// 1. Health check
if (request.method === 'GET') {
return new Response(JSON.stringify({ status: 'ok', message: 'Webhook endpoint is ready' }), {
headers: { 'Content-Type': 'application/json' }
});
}

// 2. Only POST is accepted
if (request.method !== 'POST') {
return new Response(JSON.stringify({ error: 'Method not allowed' }), {
status: 405,
headers: { 'Content-Type': 'application/json' }
});
}

try {
// 3. Verify Bearer Token (optional)
const authHeader = request.headers.get('authorization');
const webhookToken = env.WEBHOOK_TOKEN;
if (webhookToken && !verifyToken(authHeader, webhookToken)) {
return new Response(JSON.stringify({ error: 'Unauthorized' }), {
status: 401,
headers: { 'Content-Type': 'application/json' }
});
}

// 4. Parse the request body
const payload = await request.json();
const eventType = payload.eventType || payload.type;

// 5. Event handling
const result = handleEvent(eventType, payload);

// 6. Return success response
return new Response(JSON.stringify({
success: true,
eventType,
result,
timestamp: new Date().toISOString()
}), {
status: 200,
headers: { 'Content-Type': 'application/json' }
});

} catch (error) {
console.error('Handle error:', error);
return new Response(JSON.stringify({
error: 'Internal server error',
message: error.message
}), {
status: 500,
headers: { 'Content-Type': 'application/json' }
});
}
}
ai-agent
You can ask me like
How to Get Started with EdgeOne Pages?