{"name":"API Substack","version":"v1","description":"The posting API for Substack authors — draft, publish, and schedule posts from code.","jtbd":{"job":"post","statement":"Help Substack authors post to their publication programmatically — draft, publish, and schedule without the browser UI."},"icp":{"persona":"Substack author","description":"Writers and newsletter operators who publish on Substack and want to post with the Python client, the CLI, or the MCP server — each a separate product."},"products":[{"id":"python","name":"Python client","description":"Standalone Python SDK for Substack authors who post from scripts and apps."},{"id":"cli","name":"CLI","description":"Standalone command-line tool for draft, publish, and schedule from the terminal."},{"id":"mcp","name":"MCP server","description":"Standalone MCP product for posting from AI tools such as Cursor or Claude."}],"auth":{"cookie":"substack.sid","env":["SUBSTACK_PUBLICATION_URL","SUBSTACK_SID","SUBSTACK_USER_ID"],"note":"Unofficial session-cookie auth. Cookies expire; refresh on 401/403."},"capabilities":[{"name":"Verify auth / profile","description":"Test session cookie and resolve current user profile.","python":"get_profile_self()","cli":"profile","mcp":"test_connection"},{"name":"Create draft / publish / schedule","description":"Create a post as draft, publish now, or schedule — with optional tags.","python":"create_post()","cli":"create","mcp":"create_post"},{"name":"Get draft","description":"Fetch an existing draft by id.","python":"get_draft()","cli":"get-draft","mcp":"get_draft"},{"name":"Update draft","description":"Update title, subtitle, and body on an existing draft.","python":"update_draft()","cli":"update-draft","mcp":"update_draft"},{"name":"Publish now","description":"Publish an existing draft immediately.","python":"publish_now()","cli":"publish","mcp":"publish_post"},{"name":"Schedule","description":"Schedule a draft release at a UTC datetime.","python":"schedule_release()","cli":"schedule","mcp":"schedule_post"},{"name":"Delete draft","description":"Delete an existing draft.","python":"delete_draft()","cli":"delete-draft","mcp":"delete_draft"},{"name":"List tags","description":"List publication post tags.","python":"list_post_tags()","cli":"list-tags","mcp":"list_tags"},{"name":"Create tag","description":"Create a new publication post tag.","python":"create_post_tag()","cli":"create-tag","mcp":"create_tag"},{"name":"Attach tags","description":"Attach one or more tags to a post.","python":"set_post_tags()","cli":"set-tags","mcp":"set_tags"},{"name":"Get post tags","description":"Read tags currently attached to a post.","python":"get_post_tags()","cli":"get-post-tags","mcp":"get_post_tags"}],"extras":["Plain-text → ProseMirror draft_body conversion","Universal publication_url (*.substack.com or custom domain)","Python client — separate product","CLI — separate product","MCP server — separate product"],"publishSequence":["POST /api/v1/drafts","PUT  /api/v1/drafts/{id}","GET  /api/v1/drafts/{id}/prepublish?publish_date=...  (schedule)","POST /api/v1/drafts/{id}/scheduled_release            (schedule)","POST /api/v1/drafts/{id}/publish                      (publish now)"],"localMetaEndpoints":[{"method":"GET","path":"/api/health","description":"Liveness healthcheck"},{"method":"GET","path":"/api/v1/status","description":"API readiness and capability summary"},{"method":"GET","path":"/api/v1/docs","description":"This documentation payload"},{"method":"GET","path":"/api/v1/publications?slug={slug}","description":"Normalize/validate a publication host for SubstackClient(publication_url=...)"},{"method":"POST","path":"/api/v1/keys","description":"Generate an API key for a publication so an author can start posting","body":{"slug":{"type":"string","required":true,"description":"Publication subdomain or host"}}},{"method":"GET","path":"/api/v1/landings","description":"List landings (public: published only; ?status=draft|all requires Firebase Bearer)"},{"method":"POST","path":"/api/v1/landings","description":"Create landing (Firebase Bearer). Includes full SEO fields + content sections."},{"method":"GET","path":"/api/v1/landings/{slug}","description":"Get landing by slug (public published; draft requires Firebase Bearer)"},{"method":"PUT","path":"/api/v1/landings/{slug}","description":"Update landing by slug (Firebase Bearer)"},{"method":"DELETE","path":"/api/v1/landings/{slug}","description":"Delete landing by slug (Firebase Bearer)"}],"landings":{"pagePath":"/l/{slug}","seoFields":["seo_title","seo_description","seo_keywords","canonical_path","robots","og_title","og_description","og_image_url","og_type","twitter_card","twitter_title","twitter_description","twitter_image_url","json_ld"]}}