---
title: "Get an automation"
method: GET
path: "/v1/automations/{automation_id}"
tags: ["Automations"]
---

# Get an automation

`GET /v1/automations/{automation_id}`

## Request

- Base URL: `https://api.mailrith.com`
- URL: `https://api.mailrith.com/v1/automations/{automation_id}`
- Auth: HTTP bearer

Returns one automation from the authenticated workspace.

## Path parameters

- `automation_id` string, required

## Response `200`

Successful response

- object
  - `data` Automation, required
    - `self` string, required: Stable relative Public API path for retrieving this resource.
    - `id` string, required
    - `name` string, required
    - `status` 'draft' | 'running' | 'paused', required
    - `is_updating` boolean, required: True while Mailrith updates existing Subscriber progress after a structural Automation change.
    - `definition` AutomationDefinition, required
      - `version` 2
      - `trigger` AutomationTrigger
        - `type` 'tag_added' | 'tag_removed' | 'magic_link_clicked' | 'subscriber_status', required
        - `tagId` string, nullable
        - `tagIds` string[]
        - `magicLinkId` string, nullable
        - `magicLinkIds` string[]
        - `operator` 'is' | 'is_not'
        - `statuses` string[]
      - `triggers` AutomationTrigger[]
        - `type` 'tag_added' | 'tag_removed' | 'magic_link_clicked' | 'subscriber_status', required
        - `tagId` string, nullable
        - `tagIds` string[]
        - `magicLinkId` string, nullable
        - `magicLinkIds` string[]
        - `operator` 'is' | 'is_not'
        - `statuses` string[]
      - `entryPoints` AutomationEntryPoint[]
        - `id` string, required
        - `trigger` AutomationTrigger, required
          - `type` 'tag_added' | 'tag_removed' | 'magic_link_clicked' | 'subscriber_status', required
          - `tagId` string, nullable
          - `tagIds` string[]
          - `magicLinkId` string, nullable
          - `magicLinkIds` string[]
          - `operator` 'is' | 'is_not'
          - `statuses` string[]
        - `name` string, nullable
        - `description` string, nullable
      - `steps` AutomationStep[], required
        - `id` string, required
        - `kind` 'event' | 'action' | 'condition', required
        - `type` 'tag_added' | 'tag_removed' | 'magic_link_clicked' | 'sequence_completed' | 'add_tag' | 'remove_tag' | 'add_to_sequence' | 'remove_from_sequence' | 'change_subscriber_status' | 'wait' | 'update_custom_field' | 'send_email' | 'send_internal_notification' | 'start_automation' | 'remove_from_automation' | 'webhook' | 'end_automation' | 'has_tag' | 'custom_field_match' | 'sequence_membership' | 'subscriber_status' | 'email_opened' | 'email_clicked', required
        - `config` AutomationStepConfig
          - `tagId` string
          - `sequenceId` string
          - `magicLinkId` string
          - `customFieldId` string
          - `automationId` string
          - `emailId` string
          - `status` string
          - `statuses` string[]
          - `operation` 'set' | 'clear' | 'increment' | 'decrement' | 'set_today' | 'add_choices' | 'remove_choices' | 'set_true' | 'set_false' | 'toggle'
          - `operator` 'equals' | 'not_equals' | 'contains' | 'not_contains' | 'starts_with' | 'ends_with' | 'exists' | 'missing' | 'greater_than' | 'greater_than_or_equal' | 'less_than' | 'less_than_or_equal' | 'on' | 'not_on' | 'before' | 'on_or_before' | 'after' | 'on_or_after' | 'contains_any' | 'contains_all' | 'does_not_contain_any' | 'is_checked' | 'is_not_checked'
          - `value` union
            - string
            - number
            - boolean
            - string[]
          - `mode` 'duration' | 'until_custom_date' | 'until_custom_field_date'
          - `waitMode` 'duration' | 'custom_date'
          - `dateSource` 'custom_field' | 'fixed_date'
          - `date` string, date
          - `timeOfDay` string
          - `durationValue` number
          - `durationUnit` 'minute' | 'hour' | 'day' | 'week'
          - `waitForCompletion` boolean
          - `waitUntilComplete` boolean
          - `exitNextStepId` string, nullable
          - `lookbackDays` integer
          - `recipientEmail` string, email
          - `subject` string: For Subscriber personalization in email subjects and body text nodes, use Mailrith bracket tokens such as [Subscriber_Name, fallback="friend"] or [Subscriber_Email, fallback=""]. Before using a custom field, call custom_fields_list or custom_fields_get and copy its personalization_token exactly. Do not use Handlebars-style variables such as {{ subscriber.name }}; Mailrith sends them as literal text.
          - `previewText` string
          - `bodyDocument` BroadcastEmailDocument
            - `type` 'doc' | 'paragraph' | 'heading' | 'text' | 'hardBreak' | 'bulletList' | 'orderedList' | 'listItem' | 'blockquote' | 'emailSection' | 'emailSectionColumn' | 'emailButton' | 'image' | 'horizontalRule', required
            - `attrs` object
              - …
            - `content` BroadcastEmailNode[]
              - …
            - `text` string
            - `marks` BroadcastEmailMark[]
              - …
          - `replyToEmail` string
          - `trackOpens` boolean
          - `trackClicks` boolean
          - `utmSource` string
          - `utmMedium` string
          - `utmCampaign` string
          - `utmTerm` string
          - `utmContent` string
          - `url` string, uri
          - `method` 'POST' | 'PUT' | 'PATCH'
          - `authType` 'none' | 'bearer'
          - `bearerToken` string
          - `bearerTokenConfigured` boolean: True when Mailrith has a saved webhook bearer token. Send this unchanged during an update to preserve the saved value. The token value is never returned.
          - `headers` object[]
            - `key` string, required
            - `value` string: A secret header value accepted on writes and never returned.
            - `configured` boolean: True when Mailrith has a saved value for this header. Send this unchanged during an update to preserve the saved value.
          - `includeSubscriber` boolean
          - `includeTags` boolean
          - `includeCustomFields` boolean
        - `stats` EmailEngagementStats
          - `recipientCount` integer, required
          - `engagedCount` integer
          - `openedCount` integer, required
          - `clickedCount` integer, required
          - `clickedSubscriberCount` integer
          - `unsubscribedCount` integer, required
          - `bouncedCount` integer
          - `complainedCount` integer
          - `sentCountsByDay` object
        - `note` string, nullable
        - `nextStepId` string, nullable
        - `branches` object
        - `paths` AutomationPath[]
          - `id` string, required
          - `label` string, required
          - `nextStepId` string, nullable
          - `weight` number, nullable
    - `subscriber_count` integer, required
    - `created_at` string, date-time, required
    - `updated_at` string, date-time, required

## Other responses

- `404`: Resource not found

---

[API](https://skmtc.dev/mailrith/apis/mailrith-api.md) · [All operations](https://skmtc.dev/mailrith/apis/mailrith-api/llms.txt) · [OpenAPI document](https://skmtc.dev/mailrith/apis/mailrith-api/revisions/41f09536f2da?raw)
