Skip to main content
Altcraft Docs LogoAltcraft Docs Logo
User guide iconUser guide
Developer guide iconDeveloper guide
Admin guide iconAdmin guide
English
  • Русский
  • English
Login
    Getting StartedAdministrator documentationFunctional characteristics
      Technology descriptionarrow
    • Architecture OverviewComponent Description
        Deployment schemesarrow
      • Basic schemeFail-safe schemeTypical Placement in Infrastructure
    System requirements
      Admin Panelarrow
      • Account areaarrow
        • Accountsarrow
        • Account UsersAccount Virtual SendersAccount Database Indexes
        TariffsExternal data configurationLDAPTasksSchedule JobsGlobal Stop ListsWebversion Store Policies
        Settingsarrow
      • Databases
          Accessarrow
        • AdminsAPI tokens
        Notifiers
          MTAarrow
        • Default rulesRetry rulesLock rulesBounce patternsStrategiesKeysISPsPools
      Nodes
        Sendersarrow
      • EmailSMSEvent generatorIntegration with Altcraft Cloud SMTPIntegration with Sendsay
        Reportsarrow
      • Audit JournalData Usage
        Toolsarrow
      • ARF decoderURL decoderSMID decoderLicense
      Platform installationarrow
    • Automatic installationManual installationRunning the platform in a Docker container
      Platform configurationarrow
    • Configuration fileDomain settingsLDAP access configurationSending Email via SMTP relayPixel and push domain configurationCluster and Replication SetupSystem notifications configurationProcesses UNIX sockets configurationHTTPS ConfigurationMigrating from MongoDB Community Edition to Percona Server for MongoDBAdding sender IP addressesDeduplication request settingsPostgreSQL database for Market dataProxy server settingsKeycloak Integration with AltcraftGetting HTTP service statusesConfiguring MongoDB log rotation
        Configuration of system constants and directoriesarrow
      • Filtering bot actionsDirectory of gender markers
      Custom Channelsarrow
    • Creating a Channel
        Pipelinesarrow
      • MessageScheduleListenerModerateStop
          Pipesarrow
        • HTTP RequestPackUnpackEventerSchedulerSelectorSQLStore SetStore GetLogResultError
      External Objects (Entities)Templating LanguageSending FilesPresets (Field Sets)DebuggingTechnical Limitations
      Platform maintenancearrow
    • Personnel requirementsPlatform maintenance processesPlatform updatingBackup and recoveryTransferring the platform to a new serverCreating, deleting, and populating tables for statistics in ClickHouseUsing the aktool utilityUsers and directories engaged by the platformPlatform service monitoringProcess and mailing monitoring via Prometheus
      Extraarrow
    • System page customizationSend Message IDClickHouse History Migration GuideInstructions for migrating history to ClickHouseUtility for importing push subscriptions to Firebase projectUtility for importing push subscriptions to Firebase projectENS: настройка интеграции
    Processing HTTP/HTTPS traffic
      Administrator APIarrow
      • Accounts admin apiarrow
        • Restricted accessarrow
        • Account Activation and DeactivationAccount Freeze and Unfreeze
        Get accounts listAdd a new accountDelete the account
        Account usersarrow
      • Update an Existing AccountAdd a new userDelete a userGet a list of usersSending a Welcome Email
        Nodesarrow
      • Synchronize node MTA configurationGet nodes listGet node MTA statusActivate node MTADeactivate node MTA
        Senders admin apiarrow
      • Create or update AKMTA senderGet AKMTA sender informationAssign account to senderGet senders listDelete senderRestore sender
          Sender queuearrow
        • Get sender queue informationHold sender queueRelease sender queueClear sender queue
        Virtual sendersarrow
      • Get virtual senders listGet virtual sender informationCreate virtual senderUpdate virtual senderClone virtual senderDelete virtual sender
    Documentation Archive
  • Custom Channels
  • Pipelines
  • Moderate

