> ## Documentation Index
> Fetch the complete documentation index at: https://docs.automate.ax/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Automate.ax automations are TypeScript programs.
> Use Bun for installation and command examples.
> Use Automate.ax for the product name and automate.ax for the package, CLI, and domain.
> Treat documented public APIs as current; do not invent transitional or deprecated names.

# Update scheduled event

> Update a Discord scheduled event's details or status.

`discord.updateScheduledEvent` updates a Discord scheduled event's details or status.

```ts automations/discord-update-scheduled-event.automation.ts theme={null}
import { automation, onHttpRequest } from "automate.ax"
import { discord } from "automate.ax/discord"

export default automation("Update scheduled event", () => {
  onHttpRequest({ scope: "automation" })
  discord.updateScheduledEvent({
    guildId: "123456789012345678",
    eventId: "345678901234567890",
    status: "active",
  })
})
```

## Inputs

Required server and event IDs. Optional name, description, channel, entity type, location, start/end times, status, and audit-log `reason`. When you supply both times, the end must be after the start. Optional second argument `{ account }` selects the Discord binding.

## Output

Returns the updated `DiscordScheduledEvent`.

## Discord behavior

Requires `MANAGE_EVENTS`. Changes to type-dependent fields, either timestamp, or status first read the event so Automate.ax can validate the complete resulting event. Changing `entityType` to `external` also requires `location` and `scheduledEndTime`; the action clears `channelId`. Changing it to `voice` or `stage` requires `channelId`, cannot set `location`, and clears external location metadata. Status can move from scheduled to active or canceled, and from active to completed.
