import Whop from '@whop/sdk';
const client = new Whop({
apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted
});
const experience = await client.experiences.duplicate('exp_xxxxxxxxxxxxxx');
console.log(experience.id);{
"id": "exp_xxxxxxxxxxxxxx",
"name": "Trading Signals Chat",
"order": "123.45",
"is_public": true,
"created_at": "2023-12-01T05:00:00.401Z",
"app": {
"id": "app_xxxxxxxxxxxxxx",
"name": "Courses",
"icon": {
"url": "https://media.whop.com/abc123/optimized.jpg"
}
},
"image": {
"url": "https://media.whop.com/abc123/optimized.jpg"
},
"company": {
"id": "biz_xxxxxxxxxxxxxx",
"title": "Pickaxe",
"route": "pickaxe"
},
"products": [
{
"id": "prod_xxxxxxxxxxxxx",
"route": "pickaxe-analytics",
"title": "Pickaxe Analytics"
}
]
}Duplicates an existing experience. The name will be copied, unless provided. The new experience will be attached to the same products as the original experience. If duplicating a Forum or Chat experience, the new experience will have the same settings as the original experience, e.g. who can post, who can comment, etc. No content, e.g. posts, messages, lessons from within the original experience will be copied.
Required permissions:
experience:createimport Whop from '@whop/sdk';
const client = new Whop({
apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted
});
const experience = await client.experiences.duplicate('exp_xxxxxxxxxxxxxx');
console.log(experience.id);{
"id": "exp_xxxxxxxxxxxxxx",
"name": "Trading Signals Chat",
"order": "123.45",
"is_public": true,
"created_at": "2023-12-01T05:00:00.401Z",
"app": {
"id": "app_xxxxxxxxxxxxxx",
"name": "Courses",
"icon": {
"url": "https://media.whop.com/abc123/optimized.jpg"
}
},
"image": {
"url": "https://media.whop.com/abc123/optimized.jpg"
},
"company": {
"id": "biz_xxxxxxxxxxxxxx",
"title": "Pickaxe",
"route": "pickaxe"
},
"products": [
{
"id": "prod_xxxxxxxxxxxxx",
"route": "pickaxe-analytics",
"title": "Pickaxe Analytics"
}
]
}A company API key, company scoped JWT, app API key, or user OAuth token. You must prepend your key/token with the word 'Bearer', which will look like Bearer ***************************
The unique identifier of the experience to duplicate.
"exp_xxxxxxxxxxxxxx"
Parameters for DuplicateExperience
The display name for the duplicated experience. Defaults to the original experience's name.
A successful response
An experience is a feature or content module within a product, such as a chat, course, or custom app.
The unique identifier for the experience.
"exp_xxxxxxxxxxxxxx"
The display name of this experience shown to users in the product navigation. Maximum 255 characters.
"Trading Signals Chat"
The sort position of this experience within its section. Lower values appear first. Null if no position has been set.
"123.45"
Whether this experience is publicly visible to all users, including those without a membership.
The datetime the experience was created.
"2023-12-01T05:00:00.401Z"
The app that powers this experience, defining its interface and behavior.
Show child attributes
The custom logo image for this experience. Null if no custom logo has been uploaded.
Show child attributes
The company that owns this experience.
Show child attributes
The list of products this experience is attached to, which determines which customers have access. Empty if the experience is only visible to authorized company team members.
Show child attributes
Was this page helpful?