Automations

Trigger and pipeline workflows that publish without a human in the loop.

An automation is a trigger plus an ordered pipeline of steps. A new item arrives, the pipeline shapes it for each network and sends it, optionally spacing the sends out. These endpoints need the automations scope.

Create one

POST /v1/automations
curl -X POST https://api.fopost.com/v1/automations \
  -H "X-API-Key: $FOPOST_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "workspaceId": "7d2b8c11-4e5a-4a8f-b0d9-3c5e6f7a8b90",
    "name": "Blog to social",
    "triggerType": "rss_feed",
    "triggerConfig": { "url": "https://yourbrand.com/blog/feed.xml" },
    "steps": [
      { "actionType": "transform", "actionConfig": { "platform": "linkedin" } },
      { "actionType": "publish",   "actionConfig": { "accounts": ["3a9f1d20-6c77-4b2e-9a01-8f5d2c3b4e10"] } },
      { "actionType": "delay",     "actionConfig": { "minutes": 120 } },
      { "actionType": "publish",   "actionConfig": { "accounts": ["b81e4f02-91a3-4c55-8de6-77a0c1f2d3e4"] } }
    ]
  }'
FieldRequiredDescription
workspaceIdYesWorkspace the automation belongs to
nameYesWhat it is called in the dashboard
triggerTypeYesrss_feed, api_webhook, cross_post, or schedule
triggerConfigNoTrigger settings, such as the feed URL
stepsYes1 to 20 steps, run in order
activeNoDefault true

Steps take an actionType of publish, delay, or transform, plus an actionConfig.

For an api_webhook trigger, the response carries a secret. It is returned only on creation, so store it then. It is what you sign your calls to the trigger URL with.

Triggers

TriggerFires when
rss_feedA new item appears in the feed
api_webhookYou call the automation's trigger URL
cross_postA post publishes to one account, so it can fan out to others
scheduleA time you set comes around

Manage

EndpointWhat it does
GET /v1/automationsList them
GET /v1/automations/{id}One, with its steps
PUT /v1/automations/{id}Update it
POST /v1/automations/{id}/togglePause or resume without deleting
DELETE /v1/automations/{id}Delete it
GET /v1/automations/statsRun counts across the workspace

Run history

GET /v1/automations/{id}/runs
GET /v1/automations/{id}/runs/{runId}

Every firing is recorded with what came in, what each step did, and what came out. When an automation posts something you did not expect, this is where you find out why.

Fire it yourself

POST /v1/automations/{id}/trigger

The webhook entry point for an api_webhook automation. It authenticates with the trigger secret rather than your API key, so you can hand the URL to a system that has no FoPost credentials.

Guard rails

An automation that starts failing trips its own circuit breaker and stops rather than retrying into a rate limit. A rule that would publish faster than the cadence you set is held instead of firing. The run log records both, so a paused automation is never a mystery.

Next

Related documentation
  • API Overview

    Base URL, envelopes, pagination, and errors for the FoPost REST API.

  • Authentication

    API keys, scopes, and workspace binding.

  • Publishing

    Create a post, target accounts, publish it, and read the per-account result.

  • Scheduling

    Schedule a post, repeat it, and import a batch from a spreadsheet.

  • Media

    Upload files, list the media library, and attach media to a post.

  • Accounts

    List connected social accounts, check their health, and refresh credentials.

  • Workspaces

    Workspaces, labels, and how isolation works across them.

  • Analytics

    Overview totals, time series, top posts, demographics, and label roll-ups.

Was this helpful?

On this page