Skip to content

X automation API

Rules that repost or delete the workspace's own X posts, and their runs.

4 endpoints. Every path is relative to the API base URL and needs a bearer token unless it is marked public. See the REST API overview for authentication, errors and pagination.

GET/v1/orgs/{orgId}/automation/x/rules

Bearer tokenMCP tool: get_x_automation_rules

The workspace's rules for looking after its own published X posts: reposting the ones that did well (autoRepost) and deleting the ones that didn't (autoDelete). Null means that rule has never been set up.

Path parameters

  • orgIdstring (uuid)required

Responses

200The workspace's rules for looking after its own published X posts: reposting the ones that did well (autoRepost) and deleting the ones that didn't (autoDelete). Null means that rule has never been set up.
  • dataobjectrequired
    Fields
    • autoRepostobject | nullrequired
      Fields
      • channel"x"
      • socialAccountIdstring (uuid) | null
      • enabledboolean
      • minAgeHoursinteger
      • maxAgeDaysinteger
      • selectionobject
        Option 1
        • mode"threshold"required
        • minImpressionsinteger | null
        • minLikesinteger | null
        • minEngagementRatenumber | null
        Option 2
        • mode"top_n"required
        • ninteger
        • rankBystring

          one of impressions, likes, engagement

      • cooldownHoursPerPostinteger
      • maxRepostsPerPostinteger
      • maxActionsPerDayinteger
      • action"retweet"
      • dryRunboolean
    • autoDeleteobject | nullrequired
      Fields
      • channel"x"
      • socialAccountIdany
      • enabledboolean
      • minAgeHoursinteger
      • maxAgeDaysinteger
      • maxImpressionsinteger | null
      • maxLikesinteger | null
      • requireMetricsFetchedtrue
      • metricsMaxAgeHoursinteger
      • skipIfRepliesGteinteger
      • maxActionsPerDayinteger
      • dryRunboolean
    • updatedAtstring | nullrequired
    • updatedBystring | nullrequired
Request
curl -X GET "https://api.adventur.ai/v1/orgs/$ORG_ID/automation/x/rules" \
-H "Authorization: Bearer $ADVENTURAI_TOKEN"

PUT/v1/orgs/{orgId}/automation/x/rules

Bearer tokenMCP tool: update_x_automation_rules

Sets the auto-repost and auto-delete rules for the workspace's own published X posts. One kind at a time: a kind left out keeps its saved rule, and fields left out of a kind keep their values, or take safe defaults (off, dry run) the first time. Passing null for a threshold clears it.

Path parameters

  • orgIdstring (uuid)required

Request body application/json

  • autoRepostobject
    Fields
    • channel"x"
    • socialAccountIdstring (uuid) | null
    • enabledboolean
    • minAgeHoursinteger
    • maxAgeDaysinteger
    • selectionobject
      Option 1
      • mode"threshold"required
      • minImpressionsinteger | null
      • minLikesinteger | null
      • minEngagementRatenumber | null
      Option 2
      • mode"top_n"required
      • ninteger
      • rankBystring

        one of impressions, likes, engagement

    • cooldownHoursPerPostinteger
    • maxRepostsPerPostinteger
    • maxActionsPerDayinteger
    • action"retweet"
    • dryRunboolean
  • autoDeleteobject
    Fields
    • channel"x"
    • socialAccountIdany
    • enabledboolean
    • minAgeHoursinteger
    • maxAgeDaysinteger
    • maxImpressionsinteger | null
    • maxLikesinteger | null
    • requireMetricsFetchedtrue
    • metricsMaxAgeHoursinteger
    • skipIfRepliesGteinteger
    • maxActionsPerDayinteger
    • dryRunboolean

Responses

