Skip to main content

Newsletter API

Two endpoints for managing newsletter subscriptions. Subscriber emails are stored in DynamoDB and used only for methodology update emails. Unsubscribe is a GDPR hard delete: the record is permanently removed, not soft-deleted.

POST /api/subscribe

POST /api/subscribe No auth required

Adds an email address to the newsletter subscriber list. If the email is already subscribed, the request succeeds without creating a duplicate.

Request body

FieldTypeRequiredDescription
emailstringYesEmail address to subscribe

Response (200 OK)

{"status": "subscribed"}

Error responses

StatusCondition
400Missing or invalid email field

Example

curl -X POST https://api.ticketyboo.dev/api/subscribe \
  -H "Content-Type: application/json" \
  -d '{"email": "user@example.com"}'

POST /api/unsubscribe

POST /api/unsubscribe No auth required

Permanently deletes the subscriber record from DynamoDB. This is a hard delete in compliance with GDPR Article 17 (right to erasure). The email address is removed immediately and cannot be recovered. If the email is not found, the request succeeds without error.

Request body

FieldTypeRequiredDescription
emailstringYesEmail address to unsubscribe

Response (200 OK)

{"status": "unsubscribed"}

Error responses

StatusCondition
400Missing or invalid email field

Example

curl -X POST https://api.ticketyboo.dev/api/unsubscribe \
  -H "Content-Type: application/json" \
  -d '{"email": "user@example.com"}'

Data handling