# Feeds

> For AI agents: the index of these docs is at https://indrava.forumulate.com/docs/llms.txt (every page it lists has a Markdown version like this one).

## List feeds

**`GET http://localhost:4000/api/v1/feeds`** — List feeds

### Responses

**200** — OK

#### Fields

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | yes |  |
| `organizationId` | string | yes |  |
| `authorId` | string | yes |  |
| `name` | string | yes |  |
| `url` | string | yes |  |
| `channelIds` |  | yes |  |
| `template` | string | yes |  |
| `mode` | string | yes |  |
| `includeImage` | boolean | yes |  |
| `intervalMinutes` | number | yes |  |
| `enabled` | boolean | yes |  |
| `postLatest` | boolean | yes |  |
| `aiWrite` | boolean | yes |  |
| `allChannels` | boolean | yes |  |
| `etag` | string | yes |  |
| `lastModified` | string | yes |  |
| `lastPolledAt` | string | yes |  |
| `lastError` | string | yes |  |
| `failingSince` | string | yes |  |
| `retryAt` | string | yes |  |
| `shortenToFit` | boolean | yes |  |
| `draftReason` | string | yes |  |
| `draftProblem` |  | yes |  |
| `targetSettings` |  | yes |  |
| `tagId` | string | yes |  |
| `generateImage` | boolean | yes |  |
| `dripTemplateId` | string | yes |  |
| `createdAt` | string | yes |  |

```json
[
  {
    "id": "string",
    "organizationId": "string",
    "authorId": "string",
    "name": "string",
    "url": "string",
    "channelIds": {},
    "template": "string",
    "mode": "string",
    "includeImage": true,
    "intervalMinutes": 0,
    "enabled": true,
    "postLatest": true,
    "aiWrite": true,
    "allChannels": true,
    "etag": "string",
    "lastModified": "string",
    "lastPolledAt": "2024-01-01T00:00:00Z",
    "lastError": "string",
    "failingSince": "2024-01-01T00:00:00Z",
    "retryAt": "2024-01-01T00:00:00Z",
    "shortenToFit": true,
    "draftReason": "string",
    "draftProblem": {},
    "targetSettings": {},
    "tagId": "string",
    "generateImage": true,
    "dripTemplateId": "string",
    "createdAt": "2024-01-01T00:00:00Z"
  }
]
```

### Code samples

**cURL**

```curl
curl -X GET "http://localhost:4000/api/v1/feeds" \
  -H "Authorization: Bearer $API_KEY"
```

**TypeScript**

```typescript
const res = await fetch('http://localhost:4000/api/v1/feeds', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer $API_KEY',
  },
});
const data = await res.json();
```

**Python**

```python
import requests

res = requests.request(
    "GET",
    "http://localhost:4000/api/v1/feeds",
    headers={
    "Authorization": "Bearer $API_KEY",
    },
)
data = res.json()
```

**Go**

```go
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	req, _ := http.NewRequest("GET", "http://localhost:4000/api/v1/feeds", nil)
	req.Header.Set("Authorization", "Bearer $API_KEY")
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
```

**PHP**

```php
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://localhost:4000/api/v1/feeds');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Bearer $API_KEY']);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
```

**Ruby**

```ruby
require 'net/http'
require 'uri'

uri = URI('http://localhost:4000/api/v1/feeds')
req = Net::HTTP::Get.new(uri)
req['Authorization'] = 'Bearer $API_KEY'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
```

**Java**

```java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("http://localhost:4000/api/v1/feeds"))
    .header("Authorization", "Bearer $API_KEY")
    .GET()
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
```

## Create or update a feed that turns new items into posts

**`POST http://localhost:4000/api/v1/feeds`** — Create or update a feed that turns new items into posts

`mode`: `draft` saves each item as a draft, `queue` puts it in the next free slot, `publish` sends it at once. Needs `posts:publish` as well: what this sets up can publish without a person looking.