Moderate

Moderate is a pipeline for processing mailing moderation actions. It is available only for indirect channels that have the Enable moderation (With moderate) option enabled in their main settings.

How moderation works​

From a technical perspective, moderation is a separate launch of a mailing, where the message is sent not to the Message pipeline, but to Moderate. In this pipeline, you can implement the logic for sending content for approval, processing the moderation result, and registering the corresponding events.

User workflow​

  1. Creation and activation. The user creates a placement campaign on a channel with moderation enabled and activates it. The campaign receives the ModerationPending status. The edit form is locked, and only the Abort button is available.

  2. Sending for moderation. The platform launches a binary campaign process with the SendForModerate=true flag. Messages are routed to the Moderate pipeline via the piper_moderate queue instead of being sent directly. The pipeline processes the content (e.g., sends it to an external moderation service via HTTP Request).

  3. Moderation result. The external service returns a result processed by the Eventer pipe:

    • moderate_pass — moderation passed. Campaign status changes to ModerationPassed. The mailing will launch on schedule if configured, or via the Run Now button.
    • moderate_error — moderation failed. Campaign status changes to ModerationError. A red warning icon and the error message from the Eventer message field are displayed in the interface.
  4. Fix and resubmit. With ModerationError status, the user can fix the campaign content and save it again. The campaign is automatically sent for re-moderation (returns to ModerationPending status).

  5. Launch the mailing. After successful moderation (ModerationPassed), the mailing launches on schedule or via the Run Now button, and the message is delivered through the regular Message pipeline.

Limitations​

  • A campaign in ModerationPending or ModerationPassed status cannot be re-activated — it can only be deactivated.
  • The "Run Now" button is unavailable for campaigns in ModerationPending and ModerationError statuses — moderation is required first.
  • The "Start now" checkbox is hidden when creating a campaign on a channel with moderation enabled.

Pipeline configuration​

To manage moderation status, use the Eventer pipe with event types moderate_pass and moderate_error.

note

For moderate_pass, moderate_error, and stop events, the event_type parameter is specified in Eventer, and action_type is not required. For all other event types, event_type is not used — instead, action_type (the event ID from the channel's Events section) is specified.

Minimal example​

A pipeline that sends content for moderation via HTTP and processes the result:

[
{
"id": 1,
"type": "pack",
"params": {
"type": "JSON",
"template": {
"content": "$template.text",
"campaign_id": "$#origin.c_id"
}
},
"outs": {
"success": 2
}
},
{
"id": 2,
"type": "http_request",
"params": {
"method": "POST",
"timeout": 10,
"content_type": "json",
"url": "https://api.example.com/moderate",
"success_codes": [200]
},
"outs": {
"success": 3,
"error": 4
}
},
{
"id": 3,
"type": "event",
"params": {
"event_type": "moderate_pass",
"event": {
"send_message_id": "$origin.send_message_id"
}
}
},
{
"id": 4,
"type": "event",
"params": {
"event_type": "moderate_error",
"event": {
"send_message_id": "$origin.send_message_id",
"message": "$in.body.error"
}
}
}
]

In this example:

  • Pipe 1 (Pack) forms the request body with message content and campaign ID.
  • Pipe 2 (HTTP Request) sends the request to the external moderation service. Depending on the result, it routes to pipe 3 (success) or pipe 4 (error).
  • Pipe 3 (Eventer) registers a moderate_pass event — the campaign gets ModerationPassed status.
  • Pipe 4 (Eventer) registers a moderate_error event with the error text from the service response ($in.body.error) — the campaign gets ModerationError status, and the error text will be displayed in the interface.
Last updated on Jul 21, 2026
Previous
Listener
Next
Stop
  • How moderation works
    • User workflow
    • Limitations
  • Pipeline configuration
  • Minimal example
© 2015 - 2026 Altcraft, LLC. All rights reserved.