ai

Policy Scan Automation

Scan a draft Automation for Meta Community Standards violations BEFORE the user persists it. Frontend calls this on the create/edit form submit and obeys the verdict (block / warn / allow).

Runs:

  • LLM scan against Meta policy KB (Sonnet 5 + caching)
  • Static checks: auto_reply_limit > threshold, keyword reuse on the same account's other automations + flows.
post/v1/ai/policy_scan_automation

Request

  • Base URL
    https://api.linktodm.com (the document declares no server; this is the origin it was published from)
  • Auth
    HTTP bearer

Query parameters

exclude_automation_idinteger nullable

When scanning an EDIT, pass the current automation id so the keyword-reuse check doesn't flag the automation's own keywords.

Request body

namestring required
type'Auto DM Link' | 'Auto DM Products' | 'Button Text' | 'Attachment' required

Stub schema.

facebook_account_idstring nullable
instagram_business_account_idstring nullable
instagram_user_idstring nullable
media_type'IMAGE' | 'VIDEO' | 'CAROUSEL_ALBUM'
media_urlstring nullable
media_idstring nullable
keywordsstring[] nullable
dm_messagestring nullable
attachment_idinteger nullable
disable_auto_replyboolean nullable
auto_reply_messagesstring[] nullable
auto_reply_mode'MANUAL' | 'AI'
auto_reply_ai_promptstring nullable
auto_reply_limitinteger nullable
ask_to_followboolean nullable
is_activeboolean
is_draftboolean
is_storyboolean nullable
is_universalboolean nullable
trigger_type'STORY_MENTION' | 'CURRENT_MEDIA' | 'AD_MEDIA'
disable_url_trackingboolean nullable
disable_dmboolean nullable
one_dm_per_userboolean nullable
one_dm_per_user_window_hoursinteger nullable
share_media_for_dmboolean
enable_opener_messageboolean nullable
keyword_trigger_type'ANY' | 'EXACT_MATCH' | 'EXCLUDE' | 'AI_INTENT'
media_source'INSTAGRAM' | 'FACEBOOK'
trigger_ai_promptstring nullable
use_next_postboolean nullable
use_next_storyboolean nullable
use_rewindboolean nullable

Response

Successful Response

automation_type'automation' | 'flow_automation' required
scanned_atstring required
policy_versionstring required
verdict'allow' | 'warn' | 'block' required
verdict_messagestring required
verdict_categorystring nullable
highest_severity'none' | 'low' | 'medium' | 'high' required

Changes

No recorded changes to this operation across all 1 revision of this API.