Analytics

Choose what to do with an SEO opportunity

Plans an SEO opportunity (plan_to_do, optionally with a plan: the change, URLs and the metric to watch), reports it as already done (already_did, with what was changed, where and when), or closes it (will_not_do, with a reason), as on the SEO page. It goes to SEO Work in OneLence; nothing changes on the site or in Search Console, and it cannot be undone from here. Pass the candidate_fingerprint and the window the opportunity was read with. Some opportunities need a plan for every choice, as on the SEO page; without one the choice is refused with param plan. Owners and admins only.

post/sites/{site}/seo-opportunities/{opportunity_id}/choice

Request

  • Base URL: https://api.onelence.com/v1
  • URL: https://api.onelence.com/v1/sites/{site}/seo-opportunities/{opportunity_id}/choice
  • Auth: one of:
    • OAuth 2 (authorization code, authorization URL https://api.onelence.com/oauth/authorize, token URL https://api.onelence.com/oauth/token, scopes: workspace:write)
    • HTTP bearer

Path parameters

sitestring required

Site domain (e.g. example.com) or site id. Defaults to the workspace's newest active site.

opportunity_idstring required

The opportunity id from the SEO opportunities list.

Query parameters

dry_runboolean

true returns a preview of the change and applies nothing.

Headers

Idempotency-Keystring

8 to 200 visible ASCII characters. Retries with the same key and request return the stored response for 24 hours.

Request body

candidate_fingerprintstring required

candidate_fingerprint from the same read; a changed opportunity is refused.

choice'plan_to_do' | 'already_did' | 'will_not_do' required
reasonstring

Why, for will_not_do.

startstring

Window start: a date (YYYY-MM-DD) or ISO 8601 date-time. Defaults to 30 days before end.

endstring

Window end, inclusive for a date. Defaults to now.

Response

Success.

object'seo_choice_receipt' required
opportunity_idstring required
choice'plan_to_do' | 'already_did' | 'will_not_do' required
replayedboolean required

Changes

No recorded changes to this operation across all 1 revision of this API.