200Sets the auto-repost and auto-delete rules for the workspace's own published X posts. One kind at a time: a kind left out keeps its saved rule, and fields left out of a kind keep their values, or take safe defaults (off, dry run) the first time. Passing null for a threshold clears it.
  • dataobjectrequired
    Fields
    • autoRepostobject | nullrequired
      Fields
      • channel"x"
      • socialAccountIdstring (uuid) | null
      • enabledboolean
      • minAgeHoursinteger
      • maxAgeDaysinteger
      • selectionobject
        Option 1
        • mode"threshold"required
        • minImpressionsinteger | null
        • minLikesinteger | null
        • minEngagementRatenumber | null
        Option 2
        • mode"top_n"required
        • ninteger
        • rankBystring

          one of impressions, likes, engagement

      • cooldownHoursPerPostinteger
      • maxRepostsPerPostinteger
      • maxActionsPerDayinteger
      • action"retweet"
      • dryRunboolean
    • autoDeleteobject | nullrequired
      Fields
      • channel"x"
      • socialAccountIdany
      • enabledboolean
      • minAgeHoursinteger
      • maxAgeDaysinteger
      • maxImpressionsinteger | null
      • maxLikesinteger | null
      • requireMetricsFetchedtrue
      • metricsMaxAgeHoursinteger
      • skipIfRepliesGteinteger
      • maxActionsPerDayinteger
      • dryRunboolean
    • updatedAtstring | nullrequired
    • updatedBystring | nullrequired
Request
curl -X PUT "https://api.adventur.ai/v1/orgs/$ORG_ID/automation/x/rules" \
-H "Authorization: Bearer $ADVENTURAI_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'

POST/v1/orgs/{orgId}/automation/x/run

Bearer tokenMCP tool: run_x_automation

Applies the workspace's X automation rules to its own published X posts straight away, instead of waiting for the nightly sweep. Only rules that are switched on are considered, and a rule in dry run records what it would have done without touching X.

Path parameters

  • orgIdstring (uuid)required

Request body application/json

  • kindsarray<string>
  • dryRunboolean

Responses

200Applies the workspace's X automation rules to its own published X posts straight away, instead of waiting for the nightly sweep. Only rules that are switched on are considered, and a rule in dry run records what it would have done without touching X.
  • dataobjectrequired
    Fields
    • dryRunbooleanrequired
    • kindsarray<string>required
    • countsobjectrequired
      Fields
      • evaluatedintegerrequired
      • matchedintegerrequired
      • actedintegerrequired
      • skippedintegerrequired
      • failedintegerrequired
    • actionsarray<object>required
      Item fields
      • idstring (uuid)required
      • kindstringrequired

        one of auto_repost, auto_delete

      • socialAccountIdstring (uuid) | nullrequired
      • sourcePostIdstring (uuid) | nullrequired
      • externalTweetIdstring | nullrequired
      • statusstringrequired

        one of planned, succeeded, failed, skipped

      • reasonstring | nullrequired
      • dryRunbooleanrequired
      • errorstring | nullrequired
      • createdAtstringrequired
    • warningsarray<string>required
Request
curl -X POST "https://api.adventur.ai/v1/orgs/$ORG_ID/automation/x/run" \
-H "Authorization: Bearer $ADVENTURAI_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'

GET/v1/orgs/{orgId}/automation/x/runs

Bearer tokenMCP tool: list_x_automation_runs

What the workspace's X automation rules decided about its own published posts, newest first: reposted, deleted, left alone, or — in dry run — what would have happened.

Path parameters

  • orgIdstring (uuid)required

Query parameters

  • limitinteger

Responses

200What the workspace's X automation rules decided about its own published posts, newest first: reposted, deleted, left alone, or — in dry run — what would have happened.
  • dataobjectrequired
    Fields
    • itemsarray<object>required
      Item fields
      • idstring (uuid)required
      • kindstringrequired

        one of auto_repost, auto_delete

      • socialAccountIdstring (uuid) | nullrequired
      • sourcePostIdstring (uuid) | nullrequired
      • externalTweetIdstring | nullrequired
      • statusstringrequired

        one of planned, succeeded, failed, skipped

      • reasonstring | nullrequired
      • dryRunbooleanrequired
      • errorstring | nullrequired
      • createdAtstringrequired
Request
curl -X GET "https://api.adventur.ai/v1/orgs/$ORG_ID/automation/x/runs" \
-H "Authorization: Bearer $ADVENTURAI_TOKEN"