Hikka Docs Hikka Docs
EndpointsArticles

Update Article

PUT
/articles/{slug}

Path Parameters

slug*string

Header Parameters

auth?|
auth?|

Request Body

application/json

title*string
Length3 <= length <= 255
document*array<>
Items1 <= items
content?|
tags*array<>
Itemsitems <= 3
draft?boolean
Defaulttrue
category*string
Value in"original" | "reviews" | "system" | "news"
trusted?boolean
Defaultfalse
[key: string]?never

Response Body

application/json

application/json

curl -X PUT "https://api.hikka.io/articles/string" \  -H "Content-Type: application/json" \  -d '{    "title": "string",    "document": [      {}    ],    "tags": [      "string"    ],    "category": "original"  }'
{
  "data_type": "string",
  "author": {
    "reference": "c773d0bf-1c42-4c18-aec8-1bdd8cb0a434",
    "updated": 1686088809,
    "created": 1686088809,
    "description": "Hikka",
    "username": "hikka",
    "cover": "string",
    "active": true,
    "avatar": "string",
    "role": "string",
    "is_followed": true
  },
  "tags": [
    {
      "content_count": 0,
      "name": "string"
    }
  ],
  "created": 0,
  "updated": 0,
  "comments_count": 0,
  "vote_score": 0,
  "my_score": 0,
  "category": "string",
  "trusted": true,
  "draft": true,
  "views": 0,
  "title": "string",
  "slug": "string",
  "content": {
    "data_type": "string",
    "image": "https://cdn.hikka.io/hikka.jpg",
    "title_en": "string",
    "title_ua": "string",
    "slug": "string",
    "title_ja": "string"
  },
  "document": [
    {}
  ]
}
{
  "message": "Example error message",
  "code": "example_error"
}