Web Analytics Content Autopilot
For instructions on how to authenticate to use this endpoint, see API overview.
Endpoints
GET | |
GET | |
POST | |
POST | |
POST | |
POST |
List all web analytics content autopilot proposals
Required API key scopes
web_analytics:readQuery parameters
- limitinteger
- offsetinteger
- profile_idstring
- run_idstring
Response
Example request
GET /api /projects /:project_id /web_analytics_content_autopilot_proposalsexport POSTHOG_PERSONAL_API_KEY=[your personal api key]curl \-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \<ph_app_host>/api/projects/:project_id/web_analytics_content_autopilot_proposals/
api_key = "[your personal api key]"project_id = "[your project id]"response = requests.get("<ph_app_host>/api/projects/{project_id}/web_analytics_content_autopilot_proposals/".format(project_id=project_id),headers={"Authorization": "Bearer {}".format(api_key)},).json()
Example response
Status 200
RESPONSE
{"count": 123,"next": "http://api.example.org/accounts/?offset=400&limit=100","previous": "http://api.example.org/accounts/?offset=200&limit=100","results": [{"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08","run_id": "dded282c-8ebd-44cf-8ba5-9a234973d1ec","proposal_type": "new_content","lifecycle_status": "generating","title": "string","target_query": "string","evidence": [{"opportunity_kind": "poor_ctr","explanation": "string","page_url": "http://example.com","query": "string"}],"validation_report": {"passed": true,"checks": [{"check_key": "string","label": "string","passed": true,"message": "string","blocking": true}]},"file_path": "string","target_url": "http://example.com","created_at": "2019-08-24T14:15:22Z","updated_at": "2019-08-24T14:15:22Z"}]}
Retrieve web analytics content autopilot proposals
Required API key scopes
web_analytics:readPath parameters
- idstring
Response
Example request
GET /api /projects /:project_id /web_analytics_content_autopilot_proposals /:idexport POSTHOG_PERSONAL_API_KEY=[your personal api key]curl \-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \<ph_app_host>/api/projects/:project_id/web_analytics_content_autopilot_proposals/:id/
api_key = "[your personal api key]"project_id = "[your project id]"response = requests.get("<ph_app_host>/api/projects/{project_id}/web_analytics_content_autopilot_proposals/{web_analytics_content_autopilot_proposal_id}/".format(project_id=project_id,web_analytics_content_autopilot_proposal_id="<the web analytics content autopilot proposal id>"),headers={"Authorization": "Bearer {}".format(api_key)},).json()
Example response
Status 200
RESPONSE
{"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08","run_id": "dded282c-8ebd-44cf-8ba5-9a234973d1ec","proposal_type": "new_content","lifecycle_status": "generating","title": "string","target_query": "string","target_url": "http://example.com","evidence": [{"opportunity_kind": "poor_ctr","explanation": "string","page_url": "http://example.com","query": "string"}],"validation_report": {"passed": true,"checks": [{"check_key": "string","label": "string","passed": true,"message": "string","blocking": true}]},"content_package": {"file_path": "string","title": "string","description": "string","slug": "string","frontmatter": [{"key": "string","value": "string"}],"internal_links": ["http://example.com"],"source_notes": ["string"],"json_ld": "string","llms_txt_line": "string"},"original_markdown": "string","proposed_markdown": "string","brief": {"intent": "string","audience": "string","recommended_type": "string","target_page": "string","site_pages_to_read": ["string"],"competitors_to_research": [{"name": "string","url": "string"}],"working_title": "string","outline": ["string"],"questions_to_answer": ["string"],"competitor_coverage": ["string"],"engine_answer_summary": "string","disambiguation": "string"},"source_ledger": [{"claim": "string","source_url": "string","quote": "string","kind": "site"}],"created_at": "2019-08-24T14:15:22Z","updated_at": "2019-08-24T14:15:22Z"}
Create web analytics content autopilot proposals
Saves reviewed Markdown and its structured package without publishing it.
Required API key scopes
web_analytics:writePath parameters
- idstring
Request parameters
- proposed_markdownstring
- content_package
Response
Example request
POST /api /projects /:project_id /web_analytics_content_autopilot_proposals /:id /editexport POSTHOG_PERSONAL_API_KEY=[your personal api key]curl-H 'Content-Type: application/json'\-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \<ph_app_host>/api/projects/:project_id/web_analytics_content_autopilot_proposals/:id/edit/\-d proposed_markdown="string",\-d content_package=undefined
api_key = "[your personal api key]"project_id = "[your project id]"response = requests.post("<ph_app_host>/api/projects/{project_id}/web_analytics_content_autopilot_proposals/{web_analytics_content_autopilot_proposal_id}/edit/".format(project_id=project_id,web_analytics_content_autopilot_proposal_id="<the web analytics content autopilot proposal id>"),headers={"Authorization": "Bearer {}".format(api_key)},data={"proposed_markdown": "string"}).json()
Example response
Status 200
RESPONSE
{"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08","run_id": "dded282c-8ebd-44cf-8ba5-9a234973d1ec","proposal_type": "new_content","lifecycle_status": "generating","title": "string","target_query": "string","target_url": "http://example.com","evidence": [{"opportunity_kind": "poor_ctr","explanation": "string","page_url": "http://example.com","query": "string"}],"validation_report": {"passed": true,"checks": [{"check_key": "string","label": "string","passed": true,"message": "string","blocking": true}]},"content_package": {"file_path": "string","title": "string","description": "string","slug": "string","frontmatter": [{"key": "string","value": "string"}],"internal_links": ["http://example.com"],"source_notes": ["string"],"json_ld": "string","llms_txt_line": "string"},"original_markdown": "string","proposed_markdown": "string","brief": {"intent": "string","audience": "string","recommended_type": "string","target_page": "string","site_pages_to_read": ["string"],"competitors_to_research": [{"name": "string","url": "string"}],"working_title": "string","outline": ["string"],"questions_to_answer": ["string"],"competitor_coverage": ["string"],"engine_answer_summary": "string","disambiguation": "string"},"source_ledger": [{"claim": "string","source_url": "string","quote": "string","kind": "site"}],"created_at": "2019-08-24T14:15:22Z","updated_at": "2019-08-24T14:15:22Z"}
Create web analytics content autopilot proposals
Returns validated Markdown and structured JSON without publishing it.
Required API key scopes
web_analytics:writePath parameters
- idstring
Response
Example request
POST /api /projects /:project_id /web_analytics_content_autopilot_proposals /:id /exportexport POSTHOG_PERSONAL_API_KEY=[your personal api key]curl-H 'Content-Type: application/json'\-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \<ph_app_host>/api/projects/:project_id/web_analytics_content_autopilot_proposals/:id/export/
api_key = "[your personal api key]"project_id = "[your project id]"response = requests.post("<ph_app_host>/api/projects/{project_id}/web_analytics_content_autopilot_proposals/{web_analytics_content_autopilot_proposal_id}/export/".format(project_id=project_id,web_analytics_content_autopilot_proposal_id="<the web analytics content autopilot proposal id>"),headers={"Authorization": "Bearer {}".format(api_key)},).json()
Example response
Status 200
RESPONSE
{"filename": "string","markdown": "string","content_package": {"file_path": "string","title": "string","description": "string","slug": "string","frontmatter": [{"key": "string","value": "string"}],"internal_links": ["http://example.com"],"source_notes": ["string"],"json_ld": "string","llms_txt_line": "string"}}
Create web analytics content autopilot proposals
Returns a proposal to generation while keeping its previous result inspectable in history.
Required API key scopes
web_analytics:writePath parameters
- idstring
Response
Example request
POST /api /projects /:project_id /web_analytics_content_autopilot_proposals /:id /regenerateexport POSTHOG_PERSONAL_API_KEY=[your personal api key]curl-H 'Content-Type: application/json'\-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \<ph_app_host>/api/projects/:project_id/web_analytics_content_autopilot_proposals/:id/regenerate/
api_key = "[your personal api key]"project_id = "[your project id]"response = requests.post("<ph_app_host>/api/projects/{project_id}/web_analytics_content_autopilot_proposals/{web_analytics_content_autopilot_proposal_id}/regenerate/".format(project_id=project_id,web_analytics_content_autopilot_proposal_id="<the web analytics content autopilot proposal id>"),headers={"Authorization": "Bearer {}".format(api_key)},).json()
Example response
Status 202
RESPONSE
{"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08","run_id": "dded282c-8ebd-44cf-8ba5-9a234973d1ec","proposal_type": "new_content","lifecycle_status": "generating","title": "string","target_query": "string","target_url": "http://example.com","evidence": [{"opportunity_kind": "poor_ctr","explanation": "string","page_url": "http://example.com","query": "string"}],"validation_report": {"passed": true,"checks": [{"check_key": "string","label": "string","passed": true,"message": "string","blocking": true}]},"content_package": {"file_path": "string","title": "string","description": "string","slug": "string","frontmatter": [{"key": "string","value": "string"}],"internal_links": ["http://example.com"],"source_notes": ["string"],"json_ld": "string","llms_txt_line": "string"},"original_markdown": "string","proposed_markdown": "string","brief": {"intent": "string","audience": "string","recommended_type": "string","target_page": "string","site_pages_to_read": ["string"],"competitors_to_research": [{"name": "string","url": "string"}],"working_title": "string","outline": ["string"],"questions_to_answer": ["string"],"competitor_coverage": ["string"],"engine_answer_summary": "string","disambiguation": "string"},"source_ledger": [{"claim": "string","source_url": "string","quote": "string","kind": "site"}],"created_at": "2019-08-24T14:15:22Z","updated_at": "2019-08-24T14:15:22Z"}
Create web analytics content autopilot proposals
Rejects a proposal without changing the public site.
Required API key scopes
web_analytics:writePath parameters
- idstring
Response
Example request
POST /api /projects /:project_id /web_analytics_content_autopilot_proposals /:id /rejectexport POSTHOG_PERSONAL_API_KEY=[your personal api key]curl-H 'Content-Type: application/json'\-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \<ph_app_host>/api/projects/:project_id/web_analytics_content_autopilot_proposals/:id/reject/
api_key = "[your personal api key]"project_id = "[your project id]"response = requests.post("<ph_app_host>/api/projects/{project_id}/web_analytics_content_autopilot_proposals/{web_analytics_content_autopilot_proposal_id}/reject/".format(project_id=project_id,web_analytics_content_autopilot_proposal_id="<the web analytics content autopilot proposal id>"),headers={"Authorization": "Bearer {}".format(api_key)},).json()
Example response
Status 200
RESPONSE
{"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08","run_id": "dded282c-8ebd-44cf-8ba5-9a234973d1ec","proposal_type": "new_content","lifecycle_status": "generating","title": "string","target_query": "string","target_url": "http://example.com","evidence": [{"opportunity_kind": "poor_ctr","explanation": "string","page_url": "http://example.com","query": "string"}],"validation_report": {"passed": true,"checks": [{"check_key": "string","label": "string","passed": true,"message": "string","blocking": true}]},"content_package": {"file_path": "string","title": "string","description": "string","slug": "string","frontmatter": [{"key": "string","value": "string"}],"internal_links": ["http://example.com"],"source_notes": ["string"],"json_ld": "string","llms_txt_line": "string"},"original_markdown": "string","proposed_markdown": "string","brief": {"intent": "string","audience": "string","recommended_type": "string","target_page": "string","site_pages_to_read": ["string"],"competitors_to_research": [{"name": "string","url": "string"}],"working_title": "string","outline": ["string"],"questions_to_answer": ["string"],"competitor_coverage": ["string"],"engine_answer_summary": "string","disambiguation": "string"},"source_ledger": [{"claim": "string","source_url": "string","quote": "string","kind": "site"}],"created_at": "2019-08-24T14:15:22Z","updated_at": "2019-08-24T14:15:22Z"}











