Docs

Mit KI entwickeln

Gib einem Coding-Agent wie Claude Code, Cursor oder Copilot alles, was er für eine korrekte FeedHorizon-Integration braucht.

Coding-Agents schreiben bessere Integrationen, wenn sie die echte Doku lesen, statt zu raten. FeedHorizon stellt seine Doku in Formaten bereit, die sie direkt laden können.

QuelleInhalt
/llms.txtEin Verzeichnis aller Doku-Seiten mit einer Zusammenfassung in einer Zeile
/llms-full.txtDie ganze Doku als eine Textdatei
Jede Seite + .mdxEine Seite als Markdown, zum Beispiel /docs/recipes/post-with-image.mdx
/openapi.jsonOpenAPI 3.1: jeder Endpunkt, jedes Feld, jeder Fehler-Code und jeder Webhook-Payload

Ein Prompt für Coding-Agents

Füg ihn am Anfang einer Aufgabe ein oder leg ihn in die Agent-Anweisungen deines Projekts (CLAUDE.md, .cursorrules, AGENTS.md). Er ist auf Englisch, wie die Doku, die der Agent damit liest:

Prompt
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:
- In Node.js/TypeScript use the official SDK @feedhorizon/sdk, in Python the package
  feedhorizon (https://feedhorizon.com/docs/sdks). They handle retries, idempotency keys,
  pagination and webhook signatures. For other languages, call the REST API directly:
- 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.

Lass den Agent selbst nachschlagen

Der MCP-Server hat ein Tool search_docs, das mit jedem API-Key funktioniert, auch mit einem Nur-Lesen-Key. Ein damit verbundener Coding-Agent kann die Doku bei der Arbeit durchsuchen, ohne den Editor zu verlassen:

claude mcp add --transport http feedhorizon https://feedhorizon.com/mcp \
  --header "Authorization: Bearer fh_your_read_only_key"

Nimm dafür einen Nur-Lesen-Key: Dann kann der Agent in der Doku nachschlagen und deine Profile lesen, aber nicht posten.