Skip to main content
This function and all other functions in this graphql sdk are deprecated. Please migrate to the new rest api.
This operation is only available on the server.

Usage

import { whopSdk } from "@/lib/whop-sdk";

const result = await whopSdk.notifications.sendPushNotification({
	// The ID of the company team to send the notification to
	companyTeamId: "biz_XXXXXXXX",

	// The content of the notification
	content: "some string" /* Required! */,

	// The ID of the experience to send the notification to
	experienceId: "exp_XXXXXXXX",

	// An external ID for the notification
	externalId: "some string",

	// Whether the notification is a mention
	isMention: true,

	// The link to open when the notification is clicked. If you just want to append
	// a rest path use the restPath parameter. You can link to any url here.
	link: "some string",

	// The rest path to append to the generated deep link that opens your app. Use
	// [restPath] in your app path in the dashboard to read this parameter.
	restPath: "some string",

	// The ID of the user sending the notification
	senderUserId: "user_XXXXXXXX",

	// The subtitle of the notification
	subtitle: "some string",

	// The title of the notification
	title: "some string" /* Required! */,

	// The IDs of the users to send the notification to.
	userIds: ["xxxxxxxxxxx"],
});

Example output

const result = true;