|
4 | 4 | | ------ | --------------------------------------------------------------------------------------- | ---------------------------------------------- |
|
5 | 5 | | GET | [/api/subscribers](#get-apisubscribers) | Query and retrieve subscribers. |
|
6 | 6 | | GET | [/api/subscribers/{subscriber_id}](#get-apisubscriberssubscriber_id) | Retrieve a specific subscriber. |
|
| 7 | +| GET | [/api/subscribers/{subscriber_id}/export](#get-apisubscriberssubscriber_idexport) | Export a specific subscriber. | |
| 8 | +| GET | [/api/subscribers/{subscriber_id}/bounces](#get-apisubscriberssubscriber_idbounces) | Retrieve a subscriber bounce records. | |
7 | 9 | | POST | [/api/subscribers](#post-apisubscribers) | Create a new subscriber. |
|
| 10 | +| POST | [/api/subscribers/{subscriber_id}/optin](#post-apisubscriberssubscriber_idoptin) | Sends optin confirmation email to subscribers. | |
8 | 11 | | POST | [/api/public/subscription](#post-apipublicsubscription) | Create a public subscription. |
|
9 | 12 | | PUT | [/api/subscribers/lists](#put-apisubscriberslists) | Modify subscriber list memberships. |
|
10 | 13 | | PUT | [/api/subscribers/{subscriber_id}](#put-apisubscriberssubscriber_id) | Update a specific subscriber. |
|
11 | 14 | | PUT | [/api/subscribers/{subscriber_id}/blocklist](#put-apisubscriberssubscriber_idblocklist) | Blocklist a specific subscriber. |
|
12 |
| -| PUT | /api/subscribers/blocklist | Blocklist one or more subscribers. | |
| 15 | +| PUT | [/api/subscribers/blocklist](#put-apisubscribersblocklist) | Blocklist one or many subscribers. | |
13 | 16 | | PUT | [/api/subscribers/query/blocklist](#put-apisubscribersqueryblocklist) | Blocklist subscribers based on SQL expression. |
|
14 | 17 | | DELETE | [/api/subscribers/{subscriber_id}](#delete-apisubscriberssubscriber_id) | Delete a specific subscriber. |
|
| 18 | +| DELETE | [/api/subscribers/{subscriber_id}/bounces](#delete-apisubscriberssubscriber_idbounces) | Delete a specific subscriber's bounce records. | |
15 | 19 | | DELETE | [/api/subscribers](#delete-apisubscribers) | Delete one or more subscribers. |
|
16 | 20 | | POST | [/api/subscribers/query/delete](#post-apisubscribersquerydelete) | Delete subscribers based on SQL expression. |
|
17 | 21 |
|
@@ -180,9 +184,115 @@ curl -u 'username:password' 'http://localhost:9000/api/subscribers/1'
|
180 | 184 | }
|
181 | 185 | }
|
182 | 186 | ```
|
| 187 | +______________________________________________________________________ |
| 188 | + |
| 189 | +#### GET /api/subscribers/{subscriber_id}/export |
| 190 | + |
| 191 | +Export a specific subscriber data that gives profile, list subscriptions, campaign views and link clicks information. Names of private lists are replaced with "Private list". |
| 192 | + |
| 193 | +##### Parameters |
| 194 | + |
| 195 | +| Name | Type | Required | Description | |
| 196 | +|:--------------|:----------|:---------|:-----------------| |
| 197 | +| subscriber_id | Number | Yes | Subscriber's ID. | |
| 198 | + |
| 199 | +##### Example Request |
| 200 | + |
| 201 | +```shell |
| 202 | +curl -u 'username:password' 'http://localhost:9000/api/subscribers/1/export' |
| 203 | +``` |
| 204 | + |
| 205 | +##### Example Response |
183 | 206 |
|
| 207 | +```json |
| 208 | +{ |
| 209 | + "profile": [ |
| 210 | + { |
| 211 | + "id": 1, |
| 212 | + "uuid": "c2cc0b31-b485-4d72-8ce8-b47081beadec", |
| 213 | + |
| 214 | + "name": "John Doe", |
| 215 | + "attribs": { |
| 216 | + "city": "Bengaluru", |
| 217 | + "good": true, |
| 218 | + "type": "known" |
| 219 | + }, |
| 220 | + "status": "enabled", |
| 221 | + "created_at": "2024-07-29T11:01:31.478677+05:30", |
| 222 | + "updated_at": "2024-07-29T11:01:31.478677+05:30" |
| 223 | + } |
| 224 | + ], |
| 225 | + "subscriptions": [ |
| 226 | + { |
| 227 | + "subscription_status": "unconfirmed", |
| 228 | + "name": "Private list", |
| 229 | + "type": "private", |
| 230 | + "created_at": "2024-07-29T11:01:31.478677+05:30" |
| 231 | + } |
| 232 | + ], |
| 233 | + "campaign_views": [], |
| 234 | + "link_clicks": [] |
| 235 | +} |
| 236 | +``` |
184 | 237 | ______________________________________________________________________
|
185 | 238 |
|
| 239 | +#### GET /api/subscribers/{subscriber_id}/bounces |
| 240 | + |
| 241 | +Get a specific subscriber bounce records. |
| 242 | +##### Parameters |
| 243 | + |
| 244 | +| Name | Type | Required | Description | |
| 245 | +|:--------------|:----------|:---------|:-----------------| |
| 246 | +| subscriber_id | Number | Yes | Subscriber's ID. | |
| 247 | + |
| 248 | +##### Example Request |
| 249 | + |
| 250 | +```shell |
| 251 | +curl -u 'username:password' 'http://localhost:9000/api/subscribers/1/bounces' |
| 252 | +``` |
| 253 | + |
| 254 | +##### Example Response |
| 255 | + |
| 256 | +```json |
| 257 | +{ |
| 258 | + "data": [ |
| 259 | + { |
| 260 | + "id": 841706, |
| 261 | + "type": "hard", |
| 262 | + "source": "demo", |
| 263 | + "meta": { |
| 264 | + "some": "parameter" |
| 265 | + }, |
| 266 | + "created_at": "2024-08-22T09:05:12.862877Z", |
| 267 | + |
| 268 | + "subscriber_uuid": "137c0d83-8de6-44e2-a55f-d4238ab21969", |
| 269 | + "subscriber_id": 99, |
| 270 | + "campaign": { |
| 271 | + "id": 2, |
| 272 | + "name": "Welcome to listmonk" |
| 273 | + } |
| 274 | + }, |
| 275 | + { |
| 276 | + "id": 841680, |
| 277 | + "type": "hard", |
| 278 | + "source": "demo", |
| 279 | + "meta": { |
| 280 | + "some": "parameter" |
| 281 | + }, |
| 282 | + "created_at": "2024-08-19T14:07:53.141917Z", |
| 283 | + |
| 284 | + "subscriber_uuid": "137c0d83-8de6-44e2-a55f-d4238ab21969", |
| 285 | + "subscriber_id": 99, |
| 286 | + "campaign": { |
| 287 | + "id": 1, |
| 288 | + "name": "Test campaign" |
| 289 | + } |
| 290 | + } |
| 291 | + ] |
| 292 | +} |
| 293 | +``` |
| 294 | + |
| 295 | +______________________________________________________________________ |
186 | 296 |
|
187 | 297 | #### POST /api/subscribers
|
188 | 298 |
|
@@ -230,6 +340,26 @@ curl -u 'username:password' 'http://localhost:9000/api/subscribers' -H 'Content-
|
230 | 340 |
|
231 | 341 | ______________________________________________________________________
|
232 | 342 |
|
| 343 | +#### POST /api/subscribers/{subscribers_id}/optin |
| 344 | + |
| 345 | +Sends optin confirmation email to subscribers. |
| 346 | + |
| 347 | +##### Example Request |
| 348 | + |
| 349 | +```shell |
| 350 | +curl -u 'username:password' 'http://localhost:9000/api/subscribers/11/optin' -H 'Content-Type: application/json' \ |
| 351 | +--data {} |
| 352 | +``` |
| 353 | + |
| 354 | +##### Example Response |
| 355 | + |
| 356 | +```json |
| 357 | +{ |
| 358 | + "data": true |
| 359 | +} |
| 360 | +``` |
| 361 | +______________________________________________________________________ |
| 362 | + |
233 | 363 | #### POST /api/public/subscription
|
234 | 364 |
|
235 | 365 | Create a public subscription, accepts both form encoded or JSON encoded body.
|
@@ -333,6 +463,32 @@ curl -u 'username:password' -X PUT 'http://localhost:9000/api/subscribers/9/bloc
|
333 | 463 |
|
334 | 464 | ______________________________________________________________________
|
335 | 465 |
|
| 466 | +#### PUT /api/subscribers/blocklist |
| 467 | + |
| 468 | +Blocklist multiple subscriber. |
| 469 | + |
| 470 | +##### Parameters |
| 471 | + |
| 472 | +| Name | Type | Required | Description | |
| 473 | +|:--------------|:----------|:---------|:-----------------| |
| 474 | +| ids | Number | Yes | Subscriber's ID. | |
| 475 | + |
| 476 | +##### Example Request |
| 477 | + |
| 478 | +```shell |
| 479 | +curl -u 'username:password' -X PUT 'http://localhost:8080/api/subscribers/blocklist' -H 'Content-Type: application/json' --data-raw '{"ids":[2,1]}' |
| 480 | +``` |
| 481 | + |
| 482 | +##### Example Response |
| 483 | + |
| 484 | +```json |
| 485 | +{ |
| 486 | + "data": true |
| 487 | +} |
| 488 | +``` |
| 489 | + |
| 490 | +______________________________________________________________________ |
| 491 | + |
336 | 492 | #### PUT /api/subscribers/query/blocklist
|
337 | 493 |
|
338 | 494 | Blocklist subscribers based on SQL expression.
|
@@ -382,6 +538,32 @@ curl -u 'username:password' -X DELETE 'http://localhost:9000/api/subscribers/9'
|
382 | 538 |
|
383 | 539 | ______________________________________________________________________
|
384 | 540 |
|
| 541 | +#### DELETE /api/subscribers/{subscriber_id}/bounces |
| 542 | + |
| 543 | +Delete a subscriber's bounce records |
| 544 | + |
| 545 | +##### Parameters |
| 546 | + |
| 547 | +| Name | Type | Required | Description | |
| 548 | +|:-----|:--------------|:---------|:---------------------------| |
| 549 | +| id | subscriber_id | Yes | Subscriber's ID. | |
| 550 | + |
| 551 | +##### Example Request |
| 552 | + |
| 553 | +```shell |
| 554 | +curl -u 'username:password' -X DELETE 'http://localhost:9000/api/subscribers/9/bounces' |
| 555 | +``` |
| 556 | + |
| 557 | +##### Example Response |
| 558 | + |
| 559 | +```json |
| 560 | +{ |
| 561 | + "data": true |
| 562 | +} |
| 563 | +``` |
| 564 | + |
| 565 | +______________________________________________________________________ |
| 566 | + |
385 | 567 | #### DELETE /api/subscribers
|
386 | 568 |
|
387 | 569 | Delete one or more subscribers.
|
|
0 commit comments