Newsletter
Endpoints for Newsletter
Endpoints for Newsletter
GET/api/v1/newsletters/providers
Authentication: Bearer token (JWT)
unauthorized
forbiddenResource
internalServerError
curlcurl https://api.subrite.no/api/v1/newsletters/providers \
--header 'Authorization: Bearer <token>'POST/api/v1/newsletters/lists
Authentication: Bearer token (JWT)
application/jsonunauthorized
forbiddenResource
internalServerError
curlcurl https://api.subrite.no/api/v1/newsletters/lists \
--request POST \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"provider": "mailchimp",
"apiKey": "<apiKey>",
"userName": "<userName>",
"password": "<password>",
"integrationId": "string"
}'POST/api/v1/newsletters
Authentication: Bearer token (JWT)
application/jsonshouldNotBeEmpty, invalidFormat, alreadyExists
unauthorized
forbiddenResource
internalServerError
curlcurl https://api.subrite.no/api/v1/newsletters \
--request POST \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "string",
"provider": "mailchimp",
"config": {
"id": "string",
"name": "string",
"listName": "string",
"webhookSecret": "<webhookSecret>",
"apiKey": "<apiKey>",
"userName": "<userName>",
"password": "<password>",
"accessToken": "<accessToken>",
"refreshToken": "<refreshToken>",
"integrationId": "string"
}
}'DELETE/api/v1/newsletters/{id}
Authentication: Bearer token (JWT)
idnumberRequiredbadRequest
unauthorized
forbiddenResource
notFound
internalServerError
curlcurl 'https://api.subrite.no/api/v1/newsletters/{id}' \
--request DELETE \
--header 'Authorization: Bearer <token>'