Skip to main content
POST
/
experiences
/
{id}
/
attach
JavaScript
import Whopsdk from 'whopsdk';

const client = new Whopsdk({
  apiKey: 'My API Key',
});

const experience = await client.experiences.attach('exp_xxxxxxxxxxxxxx', {
  product_id: 'prod_xxxxxxxxxxxxx',
});

console.log(experience.id);
{
  "id": "exp_xxxxxxxxxxxxxx",
  "name": "<string>",
  "order": "123.45",
  "created_at": 1701406800,
  "app": {
    "id": "app_xxxxxxxxxxxxxx",
    "name": "<string>"
  },
  "company": {
    "id": "biz_xxxxxxxxxxxxxx",
    "title": "<string>",
    "route": "<string>"
  },
  "products": [
    {
      "id": "prod_xxxxxxxxxxxxx",
      "route": "<string>",
      "title": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

The app API key from an app from the /dashboard/developer page

Path Parameters

id
string
required
Example:

"exp_xxxxxxxxxxxxxx"

Body

application/json

Parameters for AddExperienceToAccessPass

product_id
string
required

The ID of the Access Pass to add the Experience to.

Example:

"prod_xxxxxxxxxxxxx"

Response

A successful response

An object representing an experience belonging to a company.

id
string
required

The unique ID representing this experience

Example:

"exp_xxxxxxxxxxxxxx"

name
string
required

The written name of the description.

order
string | null
required

The order of the experience in the section

Example:

"123.45"

created_at
integer
required

The timestamp of when this experience was created.

Example:

1701406800

app
object
required

The experience interface for this experience.

company
object
required

The company that owns this experience.

products
object[]
required

The access passes that are associated with this experience. This should not be used unless you are trying to list all access passes the experience has, for some reason. You probably don't want to use this though and should be using accessPass.

I