### Request body (`application/json`)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | no |  |
| `name` | string | yes |  |
| `url` | string | yes |  |
| `channelIds` | string[] | yes |  |
| `template` | string | no | Default: `{title} {link}`. |
| `mode` | string | no | One of: `draft` \| `queue` \| `publish`. Default: `draft`. |
| `includeImage` | boolean | no | Default: `true`. |
| `intervalMinutes` | integer | no | Default: `60`. |
| `enabled` | boolean | no | Default: `true`. |
| `postLatest` | boolean | no | Default: `false`. |
| `shortenToFit` | boolean | no | Default: `true`. |
| `aiWrite` | boolean | no | Default: `false`. |
| `allChannels` | boolean | no | Default: `false`. |
| `tagId` | string | no | Default: `null`. |
| `dripTemplateId` | string | no | Default: `null`. |
| `generateImage` | boolean | no | Default: `false`. |
| `targetSettings` | object | no | Default: `{}`. |

```json
{
  "id": "string",
  "name": "string",
  "url": "string",
  "channelIds": [
    "string"
  ],
  "template": "{title} {link}",
  "mode": "draft",
  "includeImage": true,
  "intervalMinutes": 60,
  "enabled": true,
  "postLatest": false,
  "shortenToFit": true,
  "aiWrite": false,
  "allChannels": false,
  "tagId": null,
  "dripTemplateId": null,
  "generateImage": false,
  "targetSettings": {}
}
```

### Responses

**200** — OK

#### Option 1

#### Option 2

```json
{}
```

### Code samples

**cURL**

```curl
curl -X POST "http://localhost:4000/api/v1/feeds" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"id":"string","name":"string","url":"string","channelIds":["string"],"template":"{title} {link}","mode":"draft","includeImage":true,"intervalMinutes":60,"enabled":true,"postLatest":false,"shortenToFit":true,"aiWrite":false,"allChannels":false,"tagId":null,"dripTemplateId":null,"generateImage":false,"targetSettings":{}}'
```

**TypeScript**

```typescript
const res = await fetch('http://localhost:4000/api/v1/feeds', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer $API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"id":"string","name":"string","url":"string","channelIds":["string"],"template":"{title} {link}","mode":"draft","includeImage":true,"intervalMinutes":60,"enabled":true,"postLatest":false,"shortenToFit":true,"aiWrite":false,"allChannels":false,"tagId":null,"dripTemplateId":null,"generateImage":false,"targetSettings":{}}),
});
const data = await res.json();
```

**Python**

```python
import requests

res = requests.request(
    "POST",
    "http://localhost:4000/api/v1/feeds",
    headers={
    "Authorization": "Bearer $API_KEY",
    "Content-Type": "application/json",
    },
    json={"id": "string", "name": "string", "url": "string", "channelIds": ["string"], "template": "{title} {link}", "mode": "draft", "includeImage": True, "intervalMinutes": 60, "enabled": True, "postLatest": False, "shortenToFit": True, "aiWrite": False, "allChannels": False, "tagId": None, "dripTemplateId": None, "generateImage": False, "targetSettings": {}},
)
data = res.json()
```

**Go**

```go
package main

import (
	"fmt"
	"io"
	"net/http"
	"strings"
)

func main() {
	req, _ := http.NewRequest("POST", "http://localhost:4000/api/v1/feeds", strings.NewReader(`{"id":"string","name":"string","url":"string","channelIds":["string"],"template":"{title} {link}","mode":"draft","includeImage":true,"intervalMinutes":60,"enabled":true,"postLatest":false,"shortenToFit":true,"aiWrite":false,"allChannels":false,"tagId":null,"dripTemplateId":null,"generateImage":false,"targetSettings":{}}`))
	req.Header.Set("Authorization", "Bearer $API_KEY")
	req.Header.Set("Content-Type", "application/json")
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
```

**PHP**

```php
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://localhost:4000/api/v1/feeds');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Bearer $API_KEY', 'Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"id":"string","name":"string","url":"string","channelIds":["string"],"template":"{title} {link}","mode":"draft","includeImage":true,"intervalMinutes":60,"enabled":true,"postLatest":false,"shortenToFit":true,"aiWrite":false,"allChannels":false,"tagId":null,"dripTemplateId":null,"generateImage":false,"targetSettings":{}}');
$response = curl_exec($ch);
curl_close($ch);
echo $response;
```

**Ruby**

```ruby
require 'net/http'
require 'uri'

uri = URI('http://localhost:4000/api/v1/feeds')
req = Net::HTTP::Post.new(uri)
req['Authorization'] = 'Bearer $API_KEY'
req['Content-Type'] = 'application/json'
req.body = '{"id":"string","name":"string","url":"string","channelIds":["string"],"template":"{title} {link}","mode":"draft","includeImage":true,"intervalMinutes":60,"enabled":true,"postLatest":false,"shortenToFit":true,"aiWrite":false,"allChannels":false,"tagId":null,"dripTemplateId":null,"generateImage":false,"targetSettings":{}}'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
```

