---
title: "Connect many feeds"
method: POST
path: "/v1/feeds/import"
tags: ["Feeds"]
---

# Connect many feeds

`POST /v1/feeds/import`

## Request

- Base URL: `https://api.mentio.dev`
- URL: `https://api.mentio.dev/v1/feeds/import`
- Auth: HTTP bearer

Connect up to 100 feeds in one call, each { url } or { url, auth } for a members-only one, checked on its own and reported added, already or failed, in the order sent: one that fails never stops the others. A failure carries the error code POST /v1/feeds would answer for that address (feed_login_required: send it again with auth). Every keyword of the workspace with readsWorkspaceFeeds (the default) reads these feeds: an item holding its term is one of its mentions, with its matching rules, billed like any mention. Each feed is read every hour; reading it is free. At most 500 a workspace. The first 8 added bring each reading keyword the newest 10 matching items of the last 30 days; the rest start from now.

## Request body

- object
  - `feeds` object[], required: Up to 100 feeds, each { url } or { url, auth } for a members-only one. Each is checked on its own: one that fails never stops the others.
    - `url` string, required: A feed's address (https://forum.example.com/posts.rss), or a page's (https://forum.example.com): the feed the page advertises is used.
    - `auth` union: A sign-in for a members-only feed: a cookie, or one header. Write-only: stored encrypted, sent to the feed's own site alone, never shown again. A feed with a sign-in is read for this workspace alone.
      - object
        - `type` 'cookie', required
        - `value` string, required: The Cookie header your browser sends to the forum (devtools, Network, the feed's request, Request Headers, cookie).
      - object
        - `type` 'header', required
        - `name` string, required: The header name, e.g. Api-Key (Discourse) or Authorization.
        - `value` string, required: Its value.

## Response `200`

One result per address

- object
  - `data` object[], required: One result per address sent, in order.
    - `url` string, required: The address as it was sent.
    - `status` 'added' | 'already' | 'failed', required: added: connected now. already: the workspace reads this feed already. failed: not connected, see error.
    - `feed` object, nullable, required: The feed, when added or already there; null when failed.
      - `id` string, required: Feed id (fd_...).
      - `url` string, required: The feed itself (after redirects, or the one the page advertised): what is polled.
      - `title` string, nullable, required: The feed's own title, when it has one.
      - `connectedAt` string, required: When the workspace connected it.
      - `readingSince` string, required: Nothing published before this is a live mention: the connection, or the last time its sign-in was added or removed (signed in and signed out, a post is read as two different posts, so the switch starts over rather than bill one twice).
      - `auth` object, nullable, required: The sign-in the feed is read with, or null for a public feed. PATCH { auth } replaces it, { auth: null } removes it.
        - `type` 'cookie' | 'header', required: cookie or header. The value is never shown.
      - `health` object, required: Whether the hourly read works.
        - `status` 'ok' | 'failing', required: failing: the last 3 hourly reads or more failed (a feed.failing event went out); ok otherwise.
        - `reason` 'login_required' | 'login_expired' | 'blocked' | 'not_found' | 'not_a_feed' | 'unreachable', nullable, required: Why the last read failed; null when it read well.
        - `detail` string, nullable, required: What the last failed read saw.
        - `failures` integer, required: Failed hourly reads in a row.
        - `since` string, nullable, required: While failing: since when.
      - `stats` object, required: How the hourly poll of this feed is going.
        - `lastPolledAt` string, nullable, required: When the feed was last read; null until its first poll (within the hour).
        - `emptyPolls` integer, required: Polls in a row that brought nothing new; a feed that keeps reading empty may have moved.
    - `error` object, nullable, required: Why it was not connected; null unless failed.
      - `code` 'feed_login_required' | 'feed_login_expired' | 'feed_unreadable' | 'feed_limit_reached' | 'feed_auth_not_configured' | 'validation_error' | 'internal_error', required: The same code POST /v1/feeds answers for this address: feed_login_required (send it again with auth), feed_login_expired (a fresh cookie), feed_unreadable (no feed, or the site blocks readers), feed_limit_reached, feed_auth_not_configured, validation_error (an address that is not one), internal_error (ours: send it again).
      - `message` string, required: What was seen, for a person.

## Other responses

- `401`: Missing or invalid API key
- `429`: More than 5 imports in a minute

---

[API](https://skmtc.dev/mentio/apis/mentio-api.md) · [All operations](https://skmtc.dev/mentio/apis/mentio-api/llms.txt) · [OpenAPI document](https://skmtc.dev/mentio/apis/mentio-api/revisions/b16a21d0ed02?raw)
