# Feeds

Social media feed management operations

## Get all feeds (public + user's private feeds)

> Retrieves all public feeds (feeds with no token) and user's private feeds if token is provided.\
> \
> \*\*Public Access:\*\*\
> \- Public feeds are available without authentication\
> \- Returns all feeds where token is null\
> \
> \*\*Authenticated Access:\*\*\
> \- Returns public feeds + user's private feeds\
> \- Requires valid API token in Authorization header<br>

```json
{"openapi":"3.0.0","info":{"title":"Content API","version":"1.0.0"},"tags":[{"name":"Feeds","description":"Social media feed management operations"}],"servers":[{"url":"https://api.autocontentapi.com"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Feed":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier for the feed"},"name":{"type":"string","description":"Name of the feed"},"token":{"type":"string","description":"Client token (null for public feeds)"},"feedTypeId":{"type":"integer","description":"Type of feed (1 for X/Twitter, 2 for Reddit, 3 for YouTube channel)"},"internalId":{"type":"string","description":"Internal identifier for the feed source (username for X, subreddit for Reddit, channel source ID for YouTube)"},"createdOn":{"type":"string","format":"date-time","description":"Creation timestamp"}}}}},"paths":{"/feeds":{"get":{"summary":"Get all feeds (public + user's private feeds)","description":"Retrieves all public feeds (feeds with no token) and user's private feeds if token is provided.\n\n**Public Access:**\n- Public feeds are available without authentication\n- Returns all feeds where token is null\n\n**Authenticated Access:**\n- Returns public feeds + user's private feeds\n- Requires valid API token in Authorization header\n","tags":["Feeds"],"responses":{"200":{"description":"List of feeds (public + user's private feeds)","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Feed"}}}}},"500":{"description":"Internal server error"}}}}}}
```

## Create a new feed

> Creates a new feed associated with the authenticated user.\
> \
> \*\*Feed Types:\*\*\
> \- feedTypeId=1: X/Twitter feed (internalId = username)\
> \- feedTypeId=2: Reddit feed (internalId = subreddit name without r/ prefix)\
> \- feedTypeId=3: YouTube channel feed (channel handle/URL, resolved to channel source ID automatically)\
> \
> \*\*Access Control:\*\*\
> \- Requires valid API token\
> \- Feed will be private to the creating user\
> \- PRO subscription required<br>

```json
{"openapi":"3.0.0","info":{"title":"Content API","version":"1.0.0"},"tags":[{"name":"Feeds","description":"Social media feed management operations"}],"servers":[{"url":"https://api.autocontentapi.com"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"CreateFeedRequest":{"type":"object","required":["name"],"properties":{"name":{"type":"string","description":"Name of the feed"},"feedTypeId":{"type":"integer","description":"Type of feed (1 for X/Twitter, 2 for Reddit, 3 for YouTube channel)"},"internalId":{"type":"string","description":"Internal identifier - Twitter username for X, subreddit name for Reddit (without r/ prefix). For YouTube channels this is populated automatically."},"channel":{"type":"string","description":"(YouTube only) Channel handle, URL, or ID. Either `channel` or `url` may be provided."},"url":{"type":"string","description":"(YouTube only) Channel URL alternative field."}}}}},"paths":{"/feeds":{"post":{"summary":"Create a new feed","description":"Creates a new feed associated with the authenticated user.\n\n**Feed Types:**\n- feedTypeId=1: X/Twitter feed (internalId = username)\n- feedTypeId=2: Reddit feed (internalId = subreddit name without r/ prefix)\n- feedTypeId=3: YouTube channel feed (channel handle/URL, resolved to channel source ID automatically)\n\n**Access Control:**\n- Requires valid API token\n- Feed will be private to the creating user\n- PRO subscription required\n","tags":["Feeds"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateFeedRequest"}}}},"responses":{"201":{"description":"Feed created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"feedId":{"type":"integer","description":"ID of the created feed"},"message":{"type":"string"}}}}}},"400":{"description":"Bad request - Missing required fields, feed limit reached, or other validation errors","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"}}}}}},"401":{"description":"Unauthorized - valid API token required"},"429":{"description":"Rate limit exceeded - too many requests","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"}}}}}},"500":{"description":"Internal server error during feed creation"}}}}}}
```

