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

# Create or Update Automation Template

> Create a new automation template or update an existing one

## Endpoint

```bash theme={null}
POST https://api.ugc.inc/automations/create
```

## Request Body

<ParamField body="name" type="string" required>
  Template display name.
</ParamField>

<ParamField body="workflowDefinition" type="WorkflowDefinition" required>
  Workflow graph definition (`nodes` and optional `canvasState`).
</ParamField>

<ParamField body="description" type="string">
  Optional template description.
</ParamField>

<ParamField body="templateId" type="string">
  If set, updates the existing template instead of creating a new one.
</ParamField>

<ParamField body="skipValidation" type="boolean">
  If `true`, skips workflow validation (for draft saves).
</ParamField>

## Response

<ResponseField name="data" type="string">
  Template ID.
</ResponseField>

## TypeScript

```typescript theme={null}
const res = await client.automations.createTemplate({
  name: 'My Workflow',
  workflowDefinition,
});
```
