# Post Callbacks

Automate follow-up actions when you publish or schedule posts: auto-share to other accounts, post follow-up comments (or thread posts on some networks), or auto-delete/hide content after specified conditions are met.

### Overview

Post callbacks are automation features you include per-account in the API request when creating posts. Callbacks are configured inside each `accounts[]` entry. The main callback types:

* AutoShare — automatically share a published post to other social accounts
* Follow-up Comments — schedule one or multiple comments (or threaded posts) tied to a post
* Auto-Delete / Auto-Hide — automatically remove or hide posts after conditions are met

Conditions are represented with a structured `conditions` object (relation + clauses) and can combine Time (age), Reach and Engagements checks using `AND`/`OR`.

### Endpoints

* Schedule with callbacks:\
  `POST /api/v1/posts/schedule`
* Publish now with callbacks:\
  `POST /api/v1/posts/schedule/publish`

Callbacks live inside each account object in your request payload.

### Request structure (top-level)

* bulk
  * state (e.g., "scheduled")
  * posts\[]:
    * networks: { \<network\_name>: { type, text, details, ... } }
    * accounts\[]:
      * id
      * scheduled\_at (optional)
      * share (optional)
      * comments (optional array)
      * delete (optional)

### Conditions object

Use conditions to define when a callback should execute.

Structure:

* conditions
  * relation: "AND" | "OR"
  * clauses:
    * age: { duration: number, unit: "Minute" | "Hour" | "Day" | "Week" }
    * engagements: { comparison: "gt" | "lt", value: number }
    * reach: { comparison: "gt" | "lt", value: number }

Notes:

* `age` corresponds to "Is older than".
* `engagements` and `reach` use `comparison` with "gt" (>) or "lt" (<).
* A `conditions` object can include any subset of clauses; combine them using `relation`.

### Auto-Sharing

Automatically share the link of the published post to the specified accounts.

Fields:

* share.account\_ids (string\[]) — target account IDs to share to
* share.text (string) — caption for the share (fallback: original post text where supported)
* share.conditions (object) — when the share should run (see Conditions object)
* share.account\_ids order + `delay` determine spacing between shares

Example:

```json
"share": {
  "account_ids": ["A_ID_1", "A_ID_2"],
  "text": "Check out our latest blog post!",
  "conditions": {
    "relation": "AND",
    "clauses": {
      "age": { "duration": 1, "unit": "Hour" },
      "engagements": { "comparison": "gt", "value": 10 },
      "reach": { "comparison": "gt", "value": 100 }
    }
  },
  "delay": {
      "duration": 0,
      "unit": "Minute"
    },
}
```

Supported networks: Facebook Pages→Groups (when posting as a Page to a Group), Twitter/X, LinkedIn, Pinterest, Mastodon, Threads, BlueSky, TikTok, Telegram, Google Business Profiles.

* Note: Google Business Profiles require non-empty text to auto-share.

### Follow-up Comments

Schedule comments on the published post (or create follow-up posts/threads on some networks).

Fields:

* comments\[]:
  * text (string) — comment body (text, hashtags, links, emoji)
  * language (string, optional)
  * media: (optional array)
  * conditions (object, optional) — when to post the comment (see Conditions object)

#### Comment media fields

`media` is an array of media objects.

**When `type` is `photo`**

Each media item uses:

* `id`
* `type`
* `path`
* `caption`
* `thumbnail`

**Photo example**

```json
{
  "media": [
    {
      "id": "69de4805ef6eccdc0ca11a15",
      "type": "photo",
      "path": "https://cdn.publer.com/uploads/photos/69de4805ef6eccdc0ca11a15.jpg",
      "caption": null,
      "thumbnail": "https://cdn.publer.com/uploads/photos/thumb_69de4805ef6eccdc0ca11a15.jpg"
    }
  ]
}
```

**When `type` is `video`**

Each media item uses:

* `id`
* `type`
* `path`
* `caption`
* `thumbnails`

`thumbnails` is an array of thumbnail objects containing:

* `id`
* `small`
* `real`

**Video example**

```json
{
  "media": [
    {
      "id": "6964fee1d6f826ba4a2bc046",
      "type": "video",
      "path": "https://cdn.publer.com/uploads/videos/6964fee1d6f826ba4a2bc046/9bac0de9d7b333032a9789190687171b.mp4",
      "caption": null,
      "thumbnails": [
        {
          "id": "6964fed7d6f826ba4a2bc02e",
          "small": "https://cdn.publer.com/uploads/photos/thumb_6964fed7d6f826ba4a2bc02e.jpg",
          "real": "https://cdn.publer.com/uploads/photos/6964fed7d6f826ba4a2bc02e.jpg"
        }
      ]
    }
  ]
}
```

Notes and behavior:

* On Twitter/X, Mastodon, BlueSky, and Threads the follow-up comment will be posted as a new post in the thread.
* Supported: Twitter/X, LinkedIn, Facebook Pages, Mastodon, Threads, BlueSky.
* Not supported (API limitations): Pinterest, TikTok, Facebook Personal Profiles, Google Business Profiles.
* Recurring posts: Configure follow-up comments at scheduling time to have them included for each recurrence.
* Performance-based conditions (reach/engagements) and time-based (age) commonly apply to the first comment; subsequent comments use time-based `age` only.

Example:

