---
title: "UpdateEndpointBody"
description: "Request body for updating an Endpoint."
section: "Reference"
group: "Types"
order: 84
---

## Definition

```ts
interface UpdateEndpointBody {
  method?: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | undefined;
  path?: string | undefined;
  handlerType?: "function" | "workflow" | "agent" | "swarm" | undefined;
  handlerId?: string | undefined;
  auth?:
    | { kind: "public"; rateLimitPerMinute?: number | undefined }
    | { kind: "workspace_api_key" }
    | { kind: "oauth"; scope: string }
    | { kind: "event_signature"; secretSource: "secret_ref"; secretId: string }
    | null
    | undefined;
  cors?:
    | { allowOrigins: Array<string>; allowCredentials?: boolean | undefined }
    | null
    | undefined;
  timeoutSeconds?: number | undefined;
  enabled?: boolean | undefined;
}
```

## Fields

| Field            | Type                                                                                                                                                                                                                                      | Notes                                                                         |
| ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
| `method`         | `"GET" \| "POST" \| "PUT" \| "PATCH" \| "DELETE" \| undefined`                                                                                                                                                                            | `optional` — New HTTP method.                                                 |
| `path`           | `string \| undefined`                                                                                                                                                                                                                     | `optional` — New path within the API.                                         |
| `handlerType`    | `"function" \| "workflow" \| "agent" \| "swarm" \| undefined`                                                                                                                                                                             | `optional` — New handler type — must be paired with a compatible `handlerId`. |
| `handlerId`      | `string \| undefined`                                                                                                                                                                                                                     | `optional` — New handler ID (agent / function / workflow).                    |
| `auth`           | `{ kind: "public"; rateLimitPerMinute?: number \| undefined; } \| { kind: "workspace_api_key"; } \| { kind: "oauth"; scope: string; } \| { kind: "event_signature"; secretSource: "secret_ref"; secretId: string; } \| null \| undefined` | `optional` — Replace the auth override; null to fall back to the API default. |
| `cors`           | `{ allowOrigins: Array<string>; allowCredentials?: boolean \| undefined; } \| null \| undefined`                                                                                                                                          | `optional` — Replace the CORS override; null to fall back to the API default. |
| `timeoutSeconds` | `number \| undefined`                                                                                                                                                                                                                     | `optional` — New timeout in seconds (max 300).                                |
| `enabled`        | `boolean \| undefined`                                                                                                                                                                                                                    | `optional` — Toggle whether the route accepts traffic.                        |
