POST
/
mailing-lists
/
Create
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': '*/*'},
  body: '"\"{\\n    \\\"description\\\": \\\"New Mailing List\\\",\\n    \\\"sub_account\\\": 7,\\n    \\\"qrcode_url\\\" : \\\"https://www.google.com\\\"\\n}\""'
};

fetch('https://api.thanks.io/api/v2/mailing-lists/', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
{
  "type": "manual",
  "description": "New Mailing List (Created via API 09/07/2021)",
  "sub_account_id": 7,
  "user_id": 2,
  "updated_at": "2021-09-07 02:10:32",
  "created_at": "1 second ago",
  "id": 610
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Content-Type
string

Body

*/* · string

The body is of type string.

Example:

"\"{\\n \\\"description\\\": \\\"New Mailing List\\\",\\n \\\"sub_account\\\": 7,\\n \\\"qrcode_url\\\" : \\\"https://www.google.com\\\"\\n}\""

Response

201 - application/json

Created

The response is of type object.