{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Post Manager V1 — Edit,Delete,Save,Flair,Lock,NSFW",
    "description": "Manage your own Reddit posts in one click — report, lock comments, mark NSFW or spoiler, hide, save, edit body text, set or clear flair, toggle reply notifications, or delete. Bring your Reddit Token V2 (token_v2 cookie) + matching proxy, or pick a saved account from the Reddit Vault.",
    "version": "1.0",
    "x-build-id": "2QE9Oi19y0Kn82IoK"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/red_crawler~reddit-manage-posts-v1/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-red_crawler-reddit-manage-posts-v1",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/red_crawler~reddit-manage-posts-v1/runs": {
      "post": {
        "operationId": "runs-sync-red_crawler-reddit-manage-posts-v1",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/red_crawler~reddit-manage-posts-v1/run-sync": {
      "post": {
        "operationId": "run-sync-red_crawler-reddit-manage-posts-v1",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "operation",
          "credentialSource"
        ],
        "properties": {
          "operation": {
            "title": "Action",
            "enum": [
              "edit",
              "delete",
              "save",
              "flair",
              "lock",
              "nsfw",
              "spoiler",
              "hide",
              "report",
              "sendreplies"
            ],
            "type": "string",
            "description": "Pick the action to perform on a post. Each action has its own dedicated section below — only fill the one matching your choice. The 'Reddit credentials' section at the bottom is shared.",
            "default": "edit"
          },
          "edit_post": {
            "title": "Post",
            "type": "string",
            "description": "Your self-post — paste the URL, the stripped ID, or the t3_-prefixed fullname. Only self-posts (text posts) can be edited; link / image / video / gallery / poll posts cannot."
          },
          "edit_text": {
            "title": "New body text",
            "maxLength": 40000,
            "type": "string",
            "description": "Replacement body text — Reddit markdown supported (`**bold**`, `*italic*`, `> quote`, `[link](url)`, `- bullet`)."
          },
          "delete_post": {
            "title": "Post",
            "type": "string",
            "description": "Your post — paste the URL, the stripped ID, or the t3_-prefixed fullname. Deletion is permanent and only works on posts you own."
          },
          "save_post": {
            "title": "Post",
            "type": "string",
            "description": "Post to save or unsave — paste the URL, the stripped ID, or the t3_-prefixed fullname."
          },
          "save_state": {
            "title": "Save",
            "type": "boolean",
            "description": "On = save the post to your account's `Saved` tab. Off = remove from saved.",
            "default": true
          },
          "flair_post": {
            "title": "Post",
            "type": "string",
            "description": "Post to flair — paste the URL, the stripped ID, or the t3_-prefixed fullname. The post must already exist in the subreddit you specify."
          },
          "flair_subreddit": {
            "title": "Subreddit",
            "type": "string",
            "description": "Subreddit the post lives in (name only, with or without 'r/')."
          },
          "flair_action": {
            "title": "Flair action",
            "enum": [
              "add",
              "edit",
              "remove"
            ],
            "type": "string",
            "description": "`add` / `edit` apply a flair (require Flair ID). `remove` clears the post's flair.",
            "default": "add"
          },
          "flair_id": {
            "title": "Flair ID",
            "type": "string",
            "description": "Flair template ID. Required for `add` / `edit`. Ignored for `remove`. Get the ID from the subreddit's available flair templates."
          },
          "flair_text": {
            "title": "Flair text",
            "maxLength": 120,
            "type": "string",
            "description": "Optional flair display text. Some flair templates allow custom text; others are fixed. Ignored for `remove`."
          },
          "lock_post": {
            "title": "Post",
            "type": "string",
            "description": "Post to lock or unlock — paste the URL, the stripped ID, or the t3_-prefixed fullname. Only works on posts in a subreddit where your account is a moderator (or your own posts in some communities)."
          },
          "lock_state": {
            "title": "Lock comments",
            "type": "boolean",
            "description": "On = lock the post (no new comments). Off = unlock the post.",
            "default": true
          },
          "nsfw_post": {
            "title": "Post",
            "type": "string",
            "description": "Post to mark or unmark as NSFW — paste the URL, the stripped ID, or the t3_-prefixed fullname."
          },
          "nsfw_state": {
            "title": "Mark as NSFW",
            "type": "boolean",
            "description": "On = mark the post as Not Safe For Work. Off = remove the NSFW flag.",
            "default": true
          },
          "spoiler_post": {
            "title": "Post",
            "type": "string",
            "description": "Post to mark or unmark as a spoiler — paste the URL, the stripped ID, or the t3_-prefixed fullname."
          },
          "spoiler_state": {
            "title": "Mark as spoiler",
            "type": "boolean",
            "description": "On = mark the post as a spoiler. Off = clear the spoiler flag.",
            "default": true
          },
          "hide_post": {
            "title": "Post",
            "type": "string",
            "description": "Post to hide or unhide from your feeds — paste the URL, the stripped ID, or the t3_-prefixed fullname."
          },
          "hide_state": {
            "title": "Hide",
            "type": "boolean",
            "description": "On = hide the post from your feeds. Off = show it again.",
            "default": true
          },
          "report_post": {
            "title": "Post",
            "type": "string",
            "description": "Reddit post — paste the URL, the stripped ID (`1s4a4j6`), or the t3_-prefixed fullname (`t3_1s4a4j6`)."
          },
          "report_reason": {
            "title": "Reason",
            "type": "string",
            "description": "Site-wide rule reason or free-form text. Examples: `spam`, `harassment`, `dis_misinformation`, `violent_content`, `targeted_harassment`. Leave blank for a generic report."
          },
          "sendreplies_post": {
            "title": "Post",
            "type": "string",
            "description": "Your post — paste the URL, the stripped ID, or the t3_-prefixed fullname. The action only works on posts you own."
          },
          "sendreplies_state": {
            "title": "Receive reply notifications",
            "type": "boolean",
            "description": "If on, your inbox is notified when someone replies to this post. If off, replies are silent.",
            "default": true
          },
          "credentialSource": {
            "title": "Credential source",
            "enum": [
              "vault",
              "manual"
            ],
            "type": "string",
            "description": "Pick which authentication path this run uses. **Use saved account (vault)** loads your stored Token V2 + proxy from the **reddit-vault** actor (auto-refreshed if you saved a Reddit Session) — only the 'Saved account name' field below is used; Token V2 + proxy are ignored. **Paste Token V2 + proxy** uses the values you paste below — the 'Saved account name' field is ignored.",
            "default": "vault"
          },
          "accountName": {
            "title": "Saved account name (used when source = vault)",
            "pattern": "^[A-Za-z0-9_-]{1,32}$",
            "maxLength": 32,
            "type": "string",
            "description": "The name you used in the **reddit-vault** actor when you stored this account. Your Token V2 + proxy load automatically from the vault. Ignored when 'Credential source' = manual."
          },
          "bearer": {
            "title": "Token V2 (used when source = manual)",
            "type": "string",
            "description": "Your Reddit `token_v2` cookie value (`eyJ...`). Lifetime ~24 h. Encrypted at rest by Apify. Ignored when 'Credential source' = vault."
          },
          "proxy": {
            "title": "Proxy (used when source = manual)",
            "type": "string",
            "description": "Proxy in `ip:port:user:pass` format. MUST be the same IP that originally minted the Token V2. Ignored when 'Credential source' = vault."
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}