API Reference - Unsubscribed
Link: https://support.brilliantdirectories.com/support/solutions/articles/12000108055
← Back to API Reference | Getting Started
Unsubscribe List
Tracks email addresses that have opted out of receiving emails. Addresses on this list are left out of newsletters and automated email campaigns. Transactional template emails, such as welcome, verification and notification emails, are still sent to them.
unsubscribe_list — DB table: unsubscribe_listThe Unsubscribe Record Object
| Field | Type | Description |
|---|---|---|
id | integer | Unique record ID (primary key, read-only) |
email | string | Email address that has unsubscribed required on create |
code | text | Source of unsubscribe: admin, email, or api |
type | string | Type of unsubscribe (e.g. unsubscribe) |
date | string | Date unsubscribed (format: YYYYMMDDHHmmss) — auto-set on create |
definitive | integer | 1 for permanent unsubscribe, 0 for standard |
website_id | integer | Website ID — auto-set on create |
List Unsubscribe Records
curl -X GET "https://www.yourdomain.com/api/v2/unsubscribe_list/get?limit=50" \ -H "X-Api-Key: your-api-key-here"
Retrieve an Unsubscribe Record
curl -X GET "https://www.yourdomain.com/api/v2/unsubscribe_list/get/18" \ -H "X-Api-Key: your-api-key-here"
Create an Unsubscribe Record
Adds an email address to the unsubscribe list. The date, code, and website_id fields are set automatically.
curl -X POST "https://www.yourdomain.com/api/v2/unsubscribe_list/create" \ -H "X-Api-Key: your-api-key-here" \ -d "email=optout@example.com" \ -d "definitive=0"
Update an Unsubscribe Record
curl -X PUT "https://www.yourdomain.com/api/v2/unsubscribe_list/update" \ -H "X-Api-Key: your-api-key-here" \ -d "id=18" \ -d "definitive=1"
Delete an Unsubscribe Record
Removes an email from the unsubscribe list, re-enabling emails to that address.
curl -X DELETE "https://www.yourdomain.com/api/v2/unsubscribe_list/delete" \ -H "X-Api-Key: your-api-key-here" \ -d "id=18"
