{"openapi":"3.0.3","info":{"title":"GrowthDailySeo Tenant API","version":"1.0.0","description":"Headless REST API for draft and published posts and guides. Authenticate with a site-scoped API key (`fig_live_...`). Webhooks notify your CMS when trust-scored drafts are ready.","contact":{"name":"GrowthDailySeo API","email":"contact@growthdailyseo.com"}},"servers":[{"url":"/api/v1","description":"Tenant API v1"}],"tags":[{"name":"Posts","description":"Published blog posts"},{"name":"Guides","description":"Published guides"},{"name":"Training","description":"Opt-in training export"},{"name":"Webhooks","description":"Webhook utilities"},{"name":"SEO","description":"Sitemap and discovery helpers"}],"paths":{"/sites/{siteId}/posts":{"get":{"tags":["Posts"],"summary":"List posts (draft + published)","operationId":"listPosts","security":[{"bearerAuth":[]}],"parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"default":1}},{"name":"pageSize","in":"query","schema":{"type":"integer","minimum":1,"maximum":50,"default":12}},{"name":"search","in":"query","schema":{"type":"string"},"description":"Filter by title (case-insensitive)"},{"name":"status","in":"query","schema":{"type":"string","enum":["draft","published","all"],"default":"all"},"description":"Filter by status. Default `all` returns draft + published (recommended for CMS sync)."},{"name":"language","in":"query","schema":{"type":"string"},"description":"ISO language code prefix (e.g. en, tr). Matches post.language."},{"name":"updatedAfter","in":"query","schema":{"type":"string","format":"date-time"},"description":"ISO 8601 timestamp — only posts updated strictly after this time (incremental sync)."}],"responses":{"200":{"description":"Paginated post list","headers":{"ETag":{"schema":{"type":"string"}},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer","description":"Unix seconds (next UTC midnight)"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostListResponse"}}}},"304":{"description":"Not modified (If-None-Match)"},"400":{"description":"Invalid query parameters"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/sites/{siteId}/posts/{slug}":{"get":{"tags":["Posts"],"summary":"Get post by slug (draft or published)","operationId":"getPost","security":[{"bearerAuth":[]}],"parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"slug","in":"path","required":true,"schema":{"type":"string"}},{"name":"include","in":"query","schema":{"type":"string"},"description":"Comma-separated expansions. `provenance` attaches source graph metadata when available."}],"responses":{"200":{"description":"Post (draft or published)","headers":{"X-RateLimit-Remaining":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Post"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/sites/{siteId}/sitemap.xml":{"get":{"tags":["SEO"],"summary":"Published posts and guides sitemap","description":"XML sitemap for published content on the tenant domain. Auth via `Authorization: Bearer` or `?token=` query (for crawlers that cannot send headers).","operationId":"getSitemap","security":[{"bearerAuth":[]}],"parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"token","in":"query","schema":{"type":"string"},"description":"Optional API key when Bearer header is not available"}],"responses":{"200":{"description":"application/xml sitemap","headers":{"ETag":{"schema":{"type":"string"}},"Cache-Control":{"schema":{"type":"string","example":"private, max-age=300"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}}},"content":{"application/xml":{"schema":{"type":"string"}}}},"304":{"description":"Not modified (If-None-Match)"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/sites/{siteId}/guides/{slug}":{"get":{"tags":["Guides"],"summary":"Get guide by slug","operationId":"getGuide","security":[{"bearerAuth":[]}],"parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Published guide","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Guide"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/sites/{siteId}/training/export":{"get":{"tags":["Training"],"summary":"Export training JSONL","description":"Returns opted-in training rows as NDJSON. Requires `training_opt_in` on the site.","operationId":"exportTraining","security":[{"bearerAuth":[]}],"parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"NDJSON stream (max 500 rows)","content":{"application/x-ndjson":{"schema":{"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/webhooks/test":{"post":{"tags":["Webhooks"],"summary":"Send test webhook","description":"POSTs a `webhook.test` event to the configured webhook URL.","operationId":"testWebhook","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Delivery attempt result","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"status":{"type":"integer"},"delivered":{"type":"boolean"}}}}}},"400":{"description":"No webhook URL configured"},"401":{"$ref":"#/components/responses/Unauthorized"},"500":{"$ref":"#/components/responses/ServerError"}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"fig_live_...","description":"Site-scoped API key from the API page in your workspace"}},"responses":{"Unauthorized":{"description":"Missing or invalid API key, or key not scoped to siteId","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"Resource not found (slug missing). Wrong siteId returns 401, not 404.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RateLimited":{"description":"Daily API request quota exceeded for plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"ServerError":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]},"PostListResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PostSummary"}},"page":{"type":"integer"},"pageSize":{"type":"integer"},"total":{"type":"integer"},"totalPages":{"type":"integer"}}},"PostSummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"slug":{"type":"string"},"title":{"type":"string"},"excerpt":{"type":"string","nullable":true},"contentHtml":{"type":"string"},"status":{"type":"string","enum":["draft","published"]},"publishedAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time","nullable":true},"readingTimeMinutes":{"type":"integer","nullable":true},"qualityBand":{"type":"string","nullable":true,"enum":["premium","standard","review"],"description":"Opaque quality tier — internal scoring not exposed"},"assuranceLabel":{"type":"string","nullable":true},"reviewStatus":{"type":"string","nullable":true},"aiGenerated":{"type":"boolean"},"language":{"type":"string","nullable":true},"sourcePostId":{"type":"string","format":"uuid","nullable":true},"provenance":{"type":"object","nullable":true,"description":"Present when `include=provenance` on single-post fetch"},"seo":{"type":"object","nullable":true,"properties":{"metaDescription":{"type":"string"},"ogTitle":{"type":"string"},"ogDescription":{"type":"string"},"keywords":{"type":"array","items":{"type":"string"}}}},"faqJsonLd":{"type":"object","nullable":true},"schemaBundle":{"type":"object","nullable":true,"properties":{"article":{"type":"object"},"breadcrumb":{"type":"object"},"faq":{"type":"object","nullable":true}}}}},"Post":{"allOf":[{"$ref":"#/components/schemas/PostSummary"}]},"Guide":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"slug":{"type":"string"},"title":{"type":"string"},"excerpt":{"type":"string","nullable":true},"contentHtml":{"type":"string"},"status":{"type":"string"},"publishedAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time","nullable":true},"readingTimeMinutes":{"type":"integer","nullable":true}}},"ArticleReadyWebhook":{"type":"object","properties":{"event":{"type":"string","example":"article.ready"},"siteId":{"type":"string","format":"uuid"},"postId":{"type":"string","format":"uuid"},"slug":{"type":"string"},"title":{"type":"string"},"trustScore":{"type":"number","nullable":true,"deprecated":true,"description":"Use qualityBand in CMS API"},"qualityBand":{"type":"string","nullable":true,"enum":["premium","standard","review"]},"assuranceLabel":{"type":"string","nullable":true},"language":{"type":"string","nullable":true,"description":"Post language (translations include sourcePostId)"},"sourcePostId":{"type":"string","format":"uuid","nullable":true},"status":{"type":"string","example":"draft"},"at":{"type":"string","format":"date-time"},"fetch":{"type":"object","properties":{"path":{"type":"string","example":"/api/v1/sites/{siteId}/posts/{slug}"},"hint":{"type":"string"}}}}}}},"x-webhooks":{"articleReady":{"post":{"summary":"Fired when a trust-scored draft is queued","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArticleReadyWebhook"}}}},"parameters":[{"name":"X-GrowthDaily-Signature","in":"header","schema":{"type":"string"}},{"name":"X-GrowthDaily-Timestamp","in":"header","schema":{"type":"string"}},{"name":"X-Figrush-Signature","in":"header","deprecated":true,"schema":{"type":"string"}},{"name":"X-Figrush-Timestamp","in":"header","deprecated":true,"schema":{"type":"string"}}]}}}}