Build with AI
Give a coding agent such as Claude Code, Cursor or Copilot what it needs to write a correct FeedHorizon integration.
Coding agents write better integrations when they read the real docs instead of guessing. FeedHorizon publishes its docs in forms they can load directly.
| Source | What it holds |
|---|---|
| /llms.txt | An index of every docs page with a one-line summary |
| /llms-full.txt | All docs as one plain-text file |
Any page + .mdx | One page as Markdown, for example /docs/recipes/post-with-image.mdx |
| /openapi.json | OpenAPI 3.1: every endpoint, field, error code and webhook payload |
A prompt for coding agents
Paste this at the start of a task, or put it in your project's agent instructions (CLAUDE.md, .cursorrules, AGENTS.md):
We integrate the FeedHorizon API (social media scheduling). Before writing code,
read https://feedhorizon.com/llms.txt and the pages it links that matter for the task.
The OpenAPI spec is https://feedhorizon.com/openapi.json; use it for field names and types.
Rules:
- Base URL https://feedhorizon.com/api/v1. Auth: header "Authorization: Bearer <key>",
key from the env var FEEDHORIZON_API_KEY. Never hard-code or log the key.
- Responses: one object in `data`; lists in `data` plus `nextCursor` (pass it back as `cursor`).
- Errors: `{ error: { type, code, message, param?, details? } }`. Branch on `code`, never on `message`.
- Ids carry a prefix (prof_, acc_, post_, tgt_, med_ …). Store them as strings, as received.
- Send an Idempotency-Key header on every POST that creates something.
- Timestamps: send ISO 8601 with Z or an offset; responses are UTC.
- Before POST /posts, call POST /posts/validate in development to see every rule a post breaks.
- Use webhooks instead of polling. Verify X-Webhook-Signature (HMAC-SHA256 over "<t>.<raw body>")
against the raw body, and dedupe on the event `id`.
- On 429, wait the seconds in Retry-After. Ignore response fields you do not know.Let the agent look things up
The MCP server has a search_docs tool that works with any API key, read-only included. A coding agent connected to it can search these docs while it works, without leaving the editor:
claude mcp add --transport http feedhorizon https://feedhorizon.com/mcp \
--header "Authorization: Bearer fh_your_read_only_key"Use a read-only key for this: the agent can then look up docs and read your profiles, but not post.