Skip to content

Archive an article

POST
/articles/{id}/archive
curl --request POST \
--url https://api.motenya.app/v1/articles/example/archive \
--header 'Authorization: Bearer <token>'

Requires articles:publish.

id
required
string
>= 1 characters <= 64 characters

The article after the change

Media typeapplication/json
object
id
required
string
>= 1 characters <= 64 characters
kbId
required
string
>= 1 characters <= 64 characters
language
required
string
categoryId
required
string | null
>= 1 characters <= 64 characters
slug
required
string
title
required
string
excerpt
required
string | null
tags
required
Array<string>
status
required
string
Allowed values: draft published archived
translationGroupId
required
string | null
publishedAt
required
string | null
updatedAt
required
string
bodyMarkdown
required
string
seoTitle
required
string | null
seoDescription
required
string | null
translations
required
Array<object>
object
language
required
string
slug
required
string

Example

{
"status": "draft"
}

Invalid request

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
field
string
details
Array<object>
object
code
required
string
message
required
string
field
string

Example

{
"error": {
"code": "SLUG_TAKEN"
}
}

Missing, invalid, revoked or expired API key

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
field
string
details
Array<object>
object
code
required
string
message
required
string
field
string

Example

{
"error": {
"code": "SLUG_TAKEN"
}
}

Missing scope, API turned off, published article without publish scope, or account suspended

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
field
string
details
Array<object>
object
code
required
string
message
required
string
field
string

Example

{
"error": {
"code": "SLUG_TAKEN"
}
}

Not found, or outside the knowledge bases this key may use

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
field
string
details
Array<object>
object
code
required
string
message
required
string
field
string

Example

{
"error": {
"code": "SLUG_TAKEN"
}
}

Slug or translation already exists

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
field
string
details
Array<object>
object
code
required
string
message
required
string
field
string

Example

{
"error": {
"code": "SLUG_TAKEN"
}
}

Rejected by validation (e.g. unknown language or category)

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
field
string
details
Array<object>
object
code
required
string
message
required
string
field
string

Example

{
"error": {
"code": "SLUG_TAKEN"
}
}

Rate limited; see Retry-After

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
field
string
details
Array<object>
object
code
required
string
message
required
string
field
string

Example

{
"error": {
"code": "SLUG_TAKEN"
}
}

Internal error