Skip to content

SEO score and publishing

An article only goes live if its SEO score meets the required minimum. The API lets you measure the score before you try to publish, and when it refuses it tells you exactly what is missing. For automation (AI agents included) the loop is: measure, fix, publish.

Method Path Scope Purpose
POST /v1/posts/seo/analyze seo:read Scores a draft without saving anything.
GET /v1/posts/{reference}/seo/score seo:read Scores a saved post as it is now.
POST /v1/posts/{reference}/publish posts:write Publishes or schedules an existing draft through the same gate.

Rate limit: the general bucket of 60 req/min per key.

The body is the same as POST /v1/posts (title, blocks_json, excerpt, language, post_type, editorial…). Nothing is created or stored: it does not touch the archive, does not use creation quota and ignores Idempotency-Key. Fields only creation uses (taxonomy, cover, status, published_at) are accepted and ignored.

Janela do terminal
curl -X POST https://api.canverly.com/v1/posts/seo/analyze \
-H "Authorization: Bearer ck_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"title": "How to measure the SEO score before publishing",
"excerpt": "A short walkthrough.",
"blocks_json": { "v": 1, "blocks": [
{ "id": "p1", "type": "paragraph", "text": "Article text." }
] }
}'

Send focus_keyword ({ "primary": "payroll loan", "secondary": ["loan margin"] }) to measure with the focus. Without it a new draft is measured with no focus: -10 points and the keyword checks off. The same field is accepted on POST /v1/posts and PATCH /v1/posts/{reference}, where it is saved with the post before publishing, so the gate measures with the focus. Rules: primary 1 to 200 characters, up to 5 secondary, no repeats; outside them, 422 INVALID_FOCUS_KEYWORD. If the post was saved but the focus was not, the response carries warnings: ["SEO_FOCUS_NOT_SAVED"]: resend it with PATCH.

reference is the post id (ULID) or its slug, drafts and scheduled posts included; use ?language= if the same slug exists in more than one language. The score is always computed on the spot (never cached), so it reflects the PATCH you just made. The response carries Cache-Control: private, no-store. A post on another site answers 404.

Both routes return the same object. Only these keys exist:

Field Type Notes
score number 0 to 100.
band string green, yellow, red or empty.
minimum_to_publish number The minimum score to publish. Read it from here; do not hardcode it.
missing number Points short of the minimum (0 if already met).
can_publish boolean Only compares the score with the minimum. The gate applies only when publish_gate_applies is true.
publish_gate_applies boolean true for articles; false for pages and custom types.
word_count integer Words counted.
engine_version string Version of the scoring engine. Only compare two scores of the same version. May be absent.
source string Always live.
computed_at string (date-time) When it was computed.
post_updated_at string (date-time) Only on GET …/seo/score: the post version used.
checks[] array What the engine evaluated: id, group (basic, additional, title, content, planning), status (ok, warning, error, na), weight, title, hint, and block_id/items when present. na does not count toward the score.
suggestions[] array What to do, already sorted by points gained per effort: id, title, hint, points_gain, effort (easy, medium, hard) and block_id when present.

Example (illustrative shape; the numbers depend on the content and the engine):

{
"score": 72,
"band": "yellow",
"minimum_to_publish": 85,
"missing": 13,
"can_publish": false,
"publish_gate_applies": true,
"word_count": 640,
"source": "live",
"computed_at": "2026-10-12T17:00:00Z",
"checks": [
{ "id": "<check-id>", "group": "basic", "status": "error", "weight": 5,
"title": "<check name>", "hint": "<what is wrong and what to do>" }
],
"suggestions": [
{ "id": "<check-id>", "title": "<name>", "hint": "<what to do>",
"points_gain": 5, "effort": "easy" }
]
}

Publishing below the minimum, through POST /v1/posts with status: "published" (or "scheduled") or through POST /v1/posts/{reference}/publish, returns:

{
"error": {
"code": "SEO_SCORE_BELOW_MINIMUM",
"message": "…",
"score": 72,
"minimum_to_publish": 85,
"missing": 13,
"suggestions": [
{ "id": "<check-id>", "title": "<name>", "hint": "…", "points_gain": 5, "effort": "easy" }
],
"post_id": "01K8Z9K3F7T8M2QYV5N6B4WJ8R",
"post_status": "draft"
}
}

Nothing is published on refusal. post_id and post_status only appear when a draft was created.

Takes a post that already exists (draft or scheduled) live, through the same gate. The body is optional: { "published_at": "2026-10-20T09:00:00Z" } (RFC 3339 with offset).

  • A future date schedules the post (status: "scheduled", it goes live by itself).
  • A past date, now, or an omitted date publishes immediately (with that date, when sent).
  • reference is the id or the slug (drafts included); ?language= disambiguates.
Janela do terminal
curl -X POST https://api.canverly.com/v1/posts/how-to-measure-the-score/publish \
-H "Authorization: Bearer ck_live_xxx"

200 OK:

{ "id": "01K8Z9K3F7T8M2QYV5N6B4WJ8R", "slug": "how-to-measure-the-score", "status": "published" }

When scheduling, the response also carries scheduled_for. To take a post down, see POST /v1/posts/{reference}/unpublish.

Status error.code When What to do
400 bad_request Invalid parameter or body; slug ambiguous across languages (send ?language=). Fix the request.
401 / 403 unauthorized / forbidden Invalid key; missing scope (seo:read to measure, posts:write to publish). Use a key with the scope.
404 not_found No such post on this site. Stop; do not enumerate ids.
409 NOT_PUBLISHABLE publish on a post that is neither draft nor scheduled (already published, archived). Do not repeat: publishing twice is an error.
422 SEO_SCORE_BELOW_MINIMUM Score below the minimum. Apply error.suggestions, measure again, publish.
422 INVALID_FOCUS_KEYWORD focus_keyword outside the rules. Fix the focus.
422 SEO_ANALYSIS_REJECTED The engine refused the content; error.field names the field. Fix the field.
429 rate_limited Over the limit. Wait Retry-After.
503 SEO_SCORE_UNVERIFIABLE On publish: the score could not be verified right now; nothing was published. Comes with Retry-After. Retry after Retry-After seconds.
503 SEO_SCORE_UNAVAILABLE On measure (analyze/score): scoring engine down or not configured. Retry; the rest of the API is unaffected.