> ## 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 snippet

> Updates a snippet's name, content, or archive state.

`kit.updateSnippet` updates a snippet's name, content, or archive state.

```ts automations/update-snippet.automation.ts theme={null}
import { automation, markSignificant } from "automate.ax"
import { kit } from "automate.ax/kit"

export default automation("Update snippet", () => {
  markSignificant(
    kit.updateSnippet({
      id: 60,
      name: "Updated welcome note",
    }),
  )
})
```

## Input

Pass these fields:

| Field                | Type      | Required | Description                                                |
| -------------------- | --------- | -------- | ---------------------------------------------------------- |
| `id`                 | `integer` | Yes      | —                                                          |
| `name`               | `string`  | No       | New name for the snippet                                   |
| `snippetType`        | `string`  | No       | Cannot be changed—must match the existing type if provided |
| `archived`           | `boolean` | No       | Pass `true` to archive or `false` to restore the snippet   |
| `content`            | `string`  | No       | New Liquid-enabled text content                            |
| `documentAttributes` | `object`  | No       | Updated rich-text document                                 |

## Output

Returns an object with these fields:

| Field     | Type     | Required | Description |
| --------- | -------- | -------- | ----------- |
| `snippet` | `object` | Yes      | —           |

Kit rate limits OAuth connections to 600 requests per 60 seconds and V4 API keys to 120 requests per 60 seconds. Automate.ax honors provider retry timing for rate-limit and temporary bulk-capacity responses.
