Skip to main content

OAuth Flow

Get Authorization URL

GET /api/v1/github/auth-url Returns GitHub OAuth authorization URL and signed state token.
url
string
GitHub OAuth URL
state
string
Signed state token (expires in 10 minutes)

OAuth Callback

POST /api/v1/github/callback Handles OAuth callback and creates/updates connection.
code
string
required
OAuth authorization code
state
string
required
Signed state token
status
string
Connection status
connection_id
string
GitHub connection ID
username
string
GitHub username

Connections

List Connections

GET /api/v1/github/connections Returns your active GitHub connections.
connections
array
Array of connection objects

Sync Repositories

POST /api/v1/github/sync/{connection_id} Synchronizes repositories for a connection.
status
string
Sync status
synced_count
integer
Number of repositories synced

Repositories

List Repositories

GET /api/v1/github/repositories/{connection_id} Returns repositories for a connection.
repositories
array
Array of repository objects

Analyze Repository

POST /api/v1/github/analyze/{connection_id}/{repo_id} Analyzes a repository to detect site type and build configuration.
id
string
Repository ID
full_name
string
Repository full name (owner/repo)
site_type
string
Detected site type (nextjs, docusaurus, mintlify, etc.)
build_command
string
Detected build command
output_dir
string
Detected output directory

Pull Requests

Create Pull Request

POST /api/v1/github/create-pr Creates a pull request with SEO/GEO fixes.
connection_id
string
required
GitHub connection ID
repo_id
string
required
Repository ID
audit_id
integer
required
Audit ID
fixes
array
required
Array of fix objects
id
string
Pull request ID
pr_number
integer
GitHub PR number
title
string
PR title
html_url
string
GitHub PR URL
status
string
PR status

List Pull Requests

GET /api/v1/github/prs/{repo_id} Returns pull requests for a repository.
prs
array
Array of PR objects

Blog Auditing

Audit Repository Blogs

POST /api/v1/github/audit-blogs/{connection_id}/{repo_id} Audits all blog posts in a repository.
total_blogs
integer
Total blogs found
blogs_audited
integer
Blogs successfully audited
results
array
Audit results for each blog

Create Blog Fixes PR

POST /api/v1/github/create-blog-fixes-pr/{connection_id}/{repo_id} Creates a PR with fixes for specific blog posts.
blog_paths
array
required
Array of blog file paths to fix
status
string
Operation status
pr
object
Created PR object
fixes_applied
integer
Number of fixes applied
blogs_fixed
integer
Number of blogs fixed

GEO Blog Auditing

Audit Blogs with GEO

POST /api/v1/github/audit-blogs-geo/{connection_id}/{repo_id} Audits blogs for both SEO and GEO optimization.
total_blogs
integer
Total blogs analyzed
geo_scores
array
GEO scores for each blog

Create GEO Fixes PR

POST /api/v1/github/create-geo-fixes-pr/{connection_id}/{repo_id} Creates a PR with SEO and GEO fixes.
blog_paths
array
required
Blog paths to fix
include_geo
boolean
default:"true"
Include GEO optimizations
seo_fixes
integer
Number of SEO fixes
geo_fixes
integer
Number of GEO fixes

Auto-Fix PR

Create Auto-Fix PR from Audit

POST /api/v1/github/create-auto-fix-pr/{connection_id}/{repo_id} Creates an automated PR based on an existing audit.
audit_id
integer
required
Audit ID to use for fixes
success
boolean
Whether PR was created
pr_url
string
GitHub PR URL
pr_number
integer
PR number

Fix Inputs

Get Fix Inputs

GET /api/v1/github/fix-inputs/{audit_id} Returns missing inputs required to safely apply fixes.
audit_id
integer
Audit ID
missing_inputs
array
Array of missing input groups
missing_required
integer
Count of required missing inputs

Submit Fix Inputs

POST /api/v1/github/fix-inputs/{audit_id} Submits user-provided fix inputs.
inputs
array
required
Array of input answers

Fix Inputs Chat

POST /api/v1/github/fix-inputs/chat/{audit_id} Get LLM-guided suggestions for missing fix inputs.
issue_code
string
required
Issue code
field_key
string
required
Field key
field_label
string
Field label
assistant_message
string
AI assistant message
suggested_value
string
Suggested value based on audit evidence
confidence
string
Confidence level (evidence, unknown)

Webhooks

GitHub Webhook Handler

POST /api/v1/github/webhook Receives GitHub webhook events (push, pull_request, installation).
This endpoint requires GitHub webhook signature verification.

Error Codes

400
error
Invalid OAuth callback or missing parameters
401
error
Invalid OAuth state or webhook signature
403
error
Cross-user access denied
422
error
Missing required fix inputs

Build docs developers (and LLMs) love