## Get a specific feed by ID

> Retrieves a specific feed by its ID.\
> Public feeds are accessible without authentication.\
> Private feeds require appropriate token validation.<br>

```json
{"openapi":"3.0.0","info":{"title":"Content API","version":"1.0.0"},"tags":[{"name":"Feeds","description":"Social media feed management operations"}],"servers":[{"url":"https://api.autocontentapi.com"}],"paths":{"/feeds/{id}":{"get":{"summary":"Get a specific feed by ID","description":"Retrieves a specific feed by its ID.\nPublic feeds are accessible without authentication.\nPrivate feeds require appropriate token validation.\n","tags":["Feeds"],"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"},"description":"Feed ID"}],"responses":{"200":{"description":"Feed details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Feed"}}}},"400":{"description":"Bad request - Invalid feed ID","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"}}}}}},"404":{"description":"Feed not found","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"}}}}}},"500":{"description":"Internal server error"}}}}},"components":{"schemas":{"Feed":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier for the feed"},"name":{"type":"string","description":"Name of the feed"},"token":{"type":"string","description":"Client token (null for public feeds)"},"feedTypeId":{"type":"integer","description":"Type of feed (1 for X/Twitter, 2 for Reddit, 3 for YouTube channel)"},"internalId":{"type":"string","description":"Internal identifier for the feed source (username for X, subreddit for Reddit, channel source ID for YouTube)"},"createdOn":{"type":"string","format":"date-time","description":"Creation timestamp"}}}}}}
```

## Delete a feed

> Deletes a feed owned by the authenticated user.\
> \
> \*\*Security:\*\*\
> \- Only the feed owner can delete their feeds\
> \- Requires valid API token matching the feed's token<br>

```json
{"openapi":"3.0.0","info":{"title":"Content API","version":"1.0.0"},"tags":[{"name":"Feeds","description":"Social media feed management operations"}],"servers":[{"url":"https://api.autocontentapi.com"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"DeleteFeedRequest":{"type":"object","required":["id"],"properties":{"id":{"type":"integer","description":"ID of the feed to delete"}}}}},"paths":{"/feeds/delete":{"post":{"summary":"Delete a feed","description":"Deletes a feed owned by the authenticated user.\n\n**Security:**\n- Only the feed owner can delete their feeds\n- Requires valid API token matching the feed's token\n","tags":["Feeds"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteFeedRequest"}}}},"responses":{"200":{"description":"Feed deleted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}}}}}},"400":{"description":"Bad request - Missing or invalid feed ID","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"}}}}}},"401":{"description":"Unauthorized - valid API token required"},"404":{"description":"Feed not found or cannot be deleted","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"}}}}}},"500":{"description":"Internal server error during feed deletion"}}}}}}
```

## List feed subscriptions for the authenticated token

