---
title: "Arm or unarm a post's automation"
method: PATCH
path: "/posts/{id}/automation"
tags: ["Automation"]
---

# Arm or unarm a post's automation

`PATCH /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:write`, `posts:write`)

Only a person (the SociaHive iOS app) may call this; API keys and third-party OAuth clients get 403 arm_requires_human.

## Path parameters

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

## Request body

- object
  - `armed` boolean, required
  - `previewed_hash` string

## Response `200`

Armed state

- object
  - `data` object, required
    - `armed` boolean, required

## Other responses

- `400`: Bad request — invalid parameters
- `401`: Authentication required — provide X-API-Key or Bearer token
- `403`: Plan access (feature_disabled) or not a person (arm_requires_human)
- `404`: No automation on this post (no_automation)
- `409`: automation_changed, activating_now, already_live, still_building
- `422`: The automation would not pass the publish gate (code names the fix)
- `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)
