Skip to main content
POST
/
experiences
/
{id}
/
detach
Detach experience
curl --request POST \
  --url https://api.whop.com/api/v1/experiences/{id}/detach \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "product_id": "prod_xxxxxxxxxxxxx"
}
'
import requests

url = "https://api.whop.com/api/v1/experiences/{id}/detach"

payload = { "product_id": "prod_xxxxxxxxxxxxx" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({product_id: 'prod_xxxxxxxxxxxxx'})
};

fetch('https://api.whop.com/api/v1/experiences/{id}/detach', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.whop.com/api/v1/experiences/{id}/detach",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'product_id' => 'prod_xxxxxxxxxxxxx'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.whop.com/api/v1/experiences/{id}/detach"

payload := strings.NewReader("{\n \"product_id\": \"prod_xxxxxxxxxxxxx\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.whop.com/api/v1/experiences/{id}/detach")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"product_id\": \"prod_xxxxxxxxxxxxx\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.whop.com/api/v1/experiences/{id}/detach")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"product_id\": \"prod_xxxxxxxxxxxxx\"\n}"

response = http.request(request)
puts response.read_body
{
  "app": {
    "icon": {
      "url": "https://media.whop.com/abc123/optimized.jpg"
    },
    "id": "app_xxxxxxxxxxxxxx",
    "name": "Courses"
  },
  "company": {
    "id": "biz_xxxxxxxxxxxxxx",
    "route": "pickaxe",
    "title": "Pickaxe"
  },
  "created_at": "2023-12-01T05:00:00.401Z",
  "id": "exp_xxxxxxxxxxxxxx",
  "image": {
    "url": "https://media.whop.com/abc123/optimized.jpg"
  },
  "is_public": true,
  "name": "Trading Signals Chat",
  "order": "123.45",
  "products": [
    {
      "id": "prod_xxxxxxxxxxxxx",
      "route": "pickaxe-analytics",
      "title": "Pickaxe Analytics"
    }
  ]
}
{
"error": {
"code": "parameter_missing",
"message": "Missing required parameter: amount.",
"param": "amount",
"type": "invalid_request_error"
}
}
{
"error": {
"message": "Invalid or missing API key",
"type": "unauthorized"
}
}
{
"error": {
"message": "You do not have permission to access this resource",
"type": "forbidden"
}
}
{
"error": {
"message": "Resource not found",
"type": "not_found"
}
}
{
"error": null
}
{
"error": null
}
{
"error": {
"message": "An unexpected error occurred",
"type": "internal_server_error"
}
}

Authorizations

Authorization
string
header
required

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 ***************************

Path Parameters

id
string
required

The unique identifier of the experience to detach.

Example:

"exp_xxxxxxxxxxxxxx"

Body

application/json

Parameters for RemoveExperienceFromAccessPass

product_id
string
required

The unique identifier of the product to detach the experience from.

Example:

"prod_xxxxxxxxxxxxx"

Response

A successful response

An experience is a feature or content module within a product, such as a chat, course, or custom app.

app
object
required

The app that powers this experience, defining its interface and behavior.

company
object
required

The company that owns this experience.

created_at
string<date-time>
required

The datetime the experience was created.

Example:

"2023-12-01T05:00:00.401Z"

id
string
required

The unique identifier for the experience.

Example:

"exp_xxxxxxxxxxxxxx"

image
object | null
required

The custom logo image for this experience. Null if no custom logo has been uploaded.

is_public
boolean
required

Whether this experience is publicly visible to all users, including those without a membership.

name
string
required

The display name of this experience shown to users in the product navigation. Maximum 255 characters.

Example:

"Trading Signals Chat"

order
string | null
required

The sort position of this experience within its section. Lower values appear first. Null if no position has been set.

Example:

"123.45"

products
object[]
required

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.