Connect a site to AutoSEO (start here)
autoseo_connect_siteConnect a new site to AutoSEO by selecting one of four connectors: hosted, WordPress REST, GitHub PR, or webhook. Returns site ID, token, and capabilities to start generating content.
Instructions
START HERE for AutoSEO on a new site. Connects ONE of the four connector kinds (intrusion ladder, least intrusive first) and returns { id, kind, publicToken, capabilities }. WHICH KIND + WHICH FIELDS: kind "hosted" is the ZERO-SETUP DEFAULT — needs ONLY name; TimeToPost hosts AND SSR-renders the blog itself (full SEO: JSON-LD, sitemap, robots AI-crawler allow-list) and the response includes hostedUrl ("your blog is live at ..."); nothing to install, works for ANY site — pick it when unsure. kind "wp_rest" connects a WordPress site over its own REST API — needs url (the WP site), username, and appPassword (created in WP Admin → Users → Profile → Application Passwords); no plugin, no code; connect runs the REAL capability probe, so a bad credential fails right here with the exact reason. kind "git_pr" commits article files (Markdown/MDX + frontmatter) to a GitHub repo and the user's own CI deploys them — needs token (a fine-grained PAT or GitHub App installation token with contents:write) and repo ("owner/name"), plus optional branch, contentDir, and mode ("pr" opens a reviewable pull request per article, the default; "direct" commits straight to the branch); connect verifies write access and auto-detects the SSG + content convention (returned as capabilities.detected — confirm contentDir with the user if ssg is "unknown"). kind "webhook" is the most-control path for ANY stack (Next.js, Rails, PHP, a serverless function): TimeToPost POSTs signed article payloads to endpointUrl, authenticated with an HMAC signingSecret — pass one or omit it to have the backend generate it; then call autoseo_integration_kit, install the /autoseo-publish endpoint into the user's codebase, and confirm with autoseo_verify_site. After ANY kind: autoseo_configure → autoseo_propose_topics / autoseo_generate_post. name is a human label shown in the TimeToPost dashboard. capabilities updates each time autoseo_verify_site re-probes the site; publicToken is only needed for autoseo_integration_kit's renderMode "ssr-hosted" (set it as that site's AUTOSEO_PUBLIC_TOKEN env var). CAPABILITY: draft — creates content that cannot reach an audience on its own. Safe for a draft-only agent token.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Required for kind "wp_rest": the WordPress site URL (a bare domain is fine) | |
| kind | Yes | Connector kind: "hosted" (zero-setup default — only name needed, we host the blog), "wp_rest" (WordPress REST — url + username + appPassword), "git_pr" (GitHub repo — token + repo, optional branch/contentDir/mode), "webhook" (signed receiving endpoint — endpointUrl + optional signingSecret) | |
| mode | No | git_pr: "pr" (default) opens a pull request per article — a git-native approval gate; "direct" commits straight to the branch | |
| name | Yes | Human-readable label for this site, shown in the dashboard | |
| repo | No | Required for kind "git_pr": the repository as "owner/name" (a github.com URL also works) | |
| token | No | Required for kind "git_pr": a GitHub fine-grained PAT or App installation token with contents:write on the repo | |
| branch | No | git_pr: base branch for commits/PRs; omit to use the repo's default branch | |
| username | No | Required for kind "wp_rest": the WP username the Application Password belongs to | |
| contentDir | No | git_pr: directory article files land in; omit to auto-detect from the repo (e.g. content/blog, _posts) | |
| appPassword | No | Required for kind "wp_rest": a WordPress Application Password (WP Admin → Users → Profile → Application Passwords) | |
| endpointUrl | No | Required for kind "webhook": the URL TimeToPost will POST signed articles to (e.g. https://example.com/autoseo-publish) | |
| signingSecret | No | webhook: HMAC secret used to sign payloads; omit to let the backend generate one |