> Returns active feed automations associated with the authenticated user. Use \`includeRemoved=true\` to include archived subscriptions.

```json
{"openapi":"3.0.0","info":{"title":"Content API","version":"1.0.0"},"tags":[{"name":"Feeds","description":"Social media feed management operations"}],"servers":[{"url":"https://api.autocontentapi.com"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"FeedSubscription":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier for the subscription"},"feedId":{"type":"integer","description":"Identifier of the subscribed feed"},"token":{"type":"string","description":"Token that owns the subscription"},"requestId":{"type":"string","description":"ClientRequest template identifier used for automation"},"createdOn":{"type":"string","format":"date-time","description":"When the subscription was created"},"removedOn":{"type":"string","format":"date-time","nullable":true,"description":"When the subscription was removed, if applicable"},"lastProcessedItemId":{"type":"string","nullable":true,"description":"Identifier of the last feed item processed for this subscription"},"lastProcessedOn":{"type":"string","format":"date-time","nullable":true,"description":"Timestamp of the last processed feed item"},"request":{"type":"object","nullable":true,"description":"Snapshot of the underlying template request"}}}}},"paths":{"/feeds/subscriptions":{"get":{"summary":"List feed subscriptions for the authenticated token","description":"Returns active feed automations associated with the authenticated user. Use `includeRemoved=true` to include archived subscriptions.","tags":["Feeds"],"parameters":[{"in":"query","name":"includeRemoved","schema":{"type":"boolean"},"required":false,"description":"Include subscriptions that have been removed when set to true."}],"responses":{"200":{"description":"Array of feed subscriptions","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FeedSubscription"}}}}},"401":{"description":"Unauthorized - valid API token required"},"500":{"description":"Internal server error while fetching subscriptions"}}}}}}
```

## Create a feed subscription

> Links a feed to a schedule template (ClientRequest) so that new feed items trigger automated content generation.

```json
{"openapi":"3.0.0","info":{"title":"Content API","version":"1.0.0"},"tags":[{"name":"Feeds","description":"Social media feed management operations"}],"servers":[{"url":"https://api.autocontentapi.com"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"FeedSubscription":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier for the subscription"},"feedId":{"type":"integer","description":"Identifier of the subscribed feed"},"token":{"type":"string","description":"Token that owns the subscription"},"requestId":{"type":"string","description":"ClientRequest template identifier used for automation"},"createdOn":{"type":"string","format":"date-time","description":"When the subscription was created"},"removedOn":{"type":"string","format":"date-time","nullable":true,"description":"When the subscription was removed, if applicable"},"lastProcessedItemId":{"type":"string","nullable":true,"description":"Identifier of the last feed item processed for this subscription"},"lastProcessedOn":{"type":"string","format":"date-time","nullable":true,"description":"Timestamp of the last processed feed item"},"request":{"type":"object","nullable":true,"description":"Snapshot of the underlying template request"}}}}},"paths":{"/feeds/subscriptions":{"post":{"summary":"Create a feed subscription","description":"Links a feed to a schedule template (ClientRequest) so that new feed items trigger automated content generation.","tags":["Feeds"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["feedId","requestId"],"properties":{"feedId":{"type":"integer","description":"Identifier of the feed to subscribe to."},"requestId":{"type":"string","description":"Schedule template (ClientRequest) to clone when new items arrive."},"lastProcessedItemId":{"type":"string","description":"Optional feed item identifier to mark as already processed."}}}}}},"responses":{"201":{"description":"Subscription created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedSubscription"}}}},"400":{"description":"Validation error"},"404":{"description":"Feed or template not found"},"409":{"description":"Subscription already exists for this feed/template pair"},"500":{"description":"Internal server error during creation"}}}}}}
```

## Remove a feed subscription

> Soft-deletes a feed subscription by setting its removedOn timestamp.

```json
{"openapi":"3.0.0","info":{"title":"Content API","version":"1.0.0"},"tags":[{"name":"Feeds","description":"Social media feed management operations"}],"servers":[{"url":"https://api.autocontentapi.com"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}}},"paths":{"/feeds/subscriptions/{subscriptionId}":{"delete":{"summary":"Remove a feed subscription","description":"Soft-deletes a feed subscription by setting its removedOn timestamp.","tags":["Feeds"],"parameters":[{"in":"path","name":"subscriptionId","required":true,"schema":{"type":"string"},"description":"Identifier of the subscription to remove."}],"responses":{"200":{"description":"Subscription removed"},"400":{"description":"Missing or invalid subscription identifier"},"404":{"description":"Subscription not found or already removed"},"500":{"description":"Internal server error during removal"}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.autocontentapi.com/readme/feeds.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
