Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.whop.com/llms.txt

Use this file to discover all available pages before exploring further.

Send push notifications to users in your app. Notifications appear in the Whop mobile app and web interface.

Pick your notification type

Experience notificationCompany notification
AudienceUsers with access to an experienceTeam members of a company
Best forCustomer-facing apps (alerts, social, fitness)Dashboard apps (admin actions, reports, alerts)
Required keying fieldexperience_idcompany_id
Filter to specific usersuser_ids (must have experience access)user_ids (must be team members)
Sending notifications requires the notification:create permission. Add it from the Permissions guide. The experience must belong to your app, or the company must have your app installed.

Send to everyone in an experience

Send notifications to all users with access to an experience:
const result = await client.notifications.create({
  experience_id: 'exp_xxxxxxxxxxxxxx',
  title: 'New Feature Available',
  subtitle: 'Check it out now',
  content: 'We just released a new feature that helps you track your progress better.',
});

console.log(result.success); // true

Example use case: If you’re building a fitness tracking app, you could send a notification to everyone when a new workout program is released, or send targeted notifications to users who completed a 7-day streak to celebrate their achievement.

Send to specific users

Use the user_ids parameter to send notifications only to specific users. These users must also have access to the experience.
const result = await client.notifications.create({
  experience_id: 'exp_xxxxxxxxxxxxxx',
  title: 'Complete your daily workout',
  content: 'You\'re 50% of the way to your goal. Finish strong!',
  user_ids: ['user_abc123', 'user_def456'],
});

Send to company team members

Send notifications to all team members of a company (dashboard app users):
const result = await client.notifications.create({
  company_id: 'biz_xxxxxxxxxxxxxx',
  title: 'Monthly Report Ready',
  subtitle: 'October 2024',
  content: 'Your monthly analytics report has been generated and is ready to view.',
});
Example use case: If you’re building a tax filing dashboard, you could send notifications to all team members when a filing deadline is approaching, or send targeted reminders to specific users who still need to complete steps in the filing process.

Send to specific team members

Use the user_ids parameter to send notifications only to specific team members. These users must also be team members of the company.
const result = await client.notifications.create({
  company_id: 'biz_xxxxxxxxxxxxxx',
  title: 'Action Required',
  content: 'Please review and approve the pending invoices.',
  user_ids: ['user_manager1', 'user_manager2'],
});
Direct users to specific pages in your app when they tap a notification using the rest_path parameter.

Setting up your app path

First, configure your app path in the dashboard to handle the dynamic route parameter:
  1. Go to your app settings in the developer dashboard
  2. In the hosting section, update your “App path” to include [restPath]
For experience apps:
/experiences/[experienceId]/[restPath]
For dashboard apps:
/companies/[companyId]/[restPath]
Add the rest_path parameter to your notification. This will be appended to your app’s base URL.
// Experience app: Direct to a specific workout
await client.notifications.create({
  experience_id: 'exp_xxxxxxxxxxxxxx',
  title: 'Today\'s Recommended Workout',
  content: 'Based on your progress, we recommend this HIIT session.',
  rest_path: '/workouts/hiit-advanced-1',
});

// Dashboard app: Direct to a specific report
await client.notifications.create({
  company_id: 'biz_xxxxxxxxxxxxxx',
  title: 'Unusual Activity Detected',
  content: 'Review the flagged transactions in your dashboard.',
  rest_path: '/reports/flagged-transactions',
});

Handling the route in your app

When a user taps the notification, they’ll be directed to the full URL constructed from your app path and the rest_path. Example for experience app: If your app is hosted at https://your-app.com and you send:
rest_path: "/posts/post_123";
The user will open:
https://your-app.com/experiences/exp_xxxxxxxxxxxxxx/posts/post_123
In Next.js, create a file at:
app/experiences/[experienceId]/posts/[postId]/page.tsx
In Express, handle the route:
app.get("/experiences/:experienceId/posts/:postId", (req, res) => {
	// Handle the notification deep link
});
You can also use query parameters:
rest_path: "?action=review&id=123";

Custom notification icons

By default, notifications display your experience or company avatar. Customize the icon by providing a Whop user ID whose profile picture will be used.
await client.notifications.create({
  experience_id: 'exp_xxxxxxxxxxxxxx',
  title: 'New Comment',
  content: 'Sarah replied to your post: "Great progress!"',
  icon_user_id: 'user_sarah123',
  rest_path: '/posts/my-post-123',
});
This is useful for social features where you want to show who performed an action (commented, liked, followed, etc).

Next steps

Build a chat bot

Pair notifications with in-app messages so users get pinged regardless of where they are.

Listen to webhooks

Trigger notifications off payment.succeeded, membership.activated, and other server events.

Forums

Notify users when new posts or comments land in your forum experience.

Request permissions

Confirm your app’s permission setup so notifications send successfully.