SendSeven GmbH Comment Rules API
Configure automated rules that reply to or act on incoming social comments.
Configure automated rules that reply to or act on incoming social comments.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/sendseven-com:sendseven-com-comment-rules-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: SendSeven Comment Rules API
description: Unified messaging API for WhatsApp, Telegram, SMS, and more
version: '20261124.1227'
servers:
- url: https://api.sendseven.com
description: Production
tags:
- name: Comment Rules
description: Configure automated rules that reply to or act on incoming social comments.
paths:
/api/v1/social-comment-rules:
get:
tags:
- Comment Rules
summary: List Social Comment Rules
description: 'List comment auto-reply rules, in evaluation order.
Rules are returned in the order they are EVALUATED (priority ascending —
lower runs first), so the list reads top-to-bottom exactly as it behaves.
**Required Scopes:** `flows:read`'
operationId: list_social_comment_rules_api_v1_social_comment_rules_get
security:
- HTTPBearer: []
parameters:
- name: channel_id
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Filter by channel
title: Channel Id
description: Filter by channel
- name: enabled
in: query
required: false
schema:
anyOf:
- type: boolean
- type: 'null'
description: Filter by enabled state
title: Enabled
description: Filter by enabled state
- name: page
in: query
required: false
schema:
type: integer
minimum: 1
default: 1
title: Page
- name: page_size
in: query
required: false
schema:
type: integer
maximum: 100
minimum: 1
default: 20
title: Page Size
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
post:
tags:
- Comment Rules
summary: Create Social Comment Rule
description: 'Create a comment auto-reply rule.
**Required Scopes:** `flows:write`'
operationId: create_social_comment_rule_api_v1_social_comment_rules_post
security:
- HTTPBearer: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/SocialCommentRuleCreate'
responses:
'201':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/v1/social-comment-rules/{rule_id}:
get:
tags:
- Comment Rules
summary: Get Social Comment Rule
description: 'Get one comment auto-reply rule.
**Required Scopes:** `flows:read`'
operationId: get_social_comment_rule_api_v1_social_comment_rules__rule_id__get
security:
- HTTPBearer: []
parameters:
- name: rule_id
in: path
required: true
schema:
type: string
title: Rule Id
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
patch:
tags:
- Comment Rules
summary: Update Social Comment Rule
description: 'Update a comment auto-reply rule.
Partial: omitted fields are left untouched. ``channel_id`` cannot be
changed — moving a rule to another channel silently changes which posts it
can match, so that is a delete plus a create.
The MERGED rule is re-validated, not just the submitted fields: switching
``action`` to ``start_flow`` without also sending a ``flow_id`` has to fail
even though each field on its own looks fine.
**Required Scopes:** `flows:write`'
operationId: update_social_comment_rule_api_v1_social_comment_rules__rule_id__patch
security:
- HTTPBearer: []
parameters:
- name: rule_id
in: path
required: true
schema:
type: string
title: Rule Id
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/SocialCommentRuleUpdate'
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
delete:
tags:
- Comment Rules
summary: Delete Social Comment Rule
description: 'Delete a comment auto-reply rule.
A hard delete. Rules carry no history worth archiving — the comments they
acted on keep their own ``auto_replied`` state and their reply messages
independently of the rule that produced them.
**Required Scopes:** `flows:write`'
operationId: delete_social_comment_rule_api_v1_social_comment_rules__rule_id__delete
security:
- HTTPBearer: []
parameters:
- name: rule_id
in: path
required: true
schema:
type: string
title: Rule Id
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/DeleteResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
components:
schemas:
SocialCommentRuleUpdate:
properties:
name:
anyOf:
- type: string
maxLength: 255
minLength: 1
- type: 'null'
title: Name
enabled:
anyOf:
- type: boolean
- type: 'null'
title: Enabled
priority:
anyOf:
- type: integer
maximum: 1000.0
minimum: 0.0
- type: 'null'
title: Priority
post_scope:
anyOf:
- $ref: '#/components/schemas/SocialCommentRulePostScope'
- type: 'null'
post_ids:
anyOf:
- items:
type: string
type: array
- type: 'null'
title: Post Ids
match_mode:
anyOf:
- $ref: '#/components/schemas/SocialCommentRuleMatchMode'
- type: 'null'
keywords:
anyOf:
- items:
type: string
type: array
- type: 'null'
title: Keywords
action:
anyOf:
- $ref: '#/components/schemas/SocialCommentRuleAction'
- type: 'null'
reply_text:
anyOf:
- type: string
maxLength: 1000
- type: 'null'
title: Reply Text
flow_id:
anyOf:
- type: string
maxLength: 36
- type: 'null'
title: Flow Id
post_message_overrides:
anyOf:
- additionalProperties:
type: string
type: object
- type: 'null'
title: Post Message Overrides
reply_buttons:
anyOf:
- items:
$ref: '#/components/schemas/SocialCommentRuleButton'
type: array
maxItems: 3
- type: 'null'
title: Reply Buttons
reply_quick_replies:
anyOf:
- items:
$ref: '#/components/schemas/SocialCommentRuleQuickReply'
type: array
maxItems: 13
- type: 'null'
title: Reply Quick Replies
additionalProperties: false
type: object
title: SocialCommentRuleUpdate
description: 'PATCH body — every field optional.
Deliberately NOT a subclass of the base: inheriting would drag the base''s
defaults in, and a default is indistinguishable from an omitted field in a
PATCH. Here, "absent" genuinely means "leave it alone" (the endpoint uses
``exclude_unset``), so a caller can toggle ``enabled`` without restating the
rule. ``channel_id`` is absent on purpose: moving a rule to another channel
silently changes which posts it can match, so that is a delete + create.'
ValidationError:
properties:
loc:
items:
anyOf:
- type: string
- type: integer
type: array
title: Location
msg:
type: string
title: Message
type:
type: string
title: Error Type
input:
title: Input
ctx:
type: object
title: Context
type: object
required:
- loc
- msg
- type
title: ValidationError
SocialCommentRuleQuickReply:
properties:
content_type:
type: string
const: text
title: Content Type
description: Meta's chip kind. Only `text` is supported; the field exists so Meta's own documented payload validates unchanged.
default: text
title:
type: string
maxLength: 20
minLength: 1
title: Title
description: 'Chip label (Meta limit: 20 characters, truncated beyond that).'
action:
anyOf:
- type: string
const: start_flow
- type: 'null'
title: Action
description: What the chip does. `start_flow` starts `flow_id` for the person who tapped. Implied when `flow_id` is set.
flow_id:
anyOf:
- type: string
maxLength: 36
- type: 'null'
title: Flow Id
description: Flow started by a `start_flow` chip. Must be published and in this workspace, and must NOT be a "Comment received" flow — that trigger is reserved for the first message, whose one allowed private reply is the message carrying this chip.
payload:
anyOf:
- type: string
maxLength: 1000
- type: 'null'
title: Payload
description: Opaque value returned to you on tap (as `meta.button_id`). Defaults to the label. Mutually exclusive with `action`/`flow_id`.
additionalProperties: false
type: object
required:
- title
title: SocialCommentRuleQuickReply
description: 'One quick-reply chip on a rule''s private reply.
The sibling of :class:`SocialCommentRuleButton`, and the same division of
labour: shape-only validation here, everything needing the database or the
channel in ``private_reply_buttons.validate_and_normalize_quick_replies``
— the SAME validator the manual endpoint runs.
Differs from a button exactly where Meta differs: 13 permitted instead of
3, a `content_type` instead of a `type`, and **no URL kind** (Meta''s quick
reply object has no URL variant). A chip that starts a flow behaves
identically to a button that starts a flow, including the ban on
"Comment received" flows.'
DeleteResponse:
properties:
success:
type: boolean
title: Success
description: Whether deletion succeeded
default: true
id:
type: string
title: Id
description: ID of deleted resource
message:
anyOf:
- type: string
- type: 'null'
title: Message
default: Resource deleted successfully
type: object
required:
- id
title: DeleteResponse
description: Response for resource deletion
SocialCommentRulePostScope:
type: string
enum:
- all_posts
- specific_posts
title: SocialCommentRulePostScope
description: 'Which posts a rule watches. Stored LOWERCASE (values_callable).
Values are IDENTICAL to the ``scope`` values of the ``comment_received``
flow trigger config so a rule can be handed to ``match_comment_trigger``
verbatim.'
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
type: array
title: Detail
type: object
title: HTTPValidationError
SocialCommentRuleAction:
type: string
enum:
- send_private_reply
- start_flow
title: SocialCommentRuleAction
description: 'What a matching rule does. Exactly two options, on purpose.
``send_private_reply`` — the 90% case: one static (variable-substituted)
DM. Text-only, because Meta''s private-reply API is text-only.
``start_flow`` — the escape hatch for "one entry message, then wait for the
user''s answer". Hands off to the existing flow engine rather than growing a
second conversation runtime inside the rules engine.'
SocialCommentRuleCreate:
properties:
name:
type: string
maxLength: 255
minLength: 1
title: Name
description: Operator-facing label, e.g. "Summer sale — send the code".
enabled:
type: boolean
title: Enabled
description: Disabled rules are skipped entirely during evaluation.
default: true
priority:
type: integer
maximum: 1000.0
minimum: 0.0
title: Priority
description: Evaluation order — LOWER runs FIRST (same convention as flows). The first matching rule wins; no further rule is evaluated. Ties are broken by specificity (a post-scoped, keyworded rule beats a catch-all), then by age.
default: 0
post_scope:
$ref: '#/components/schemas/SocialCommentRulePostScope'
description: Watch every post on the channel, or only selected posts.
default: all_posts
post_ids:
anyOf:
- items:
type: string
type: array
- type: 'null'
title: Post Ids
description: Post identifiers to watch when post_scope is specific_posts. These are the platform's own post ids as returned by the channel's posts/media listing endpoint.
match_mode:
$ref: '#/components/schemas/SocialCommentRuleMatchMode'
description: any_comment reacts to every comment (no keywords needed, and it also matches comments with no text at all). contains / exact / starts_with compare against the keyword list, case-insensitively.
default: any_comment
keywords:
anyOf:
- items:
type: string
type: array
- type: 'null'
title: Keywords
description: Keywords to match. Ignored when match_mode is any_comment.
action:
$ref: '#/components/schemas/SocialCommentRuleAction'
description: Send a private reply, or hand the comment off to a flow.
default: send_private_reply
reply_text:
anyOf:
- type: string
maxLength: 1000
- type: 'null'
title: Reply Text
description: The private reply to send. Supports the same {{placeholders}} as the flow Send node — for example {{contact.first_name}} — plus {{comment.text}}, {{comment.author}} and {{post.caption}}.
flow_id:
anyOf:
- type: string
maxLength: 36
- type: 'null'
title: Flow Id
description: Flow to start when action is start_flow. The flow's trigger must be "Comment received".
post_message_overrides:
anyOf:
- additionalProperties:
type: string
type: object
- type: 'null'
title: Post Message Overrides
description: 'Optional per-post wording: {post_id: message}. A post listed here gets that message instead of reply_text; every other post falls back to reply_text.'
reply_buttons:
anyOf:
- items:
$ref: '#/components/schemas/SocialCommentRuleButton'
type: array
maxItems: 3
- type: 'null'
title: Reply Buttons
description: Up to 3 buttons attached to the private reply. Supported on both Facebook Messenger and Instagram. A control the rule's channel cannot carry is rejected when the rule is saved, not silently stripped when it fires. Only meaningful when action is send_private_reply.
reply_quick_replies:
anyOf:
- items:
$ref: '#/components/schemas/SocialCommentRuleQuickReply'
type: array
maxItems: 13
- type: 'null'
title: Reply Quick Replies
description: DEPRECATED / IGNORED. Comment private replies are buttons-only since 2026-08-13. This field is still accepted for backwards compatibility so older clients do not get a 422, but it is never validated, stored, or sent — use reply_buttons instead.
channel_id:
type: string
maxLength: 36
title: Channel Id
description: The Instagram or Facebook channel this rule watches.
type: object
required:
- name
- channel_id
title: SocialCommentRuleCreate
description: POST body. ``channel_id`` is immutable, so it only exists here.
SocialCommentRuleButton:
properties:
type:
type: string
enum:
- url
- postback
title: Type
description: '`url` opens a link; `postback` sends a value back to you.'
default: postback
title:
type: string
maxLength: 20
minLength: 1
title: Title
description: 'Button label (Meta limit: 20 characters).'
url:
anyOf:
- type: string
maxLength: 2000
- type: 'null'
title: Url
description: Destination of a `url` button. Absolute **https** URL, required for that type and rejected on a `postback` button.
action:
anyOf:
- type: string
const: start_flow
- type: 'null'
title: Action
description: What a `postback` button does. `start_flow` starts `flow_id` for the person who tapped. Implied when `flow_id` is set.
flow_id:
anyOf:
- type: string
maxLength: 36
- type: 'null'
title: Flow Id
description: Flow started by a `start_flow` button. Must be published and in this workspace, and must NOT be a "Comment received" flow — that trigger is reserved for the first message, whose one allowed private reply is the message carrying this button.
payload:
anyOf:
- type: string
maxLength: 1000
- type: 'null'
title: Payload
description: Opaque value returned to you on tap (as `meta.button_id`). Defaults to the label. Mutually exclusive with `action`/`flow_id`.
attachment_id:
anyOf:
- type: string
maxLength: 64
- type: 'null'
title: Attachment Id
description: Editor-side hint on a `url` button whose URL is an attachment's public link ("file button"). Stored so the editor can re-open the button as a file; never sent to the recipient. The link is not reference-counted — deleting the attachment later breaks it.
source:
anyOf:
- type: string
maxLength: 64
- type: 'null'
title: Source
description: Editor-side hint naming where a `url` button's link came from (e.g. `attachment`). Stored, never sent to the recipient.
additionalProperties: false
type: object
required:
- title
title: SocialCommentRuleButton
description: 'One button on a rule''s private reply.
Shape-only validation lives here (enum membership, lengths). Everything
needing the database or the channel — "is this an Instagram channel?",
"does this flow exist in this tenant and can it be started from a button?"
— is enforced by ``private_reply_buttons.validate_and_normalize_buttons``
in the service layer, which is the SAME validator the manual
``POST /comments/{id}/private-reply`` endpoint runs. There is exactly one
set of button rules in the product.'
SocialCommentRuleMatchMode:
type: string
enum:
- any_comment
- contains
- exact
- starts_with
title: SocialCommentRuleMatchMode
description: 'How ``keywords`` are compared against the comment text.
``contains`` / ``exact`` / ``starts_with`` are the EXACT modes
``match_comment_trigger`` already implements (case-insensitive, trimmed).
``any_comment`` is the "reply to everything" option: it needs no keywords
and matches even a text-less (image / sticker) comment.'
securitySchemes:
HTTPBearer:
type: http
scheme: bearer