♻️ Evergreen Automations

Create an evergreen automation

Changed on

Creates an evergreen automation that recycles a pool of posts on a repeating schedule. Counts against the workspace's automation plan limit — a workspace at its limit gets 422 AUTOMATION_LIMIT_REACHED with a limit_details breakdown.

post/api/v1/workspaces/{workspace_id}/automations/evergreen

Request

  • Base URL
    https://api.contentstudio.io
  • URL
    https://api.contentstudio.io/api/v1/workspaces/{workspace_id}/automations/evergreen
  • Auth
    API key in header X-API-Key

Path parameters

workspace_idstring required
Example:610a1e660cb41530ca40d372

Workspace ID

Request body

namestring required
account_selectionobject required

Platform => account ids the automation posts to. Ids are the id GET /accounts returns (the platform identifier); any other value is refused with 422 INVALID_ACCOUNT_ID.

schedule_optionsobject required

Posting schedule for the recycling cycle. time_type is Recurring (every recurring.value recurring.type, Hour|Day|Week), Custom (weekly slots: custom.days lists all seven days in order Sun..Sat, each with status and times as HH:MM) or content_category (posts land in content_category_id's slots; the id is then required). schedule_type is continuously or fix with start_time/end_time (Y-m-d H:i:s). Anything outside these values is refused with 422 VALIDATION_ERROR.

cycleGapStatusboolean required

Whether a gap is enforced between cycles

cycleGapinteger nullable

Days between cycles. Required when cycleGapStatus is true.

replanType'Now' | 'Later' nullable

Whether changes restart the cycle now or apply from the next one.

content_category_idstring nullable

Required when schedule_options.time_type is content_category; must belong to the workspace.

Example request

{
  "name": "Blog evergreen",
  "account_selection": {
    "facebook": [
      "1329910333529595"
    ],
    "instagram": [
      "17841453340834745"
    ]
  },
  "schedule_options": {
    "time_type": "Recurring",
    "recurring": {
      "type": "Hour",
      "value": 1
    },
    "custom": {
      "days": [
        {
          "name": "Sun",
          "status": true,
          "times": [
            "10:00"
          ]
        },
        {
          "name": "Mon",
          "status": true,
          "times": [
            "10:00"
          ]
        },
        {
          "name": "Tue",
          "status": true,
          "times": [
            "10:00"
          ]
        },
        {
          "name": "Wed",
          "status": true,
          "times": [
            "10:00"
          ]
        },
        {
          "name": "Thu",
          "status": true,
          "times": [
            "10:00"
          ]
        },
        {
          "name": "Fri",
          "status": true,
          "times": [
            "10:00"
          ]
        },
        {
          "name": "Sat",
          "status": true,
          "times": [
            "10:00"
          ]
        }
      ]
    },
    "schedule_type": "continuously",
    "start_time": "",
    "end_time": "",
    "posting_status": "scheduled"
  },
  "posts": [
    {
      "title": "How we cut build times in half",
      "url": "https://example.com/blog/build-times",
      "message": "We cut CI from 40 to 19 minutes. Here is what moved the needle.",
      "description": "A short teaser shown on link previews",
      "image": [
        "https://example.com/build-times.png"
      ]
    }
  ],
  "cycleGapStatus": true,
  "cycleGap": 1,
  "replanType": "Later",
  "content_category_id": "669f8b8d0dfd96946502faf2"
}

Response

Automation created

statusboolean
messagestring
dataobject

The created evergreen automation

Example response

{
  "status": true,
  "data": {
    "_id": "6ab10c5b441ac0ca4e0b5222",
    "name": "Blog evergreen",
    "workspace_id": "610a1e660cb41530ca40d372",
    "status": 1,
    "lock": 0,
    "posted_count": 0,
    "cycleGapStatus": false,
    "cycleGap": 1,
    "replanType": "Later",
    "account_selection": {
      "facebook": [
        {
          "_id": "6a742f84f67707aac00bc6e3",
          "type": "Page",
          "facebook_id": "1329910333529595",
          "name": "Company page"
        }
      ]
    },
    "schedule_options": {
      "time_type": "Recurring",
      "recurring": {
        "type": "Hour",
        "value": 1
      },
      "schedule_type": "continuously",
      "posting_status": "scheduled"
    },
    "posts": [
      [
        {
          "id": "6ab10c5b441ac0ca4e0b5223",
          "message": "We cut CI from 40 to 19 minutes. Here is what moved the needle.",
          "title": "How we cut build times in half",
          "description": "A short teaser shown on link previews",
          "url": "https://example.com/blog/build-times",
          "image": [
            "https://example.com/build-times.png"
          ],
          "has_first_comment": false,
          "first_comment_message": "",
          "first_comment_accounts": [],
          "gmb_options": []
        }
      ]
    ],
    "created_at": "2026-09-21T10:15:33.000000Z"
  }
}

Changes