Automations
List Inbox Automations
Lists keyword auto-reply rules for Instagram and Facebook connections. Omit accountId to list rules for every connection.
GET
header
x-api-key<token>Workspace API key, sent in the x-api-key header. Keys start with op_ and are created in the dashboard.
accountId?stringLength
1 <= lengthname?stringReturns rules whose name contains this text. Matching ignores case.
Length
1 <= lengthAutomation rules
application/json- response
rules*array<>Example Request
import { Configuration, EngagementApi } from "@onepostly/sdk";const engagementApi = new EngagementApi( new Configuration({ apiKey: process.env.ONEPOSTLY_API_KEY }));const response = await engagementApi.listAutomations({ accountId: "a1b2c3d4-e5f6-4a7b-8c9d-e0f1a2b3c4d5", name: "guide",});console.log(response);Example Response
{ "rules": [ { "id": "string", "name": "Free guide giveaway", "kind": "comment_to_dm", "keywords": [ "guide", "free" ], "excludeKeywords": [ "guidelines" ], "dmMessage": "Thanks for your interest! Here is your guide.", "enabled": true, "accountId": "string" } ]}