Articles

Create an article

POST article

Endpoint

POST /api/v1/articles

Parameters

Name Description
article[title] required Article title
article[content] required Article content
article[image] Article image

Request

Route

POST /api/v1/articles

Headers

Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiI3Iiwic2NwIjoidXNlciIsImF1ZCI6bnVsbCwiaWF0IjoxNzYwOTUwNDI5LCJleHAiOjE3NjM1NDI0MjksImp0aSI6Ijc1Y2ExOWQ0LTU2ODUtNDViZi05ZmViLTA3N2VjNWI3ZGY0YSJ9.IuEBlrrmSBI-_gvxfgxzWL5COcdPk7TBh_z1dWxpjho
Host: example.org
Cookie: 

Body

{
  "article": {
    "title": "Direct Accounting Administrator",
    "content": "asdf",
    "image": "eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--0860b7a5bab6814c95ebf4dfc27b8ad84488ffd0"
  }
}

Response

Simulated Response

Status

200

Headers

x-frame-options: SAMEORIGIN
x-xss-protection: 0
x-content-type-options: nosniff
x-permitted-cross-domain-policies: none
referrer-policy: strict-origin-when-cross-origin
content-type: application/json; charset=utf-8
vary: Accept, Origin
etag: W/"c8cb1040d4b6eeff1b87b0a0d596b90e"
cache-control: max-age=0, private, must-revalidate
x-request-id: 0f69b028-6de6-43c4-94f6-c34da9d3aacf
x-runtime: 0.104925
content-length: 63

Body

{
  "article": {
    "id": 14,
    "title": "Direct Accounting Administrator"
  }
}