**Java**

```java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("http://localhost:4000/api/v1/feeds"))
    .header("Authorization", "Bearer $API_KEY")
    .header("Content-Type", "application/json")
    .method("POST", BodyPublishers.ofString("{\"id\":\"string\",\"name\":\"string\",\"url\":\"string\",\"channelIds\":[\"string\"],\"template\":\"{title} {link}\",\"mode\":\"draft\",\"includeImage\":true,\"intervalMinutes\":60,\"enabled\":true,\"postLatest\":false,\"shortenToFit\":true,\"aiWrite\":false,\"allChannels\":false,\"tagId\":null,\"dripTemplateId\":null,\"generateImage\":false,\"targetSettings\":{}}"))
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
```

## Read the newest items of a feed address without saving anything

**`GET http://localhost:4000/api/v1/feeds/preview`** — Read the newest items of a feed address without saving anything

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `url` | query | string | yes |  |
| `template` | query | string | no |  |

### Responses

**200** — OK

#### Option 1

#### Option 2

```json
{}
```

### Code samples

**cURL**

```curl
curl -X GET "http://localhost:4000/api/v1/feeds/preview?url=<url>" \
  -H "Authorization: Bearer $API_KEY"
```

**TypeScript**

```typescript
const res = await fetch('http://localhost:4000/api/v1/feeds/preview?url=<url>', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer $API_KEY',
  },
});
const data = await res.json();
```

**Python**

```python
import requests

res = requests.request(
    "GET",
    "http://localhost:4000/api/v1/feeds/preview?url=<url>",
    headers={
    "Authorization": "Bearer $API_KEY",
    },
)
data = res.json()
```

**Go**

```go
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	req, _ := http.NewRequest("GET", "http://localhost:4000/api/v1/feeds/preview?url=<url>", nil)
	req.Header.Set("Authorization", "Bearer $API_KEY")
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
```

**PHP**

```php
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://localhost:4000/api/v1/feeds/preview?url=<url>');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Bearer $API_KEY']);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
```

**Ruby**

```ruby
require 'net/http'
require 'uri'

uri = URI('http://localhost:4000/api/v1/feeds/preview?url=<url>')
req = Net::HTTP::Get.new(uri)
req['Authorization'] = 'Bearer $API_KEY'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
```

**Java**

```java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("http://localhost:4000/api/v1/feeds/preview?url=<url>"))
    .header("Authorization", "Bearer $API_KEY")
    .GET()
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
```

## Delete a feed

**`DELETE http://localhost:4000/api/v1/feeds/{id}`** — Delete a feed

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes |  |

### Responses

**200** — OK

#### Option 1

#### Option 2

```json
{}
```

### Code samples

**cURL**

```curl
curl -X DELETE "http://localhost:4000/api/v1/feeds/{id}" \
  -H "Authorization: Bearer $API_KEY"
```

**TypeScript**

```typescript
const res = await fetch('http://localhost:4000/api/v1/feeds/{id}', {
  method: 'DELETE',
  headers: {
    'Authorization': 'Bearer $API_KEY',
  },
});
const data = await res.json();
```

**Python**

```python
import requests

res = requests.request(
    "DELETE",
    "http://localhost:4000/api/v1/feeds/{id}",
    headers={
    "Authorization": "Bearer $API_KEY",
    },
)
data = res.json()
```

**Go**

```go
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	req, _ := http.NewRequest("DELETE", "http://localhost:4000/api/v1/feeds/{id}", nil)
	req.Header.Set("Authorization", "Bearer $API_KEY")
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
```

**PHP**

```php
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://localhost:4000/api/v1/feeds/{id}');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Bearer $API_KEY']);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
```

**Ruby**

```ruby
require 'net/http'
require 'uri'

uri = URI('http://localhost:4000/api/v1/feeds/{id}')
req = Net::HTTP::Delete.new(uri)
req['Authorization'] = 'Bearer $API_KEY'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
```

**Java**

```java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("http://localhost:4000/api/v1/feeds/{id}"))
    .header("Authorization", "Bearer $API_KEY")
    .method("DELETE", BodyPublishers.noBody())
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
```

