Api::V1::NewsletterSubscriptionsController API

Newsletter subscriptions

Create newsletter subscription

POST /api/v1/newsletter_subscriptions

Parameters

Name Description
token token

Request

Headers

Content-Type: application/json
Host: example.org
Cookie: 

Route

POST /api/v1/newsletter_subscriptions

Body

{"token":"foobar116","newsletter_subscription":{"email":"foo@bar.com","active":true}}

Response

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
X-Download-Options: noopen
X-Permitted-Cross-Domain-Policies: none
Referrer-Policy: strict-origin-when-cross-origin
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET,POST,PUT,PATCH,DELETE
Access-Control-Allow-Headers: Origin,Accept,Content-Type,X-Requested-With,X-CSRF-Token,X-API-KEY
Content-Type: application/json; charset=utf-8
ETag: W/"4a092e16451a256330e34c7701a96a40"
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: b58c9bc6-e11d-4bc1-b655-641df5971f8e
X-Runtime: 0.018920
Content-Length: 65

Status

201 Created

Body

{
  "newsletter_subscription": {
    "email": "foo@bar.com",
    "active": true
  }
}