---
title: "Get a post's automation"
method: GET
path: "/posts/{id}/automation"
tags: ["Automation"]
---

# Get a post's automation

`GET /posts/{id}/automation`

## Request

- Base URL: `https://www.sociahive.com/api/v1`
- URL: `https://www.sociahive.com/api/v1/posts/{id}/automation`
- Auth: one of:
  - API key in header `X-API-Key`
  - OAuth 2 (authorization code, authorization URL `/api/oauth/authorize`, token URL `/api/oauth/token`, scopes: `flows:read`, `posts:read`)

## Path parameters

- `id` string, required: MongoDB ObjectId (24-character hex string)

## Response `200`

Automation + preview

- object
  - `data` object, required
    - `automation` object, nullable, required
      - `state` string, required: Derived state. Known values: `none`, `building`, `failed`, `off`, `armed`, `live`, `needs_attention`. Treat any other value as unknown, never as an error.
      - `flow_id` string, required
      - `flow_name` string, required
      - `door` string, required: How the automation was built. Known values: `funnel`, `template`, `prompt`. Treat any other value as unknown, never as an error.
      - `account_id` string, required
      - `armed` boolean, required: Turns on when the post goes live. Only a person sets this.
      - `bound` boolean, required: The trigger points at the published media id.
      - `error` object
        - `code` string, required: The fix to offer, e.g. `placeholder_text`, `link_placeholder`, `unbound_media`, `account_disconnected`, `tier_limit`. Open-ended.
        - `message` string, required
      - `allowed_actions` string[], required: What the user can do now. Known values: arm, unarm, turn_on, turn_off, remove, rebind, retry, fill_blanks, open. Ignore unknown values.
      - `flow_live_waiting_for_post` boolean
    - `preview` object, nullable, required
      - `flow_id` string, required
      - `state` string, required: Build state. Known values: `building`, `ready`, `failed`. Treat any other value as unknown, never as an error.
      - `snapshot` object, nullable, required: The web recipe projection.
      - `steps` string[], required: The recipe as numbered plain lines.
      - `blanks` PostAutomationBlank[], required
        - `nodeId` string, required
        - `nodeName` string, required
        - `token` string, required
        - `context` string, required
        - `link` boolean, required
      - `content_hash` string, required: Send back as `previewed_hash` to arm.
      - `error` object
        - `reason` string, required
        - `message` string, required

## Other responses

- `400`: Bad request — invalid parameters
- `401`: Authentication required — provide X-API-Key or Bearer token
- `403`: Insufficient scope for this operation
- `404`: Post not found (post_not_found)
- `429`: Rate limit exceeded
- `500`: Internal server error

---

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