# Update Event — pretix

> Updates a specific event. See the documentation

- Key: `pretix-update-event`
- Type: Action (Write)
- Version: 0.0.2
- App: pretix (`pretix`) — https://pipedream.com/apps/pretix.md
- This page (HTML): https://pipedream.com/apps/pretix/actions/update-event
- Hints: destructive · open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/pretix/actions/update-event/update-event.mjs

## Description

Updates a specific event. [See the documentation](https://docs.pretix.eu/en/latest/api/resources/events.html#patch--api-v1-organizers-(organizer)-events-(event)-)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `organizerSlug` | `string` | Yes | The slug of the organizer. Options are loaded from the connected account. |
| `eventSlug` | `string` | Yes | The slug of the event. Options are loaded from the connected account. |
| `name` | `string` | No | The event's full name |
| `live` | `boolean` | No | If true, the event ticket shop is publicly available. |
| `testmode` | `boolean` | No | If true, the ticket shop is in test mode. |
| `currency` | `string` | No | The currency this event is handled in. |
| `dateFrom` | `string` | No | The event's start date. |
| `dateTo` | `string` | No | The event's end date. |
| `dateAdmission` | `string` | No | The event's admission date. |
| `isPublic` | `boolean` | No | If true, the event shows up in places like the organizer's public list of events |
| `presaleStart` | `string` | No | The date at which the ticket shop opens. |
| `presaleEnd` | `string` | No | The date at which the ticket shop closes. |
| `location` | `string` | No | The event location. |
| `getLat` | `string` | No | Latitude of the location. |
| `getLon` | `string` | No | Longitude of the location. |
| `timezone` | `string` | No | Event timezone name. |
| `itemMetaProperties` | `object` | No | Item-specific meta data parameters and default values. |

## 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": "pretix",
      },
    },
  },
)

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: "pretix-update-event",
  arguments: {
    organizerSlug: "Organizer Slug",
    eventSlug: "Event Slug",
  },
})
```

**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: "pretix-update-event",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    pretix: { authProvisionId: "apn_xxxxxxx" },
    organizerSlug: "Organizer Slug",
    eventSlug: "Event Slug",
  },
})

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": "pretix-update-event",
    "configured_props": {
      "pretix": { "authProvisionId": "apn_xxxxxxx" },
      "organizerSlug": "Organizer Slug",
      "eventSlug": "Event Slug"
    }
  }'
```

---

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