Skip to content

Rule.io SDK


Rule.io SDK / client/src / UpdateEmailAutomationPayload

Interface: UpdateEmailAutomationPayload

Defined in: client/src/resources/automations/automations.types.ts:290

Payload for AutomationsClient.updateEmailAutomation.

All fields are optional — only the fields you include are changed. The client fetches the existing record, merges your changes over it, and writes the complete merged body back to the API.

Example ​

typescript
// Pause an automation
await client.automations.updateEmailAutomation(automationId, { active: false });

// Change the trigger
await client.automations.updateEmailAutomation(automationId, {
  trigger: { type: 'SEGMENT', id: segmentId },
});

Properties ​

active? ​

optional active?: boolean

Defined in: client/src/resources/automations/automations.types.ts:298

New active state.

false pauses the automation without deleting it.


name? ​

optional name?: string

Defined in: client/src/resources/automations/automations.types.ts:292

New name.


sendoutType? ​

optional sendoutType?: AutomationSendoutType

Defined in: client/src/resources/automations/automations.types.ts:311

New sendout type.

'marketing' = standard marketing email. 'transactional' = triggered transactional email.


tagActionsOnFinish? ​

optional tagActionsOnFinish?: AutomationFinishTagEntry[]

Defined in: client/src/resources/automations/automations.types.ts:324

New finish tags — attached to or removed from subscribers once the automation completes for them.

Omit this field entirely to leave the automation's existing finish tags unchanged. Pass an empty array [] to remove all finish tags, or a full list to replace the existing set (this is a replacement, not a merge — tags not included are removed).

Each tagId can appear at most once — the API rejects a request that both adds and removes the same tag.


trigger? ​

optional trigger?: AutomationTrigger

Defined in: client/src/resources/automations/automations.types.ts:304

New trigger configuration.

type must be uppercase.