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.eyJzdWIiOiI3Iiwic2NwIjoidXNlciIsImF1ZCI6bnVsbCwiaWF0IjoxNzQyNDY0OTAwLCJleHAiOjE3NDUwNTY5MDAsImp0aSI6Ijc4MDcyZDRhLWJlN2UtNDM3NS04YzM1LWU0ODcwMTk5MTkyYyJ9.Yae1n-20MFdAGjZtD3-YF5A5Ww0qq2J9JsL4qeBSyp0
Host: example.org
Cookie: 

Body

{
  "article": {
    "title": "Design Manager",
    "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/"68439d79f10f4d4467e9c379f157c50b"
cache-control: max-age=0, private, must-revalidate
x-request-id: ad32d475-3e80-4a84-a309-31e549be89fa
x-runtime: 0.112962
content-length: 46

Body

{
  "article": {
    "id": 14,
    "title": "Design Manager"
  }
}