{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/adaptlypost-com/json-schema/adaptlypost-com-rss-feed-schema.json",
  "title": "RssFeed",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/adaptlypost-com-api-openapi.json#/components/schemas/RssFeed",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "userId": {
      "type": "string",
      "description": "Member the feed posts as: whoever last saved it"
    },
    "accountGroupId": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "url": {
      "type": "string"
    },
    "siteUrl": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "enum": [
        "ACTIVE",
        "PAUSED"
      ]
    },
    "pauseReason": {
      "type": "string",
      "enum": [
        "USER",
        "FETCH_FAILURES",
        "CONSECUTIVE_FAILURES",
        "ACCESS_LOST",
        "SUBSCRIPTION_INACTIVE",
        "CONNECTION_REMOVED"
      ],
      "description": "Why the feed stopped: USER (paused by hand), FETCH_FAILURES (5 failed fetches in a row), CONSECUTIVE_FAILURES (3 items in a row failed to post), ACCESS_LOST (its owner lost the permission its post mode needs), SUBSCRIPTION_INACTIVE (the plan no longer covers publishing) or CONNECTION_REMOVED (every target account was disconnected)"
    },
    "lastError": {
      "type": "string"
    },
    "postMode": {
      "type": "string",
      "enum": [
        "DRAFT",
        "SCHEDULE",
        "PUBLISH"
      ],
      "description": "DRAFT creates a draft and needs `posts.draft`; SCHEDULE schedules the post `publishDelayMinutes` after the item is found and needs `posts.schedule`; PUBLISH publishes it right away and needs `posts.publish`"
    },
    "publishDelayMinutes": {
      "type": "integer"
    },
    "contentMode": {
      "type": "string",
      "enum": [
        "TEMPLATE",
        "AI"
      ],
      "description": "TEMPLATE fills `template`; AI writes one caption per platform from the article, appends the link, spends 1 AI credit per platform per item and needs `ai.generate`"
    },
    "template": {
      "type": "string"
    },
    "aiInstructions": {
      "type": "string"
    },
    "includeImage": {
      "type": "boolean"
    },
    "twitterKeepLinks": {
      "type": "boolean"
    },
    "includeKeywords": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "excludeKeywords": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "maxPostsPerCheck": {
      "type": "integer"
    },
    "checkIntervalMinutes": {
      "type": "integer"
    },
    "targets": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/RssFeedTarget"
      }
    },
    "nextCheckAt": {
      "type": "string",
      "format": "date-time"
    },
    "lastCheckedAt": {
      "type": "string",
      "format": "date-time"
    },
    "lastPostedAt": {
      "type": "string",
      "format": "date-time"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time"
    }
  },
  "$defs": {
    "RssFeedTarget": {
      "type": "object",
      "required": [
        "platform",
        "connectionId"
      ],
      "properties": {
        "platform": {
          "type": "string",
          "enum": [
            "FACEBOOK",
            "INSTAGRAM",
            "THREADS",
            "TWITTER",
            "BLUESKY",
            "LINKEDIN",
            "MASTODON",
            "TELEGRAM",
            "GOOGLE_BUSINESS"
          ]
        },
        "connectionId": {
          "type": "string",
          "description": "Account ID from `GET /social-accounts`"
        },
        "pageId": {
          "type": "string",
          "description": "Facebook page ID. Required for FACEBOOK"
        },
        "displayName": {
          "type": "string",
          "readOnly": true,
          "description": "The account's name, filled in by AdaptlyPost. Ignored when sent"
        }
      }
    }
  }
}