```json
"comments": [
  {
    "text": "First 100 customers get 10% off!",
    "conditions": {
      "relation": "AND",
      "clauses": {
        "age": { "duration": 2, "unit": "Hour" },
        "engagements": { "comparison": "gt", "value": 10 },
        "reach": { "comparison": "gt", "value": 10 }
      }
    }
  },
  {
    "text": "24 hours left—don’t miss out!",
    "conditions": {
      "relation": "AND",
      "clauses": {
        "age": { "duration": 1, "unit": "Day" }
      }
    },
    "media": {
      "id": "680fa5cc48487c4ccbf8c146",
      "type": "photo",
      "path": ".../photos/680fa5cc48487c4ccbf8c146.jpg",
      "thumbnail": ".../photos/thumb_680fa5cc48487c4ccbf8c146.jpg",
      "caption": "Only one day left!"
    }
  }
]
```

### Auto-Delete / Auto-Hide

Automatically delete or hide a post when conditions are satisfied.

Fields:

* delete.conditions (object) — conditions triggering deletion/hide (see Conditions object)
  * Use `conditions.clauses.age` to set minimum time before deletion
* delete.hide (boolean) — true to request hide instead of delete (platform-dependent)

Example:

```json
"delete": {
  "conditions": {
    "clauses": {
      "age": { "duration": 7, "unit": "Day" },
      "engagements": { "comparison": "lt", "value": 10 }
    }
  },
  "hide": false
}
```

Supported / unsupported:

* Auto-delete supported for most scheduled networks except:
  * Not available for Instagram API (auto-delete not supported)
  * Not available for TikTok accounts
  * Not available for posts published via reminders or some push/published types
  * Some types (e.g., Stories) cannot be auto-deleted
* Auto-hide only works where supported (e.g., Facebook Page posts (not videos), YouTube)

### Request Structure

```json
{
  "bulk": {
    "state": "scheduled",
    "posts": [
      {
        "networks": {
          "facebook": {
            "type": "status",
            "text": "Your post content here"
          }
        },
        "accounts": [
          {
            "id": "ACCOUNT_ID",
            "scheduled_at": "2025-05-15T14:30:00Z", // Optional for immediate publishing
            "share":   { /* AutoShare config */ },
            "comments":[ /* Follow-up comments */ ],
            "delete":  { /* Auto-Delete config */ }
          }
        ]
      }
    ]
  }
}
```

### Full example

```json
{
  "bulk": {
    "state": "scheduled",
    "posts": [
      {
        "networks": {
          "facebook": {
            "type": "status",
            "text": "Post with callbacks"
          }
        },
        "accounts": [
          {
            "id": "63c675b54e299e9cf2b667ea",
            "scheduled_at": "2025-10-31T10:23+01:00",
            "share": {
              "account_ids": [
                "63c675b54e299e9cf2b667e8"
              ],
              "conditions": {
                "relation": "AND",
                "clauses": {
                  "age": {
                    "duration": 10,
                    "unit": "Minute"
                  },
                  "engagements": {
                    "comparison": "gt",
                    "value": 10
                  },
                  "reach": {
                    "comparison": "gt",
                    "value": 100
                  }
                }
              },
              "text": "AUTO SHARE"
            },
            "comments": [
              {
                "text": "FOLLOW UP COMMENT",
                "conditions": {
                  "relation": "AND",
                  "clauses": {
                    "age": {
                      "duration": 10,
                      "unit": "Minute"
                    },
                    "engagements": {
                      "comparison": "gt",
                      "value": 10
                    },
                    "reach": {
                      "comparison": "gt",
                      "value": 100
                    }
                  }
                }
              },
              {
                "text": "OTHER COMMENT",
                "conditions": {
                  "relation": "AND",
                  "clauses": {
                    "age": {
                      "duration": 10,
                      "unit": "Minute"
                    }
                  }
                }
              }
            ],
            "delete": {
              "conditions": {
                "clauses": {
                  "age": {
                    "duration": 1,
                    "unit": "Hour"
                  }
                }
              },
              "hide": false
            }
          }
        ]
      }
    ]
  }
}
```

### Best practices

* Use performance-based `conditions` to avoid premature callbacks (e.g., only share if the post reached a threshold).
* Respect audience time zones when scheduling shares and comments.
* Space out repeated shares across accounts using `share.delay` to avoid spam signals.
* Prefer hiding (when supported) to preserve analytics/history if you may need them later.
* Test callback behavior on target networks (APIs and behavior differ per platform).

### Recurring posts & Post Presets

* Recurring posts: add callbacks during scheduling so each recurrence includes them automatically.
* Post Presets: configure default follow-up comments, auto-share targets, and default auto-delete/hide rules in Post Presets inside Publer. Presets use the same `conditions` model.

### Limitations & notes

* Some networks convert comments into separate posts/threads (Twitter/X, Mastodon, BlueSky, Threads).
* Follow-up comments are not supported by Pinterest, TikTok, Facebook Personal Profiles, and Google Business Profiles due to API limitations.
* Auto-delete is not available for Instagram, TikTok, posts published via reminders, or some story formats.
* Performance-based conditions depend on platform metrics; metrics may arrive with delay.

### Related Topics

* [Content Types](/docs/posting/create-posts/content-types.md) - Details on different content formats
* [Scheduled Posts](/docs/posting/create-posts/publishing-methods/manual-scheduling.md) - Information about scheduling posts
* [Immediate Publishing](/docs/posting/create-posts/publishing-methods/immediate-publishing.md) - How to publish content immediately


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://publer.com/docs/posting/create-posts/content-types/post-callbacks.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
