Skip to main content
PATCH
https://api.rankspot.ai
/
v1
/
articles
/
{id}
Update an article
curl --request PATCH \
  --url https://api.rankspot.ai/v1/articles/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "title": "How to Start a Blog in 2024",
  "description": "A comprehensive guide.",
  "slug": "how-to-start-a-blog-2024",
  "coverImageUrl": "https://cdn.example.com/cover.jpg",
  "categoryId": "clx..."
}
'
{
  "id": "clx...",
  "title": "How to Start a Blog",
  "status": "draft",
  "slug": "how-to-start-a-blog",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "description": "A comprehensive guide.",
  "contentHtml": "<h1>How to Start a Blog</h1>...",
  "coverImageUrl": "https://cdn.example.com/cover.jpg",
  "categoryId": "clx..."
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

Body

application/json
title
string
Example:

"How to Start a Blog in 2024"

description
string
Example:

"A comprehensive guide."

slug
string
Example:

"how-to-start-a-blog-2024"

coverImageUrl
string
Example:

"https://cdn.example.com/cover.jpg"

categoryId
string
Example:

"clx..."

Response

id
string
required
Example:

"clx..."

title
string
required
Example:

"How to Start a Blog"

status
enum<string>
required
Available options:
draft,
generating,
generated
Example:

"draft"

slug
string
required
Example:

"how-to-start-a-blog"

createdAt
string<date-time>
required
updatedAt
string<date-time>
required
description
string | null
Example:

"A comprehensive guide."

contentHtml
string | null

Only returned by GE../articles/:slug

Example:

"<h1>How to Start a Blog</h1>..."

coverImageUrl
string | null
Example:

"https://cdn.example.com/cover.jpg"

categoryId
string | null
Example:

"clx..."