# Create Experience Schedule — Xola

> Creates a new schedule for an experience. See the documentation

- Key: `xola-create-experience-schedule`
- Type: Action (Write)
- Version: 0.0.1
- App: Xola (`xola`) — https://pipedream.com/apps/xola.md
- This page (HTML): https://pipedream.com/apps/xola/actions/create-experience-schedule
- Hints: open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/xola/actions/create-experience-schedule/create-experience-schedule.mjs

## Description

Creates a new schedule for an experience. [See the documentation](https://xola.github.io/xola-docs/#tag/schedules/operation/createExperienceSchedule)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `sellerId` | `string` | Yes | The unique identifier of the seller Options are loaded from the connected account. |
| `experienceId` | `string` | Yes | The unique identifier of the experience Options are loaded from the connected account. |
| `name` | `string` | Yes | Name for this schedule |
| `type` | `string` | Yes | Can be for an open (available) schedule or a blackout schedule |
| `days` | `string[]` | No | Days of week |
| `departure` | `string` | No | Whether departure time is fixed or varies |
| `times` | `string[]` | No | Start times in HHMM format (e.g., 900 = 9:00 AM, 1400 = 2:00 PM, 1800 = 6:00 PM). |
| `priceDelta` | `string` | No | Price adjustment for this schedule (can be positive or negative). Only available when Type is available |
| `repeat` | `string` | No | When and how the schedule should repeat. Options are weekly (repeat the same schedule every week until End, if specified), or custom, which can be used in conjunction with Dates to specify individual days for the schedule to run |
| `start` | `string` | No | Start date of the schedule in ISO 8601 format. Example: 2024-01-01T00:00:00Z |
| `end` | `string` | No | End date of the schedule in ISO 8601 format. Example: 2024-12-31T23:59:59Z |
| `dates` | `string[]` | No | Specific dates when this schedule applies. Only available when Repeat is custom. Format is YYYY-MM-DD. Cannot be combined with End. |

## Run it

**MCP**

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID!,
        "x-pd-environment": "production",
        "x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
        "x-pd-app-slug": "xola",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
  name: "xola-create-experience-schedule",
  arguments: {
    sellerId: "Seller ID",
    experienceId: "Experience ID",
  },
})
```

**TypeScript**

```ts
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "xola-create-experience-schedule",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    xola: { authProvisionId: "apn_xxxxxxx" },
    sellerId: "Seller ID",
    experienceId: "Experience ID",
  },
})

console.log(result)
```

**cURL**

```bash
curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
  -H "Content-Type: application/json" \
  -H "X-PD-Environment: production" \
  -H "Authorization: Bearer {access_token}" \
  -d '{
    "external_user_id": "{external_user_id}",
    "id": "xola-create-experience-schedule",
    "configured_props": {
      "xola": { "authProvisionId": "apn_xxxxxxx" },
      "sellerId": "Seller ID",
      "experienceId": "Experience ID"
    }
  }'
```

---

- App: https://pipedream.com/apps/xola.md · All apps: https://pipedream.com/apps