## List the articles a feed has listed

**`GET http://localhost:4000/api/v1/feeds/{id}/articles`** — List the articles a feed has listed

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes |  |
| `search` | query | string | no |  |
| `posted` | query | string | no |  |
| `limit` | query | integer | no |  |
| `offset` | query | integer | no |  |

### Responses

**200** — OK

#### Option 1

#### Option 2

```json
{}
```

### Code samples

**cURL**

```curl
curl -X GET "http://localhost:4000/api/v1/feeds/{id}/articles" \
  -H "Authorization: Bearer $API_KEY"
```

**TypeScript**

```typescript
const res = await fetch('http://localhost:4000/api/v1/feeds/{id}/articles', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer $API_KEY',
  },
});
const data = await res.json();
```

**Python**

```python
import requests

res = requests.request(
    "GET",
    "http://localhost:4000/api/v1/feeds/{id}/articles",
    headers={
    "Authorization": "Bearer $API_KEY",
    },
)
data = res.json()
```

**Go**

```go
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	req, _ := http.NewRequest("GET", "http://localhost:4000/api/v1/feeds/{id}/articles", nil)
	req.Header.Set("Authorization", "Bearer $API_KEY")
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
```

**PHP**

```php
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://localhost:4000/api/v1/feeds/{id}/articles');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Bearer $API_KEY']);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
```

**Ruby**

```ruby
require 'net/http'
require 'uri'

uri = URI('http://localhost:4000/api/v1/feeds/{id}/articles')
req = Net::HTTP::Get.new(uri)
req['Authorization'] = 'Bearer $API_KEY'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
```

**Java**

```java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("http://localhost:4000/api/v1/feeds/{id}/articles"))
    .header("Authorization", "Bearer $API_KEY")
    .GET()
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
```

## Read a feed now

**`POST http://localhost:4000/api/v1/feeds/{id}/sync`** — Read a feed now

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes |  |

### Responses

**200** — OK

#### Option 1

#### Option 2

```json
{}
```

### Code samples

**cURL**

```curl
curl -X POST "http://localhost:4000/api/v1/feeds/{id}/sync" \
  -H "Authorization: Bearer $API_KEY"
```

**TypeScript**

```typescript
const res = await fetch('http://localhost:4000/api/v1/feeds/{id}/sync', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer $API_KEY',
  },
});
const data = await res.json();
```

**Python**

```python
import requests

res = requests.request(
    "POST",
    "http://localhost:4000/api/v1/feeds/{id}/sync",
    headers={
    "Authorization": "Bearer $API_KEY",
    },
)
data = res.json()
```

**Go**

```go
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	req, _ := http.NewRequest("POST", "http://localhost:4000/api/v1/feeds/{id}/sync", nil)
	req.Header.Set("Authorization", "Bearer $API_KEY")
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
```

**PHP**

```php
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://localhost:4000/api/v1/feeds/{id}/sync');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Bearer $API_KEY']);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
```

**Ruby**

```ruby
require 'net/http'
require 'uri'

uri = URI('http://localhost:4000/api/v1/feeds/{id}/sync')
req = Net::HTTP::Post.new(uri)
req['Authorization'] = 'Bearer $API_KEY'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
```

**Java**

```java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("http://localhost:4000/api/v1/feeds/{id}/sync"))
    .header("Authorization", "Bearer $API_KEY")
    .method("POST", BodyPublishers.noBody())
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
```

---

## For AI agents

- This page for a human reader: https://indrava.forumulate.com/docs/ref-feeds
- The whole space as one Markdown file: https://indrava.forumulate.com/docs/llms-full.txt
- Live search + fetch over MCP: https://indrava.forumulate.com/docs/_api/public/orgs/e421ace4-3e78-4ed8-9818-7b4899cf3aa0/spaces/2bcc7f09-4489-40af-85d8-9fdd3f3da314/mcp
  - Install (Claude CLI): `claude mcp add forumulate-docs --transport http https://indrava.forumulate.com/docs/_api/public/orgs/e421ace4-3e78-4ed8-9818-7b4899cf3aa0/spaces/2bcc7f09-4489-40af-85d8-9fdd3f3da314/mcp`

This Markdown is the same content the page renders — safe to quote and to ground answers in.
