Ruhusa inayohitajika: subscribers
GET
/api/v1/subscribers
Inapata orodha ya wasajiliwa.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
list_id |
string | Chuja kwa UUID ya orodha |
status |
string | subscribed, unsubscribed, bounced |
limit |
integer | Idadi ya matokeo (chaguomsingi: 20, upeo: 100) |
offset |
integer | Offset ya kurasa |
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
Inaongeza msajiliwa mpya.
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}
Inapata maelezo ya msajiliwa.
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}
Inasasisha taarifa za msajiliwa.
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}
Inafuta msajiliwa.
Response
{
"success": true,
"message": "Subscriber deleted successfully"
}