SociaHive Docs

Plugs

Repost a post or add a comment once it reaches a number of likes, comments, reposts or views.

A plug is a one-time follow-up on a post: "when this gets 100 likes, repost it" or "when this gets 50 comments, add this comment". SociaHive checks the post's numbers and runs the action once, the first time the goal is reached.

Plugs are on the Creator, Studio, Pro and Agency plans. Calls from a free account get 403 with code: "feature_disabled".

What each platform supports

PlatformMetricsActionsChecked
Xlikes, comments (replies), reposts (incl. quotes), viewsrepost, comment (a reply under the post)every 30 minutes for 24 hours
Instagramlikes, commentscommentevery 5 minutes for the first hour, then every 30, for 48 hours
Facebook Pagelikes (all reactions), comments, reposts (shares)commentevery 5 minutes for the first hour, then every 30, for 48 hours
LinkedIn company pagelikes, comments, repostscomment (as the page)every 5 minutes for the first hour, then every 30, for 48 hours

LinkedIn plugs work on company page posts only (LinkedIn shares a personal post's numbers only with a permission it grants to select developers), and only once LinkedIn approves company pages for SociaHive.

The window starts when the post goes live. A plug can be added while the post is scheduled (it waits) or after it is live, but not on a draft.

Limits: 3 plugs per account on a post, 10 watching at once per user. X reads are billed per read, so checks per account are also capped per minute and per day; when the daily cap is reached the plug shows "Daily check limit reached" and resumes the next day.

States

StateMeaning
armedWatching. last_value and last_checked_at show progress. While the action runs, fired_at is set and the plug cannot be removed.
firedThe action ran, once.
expiredThe window ended without reaching the goal (NOT_REACHED), the post was deleted (POST_DELETED) or unscheduled.
failedSee error. AMBIGUOUS_MAY_HAVE_POSTED means the platform did not answer: check the post before adding the plug again. Plugs never retry an action.

REST API

GET /api/v1/posts/{id}/plugs (scope posts:read) returns { plugs, targets, limits }. targets lists the post's accounts that can carry a plug, with their metrics and actions.

POST /api/v1/posts/{id}/plugs (scope posts:write):

{
  "account_id": "66f0c0ffee0000000000aaaa",
  "trigger": { "metric": "likes", "threshold": 100 },
  "action": { "kind": "comment", "text": "Thanks for the love. The guide is linked in my bio." }
}

DELETE /api/v1/posts/{id}/plugs?plug_id=<id> removes a plug in any state (409 firing while its action runs).

Agent tools

  • list_plugs { postId }: the post's plugs and the targets that can carry one.
  • arm_plug { postId, accountId?, metric, threshold, action, text? }: needs confirmation, because it posts to a real audience when it fires. accountId can be left out when the post has a single account that can carry a plug.

CLI

sociahive plugs list <postId>
sociahive plugs add <postId> --metric likes --threshold 100 --action repost --yes
sociahive plugs add <postId> --metric comments --threshold 50 --action comment --text "Link in bio" --yes

Webhook

post.plug_fired is sent once per plug, after its action ran:

{
  "type": "post.plug_fired",
  "data": {
    "plug_id": "…",
    "post_id": "…",
    "account_id": "…",
    "platform": "twitter",
    "metric": "likes",
    "threshold": 100,
    "value": 104,
    "action": "repost"
  }
}

On this page