Docs

REST API

Versoo Content Ops exposes two REST API endpoints under the versoo-content-ops/v1 namespace. Both require a logged-in user with the edit_posts capability and a valid WordPress REST nonce.

Authentication

Include a X-WP-Nonce header with a nonce generated by wp_create_nonce('wp_rest'). Cookie authentication is handled automatically for requests from the WP admin. For external requests, use WordPress Application Passwords.

POST /wp-json/versoo-content-ops/v1/draft

Generates an AI draft and saves it as a WordPress draft post or page.

Request body

{
  "title":  "Why AI-generated content still needs a human brand voice",
  "type":   "opinion",
  "intent": "Argue that AI drafts fail not because the writing is bad but because they lack a specific point of view. Cover what brand voice actually is (not tone), why it's impossible to inject without brand context, and what the fix looks like in practice.",
  "length": "medium",
  "format": "post"
}

Parameters

  • title (string, required) — Working title or key phrase, 3–10 words.
  • type (string, required) — One of: tutorial, explainer, listicle, opinion, case_study, faq, comparison, announcement.
  • intent (string, required) — What the post should cover. One paragraph of specifics produces better output than a vague topic name.
  • length (string, optional) — short (300–500w), medium (700–1,000w), long (1,500–2,000w). Default: medium.
  • format (string, optional) — post or page. Default: post.

Response

{
  "post_id":       412,
  "edit_url":      "https://example.com/wp-admin/post.php?post=412&action=edit",
  "word_count":    847,
  "input_tokens":  312,
  "output_tokens": 1104
}

The draft is saved with status draft. Nothing is published automatically. Token counts are estimates based on character length, not exact billing figures.

POST /wp-json/versoo-content-ops/v1/analyze-brand

Analyzes a writing sample and returns suggested values for the four brand context fields. Does not save anything — call this to preview suggestions before deciding whether to save them to Brand Context settings.

Request body

{
  "sample": "Paste one or two paragraphs of your own writing here. Minimum 50 characters."
}

Parameters

  • sample (string, required) — Writing sample, minimum 50 characters.

Response

{
  "audience": "Solo founders and content creators running small publishing businesses.",
  "angle":    "Practical, numbers-driven perspective from someone actively running niche sites.",
  "tone":     "Direct and conversational. No hedging, no filler.",
  "topics":   "Content strategy, affiliate SEO, niche sites, AI writing tools."
}

Error responses

  • 403 — User does not have edit_posts capability.
  • 400 — Missing or invalid parameter.
  • 429 — AI token allowance exhausted. Try a shorter intent or wait for the allowance to reset.
  • 503 — AI is not available in this environment (no provider configured).