---
title: "Create an evergreen automation"
method: POST
path: "/api/v1/workspaces/{workspace_id}/automations/evergreen"
tags: ["♻️ Evergreen Automations"]
---

# Create an evergreen automation

`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`

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.

## Path parameters

- `workspace_id` string, required

## Request body

- object
  - `name` string, required
  - `account_selection` object, 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_options` object, 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.
  - `posts` object[], required: The pool of posts to recycle. Each item becomes one pool entry, stored as a single variation in the product's own shape (see the `posts` example on the response). Same item shape as POST .../posts.
    - `title` string, required
    - `url` string, uri, required: The link the post carries
    - `message` string, nullable: The text that publishes. Defaults to `title`.
    - `description` string, nullable
    - `image` string[]
  - `cycleGapStatus` boolean, required: Whether a gap is enforced between cycles
  - `cycleGap` integer, 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_id` string, nullable: Required when `schedule_options.time_type` is `content_category`; must belong to the workspace.

## Response `201`

Automation created

- object
  - `status` boolean
  - `message` string
  - `data` object: The created evergreen automation

## Other responses

- `401`: Unauthorized - API key missing or invalid
- `403`: Forbidden - No access to workspace. Workspace access refusals return `error_code` `WORKSPACE_ACCESS_DENIED`, `WORKSPACE_INVITATION_PENDING`, `WORKSPACE_LOCKED`, `PERMISSION_DENIED`, `ACCOUNT_ACCESS_DENIED`, `FEATURE_NOT_IN_PLAN`.
- `422`: Validation error (VALIDATION_ERROR), unknown account id (INVALID_ACCOUNT_ID, names the id and platform; nothing is written), or plan limit reached (AUTOMATION_LIMIT_REACHED, with limit_details)
- `429`: Too many requests

## Changes

- **2026-09-22** `ad0b687289a3`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/contentstudio/apis/contentstudio-api-v1/changes/api/v1/workspaces/:workspace_id/automations/evergreen/post.md)

---

[API](https://skmtc.dev/contentstudio/apis/contentstudio-api-v1.md) - [All operations](https://skmtc.dev/contentstudio/apis/contentstudio-api-v1/llms.txt) - [OpenAPI document](https://skmtc.dev/contentstudio/apis/contentstudio-api-v1/revisions/2ce09d50369c?raw)
