所需权限: subscribers
GET
/api/v1/subscribers
查询订阅者列表。
Query Parameters
| Parameter | Type | Description |
|---|---|---|
list_id |
string | 按列表UUID筛选 |
status |
string | subscribed, unsubscribed, bounced |
limit |
integer | 结果数量(默认: 20,最大: 100) |
offset |
integer | 分页偏移量 |
Response
{
"success": true,
"data": {
"subscribers": [
{
"id": "uuid-1234...",
"email": "user@example.com",
"name": "John Doe",
"status": "subscribed",
"metadata": {},
"created_at": "2026-01-01T00:00:00Z"
}
],
"total": 100,
"limit": 20,
"offset": 0
}
}
POST
/api/v1/subscribers
添加新订阅者。
Request Body
{
"email": "user@example.com",
"name": "John Doe", // optional
"list_id": "list-uuid-123",
"status": "subscribed", // optional: subscribed (default)
"metadata": { // optional
"company": "Acme Inc",
"plan": "pro"
}
}
Response
{
"success": true,
"data": {
"id": "subscriber-uuid-123",
"email": "user@example.com",
"name": "John Doe",
"status": "subscribed",
"created_at": "2026-01-10T12:00:00Z"
}
}
GET
/api/v1/subscribers/{id}
查询订阅者详细信息。
Response
{
"success": true,
"data": {
"id": "subscriber-uuid-123",
"email": "user@example.com",
"name": "John Doe",
"status": "subscribed",
"metadata": {},
"created_at": "2026-01-01T00:00:00Z",
"updated_at": "2026-01-10T12:00:00Z"
}
}
PUT
/api/v1/subscribers/{id}
修改订阅者信息。
Request Body
{
"name": "Jane Doe",
"status": "subscribed",
"metadata": {
"company": "New Company"
}
}
Response
{
"success": true,
"data": {
"id": "subscriber-uuid-123",
"email": "user@example.com",
"name": "Jane Doe",
"status": "subscribed",
"updated_at": "2026-01-10T12:00:00Z"
}
}
DELETE
/api/v1/subscribers/{id}
删除订阅者。
Response
{
"success": true,
"message": "Subscriber deleted successfully"
}