Create an article
Articles
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.eyJzdWIiOiI3Iiwic2NwIjoidXNlciIsImF1ZCI6bnVsbCwiaWF0IjoxNzYzNjI2MzU4LCJleHAiOjE3NjYyMTgzNTgsImp0aSI6ImI3MmM1N2JkLWFlY2YtNGIwYi1iMzMzLTQ3MWYzN2YxZjFmMyJ9.TQ_iUkO3qXC4t3DTQXo6Iu4pkM-NhbP_gsGw8NsruDQ
Host: example.org
Cookie:
Body
{
"article": {
"title": "Legal 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/"ea9960fa730f73184199da57225f8a01"
cache-control: max-age=0, private, must-revalidate
x-request-id: 8c511ec8-1f68-4a1a-94aa-5c1fbe5abfb8
x-runtime: 0.115978
content-length: 45
Body
{
"article": {
"id": 14,
"title": "Legal Manager"
}
}