Update an article (only the fields sent)
const url = 'https://api.motenya.app/v1/articles/example';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"categoryId":"example","slug":"getting-started","title":"example","excerpt":"example","bodyMarkdown":"example","seoTitle":"example","seoDescription":"example","tags":["example"],"position":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://api.motenya.app/v1/articles/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "categoryId": "example", "slug": "getting-started", "title": "example", "excerpt": "example", "bodyMarkdown": "example", "seoTitle": "example", "seoDescription": "example", "tags": [ "example" ], "position": 1 }'Requires articles:write; a published article also requires articles:publish, because the edit goes live immediately.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”object
Category in the same KB and language; null for none.
Lowercase letters, digits and single hyphens; unique per knowledge base and language.
Example
getting-startedGitHub-flavoured Markdown. A single newline is a line break. Link to another article with [text](article:<articleId>), not its URL — it is resolved to the current URL in the reader’s language.
Responses
Section titled “Responses”Updated
object
object
Example
{ "status": "draft"}Invalid request
object
object
object
Example
{ "error": { "code": "SLUG_TAKEN" }}Missing, invalid, revoked or expired API key
object
object
object
Example
{ "error": { "code": "SLUG_TAKEN" }}Missing scope, API turned off, published article without publish scope, or account suspended
object
object
object
Example
{ "error": { "code": "SLUG_TAKEN" }}Not found, or outside the knowledge bases this key may use
object
object
object
Example
{ "error": { "code": "SLUG_TAKEN" }}Slug or translation already exists
object
object
object
Example
{ "error": { "code": "SLUG_TAKEN" }}Rejected by validation (e.g. unknown language or category)
object
object
object
Example
{ "error": { "code": "SLUG_TAKEN" }}Rate limited; see Retry-After
object
object
object
Example
{ "error": { "code": "SLUG_TAKEN" }}Internal error