Lists
Create and manage mailing lists and their members.
|
Endpoints
| GET | /api/v1/mail/lists | List mailing lists |
| POST | /api/v1/mail/lists | Create a list |
| GET | /api/v1/mail/lists/{id} | Get a list |
| DELETE | /api/v1/mail/lists/{id} | Delete a list |
| GET | /api/v1/mail/lists/{id}/members | List members of a list |
| POST | /api/v1/mail/lists/{id}/members | Add a member to a list |
| DELETE | /api/v1/mail/lists/{id}/members/{contactId} | Remove a member from a list |
GET
/api/v1/mail/listsList mailing lists
Authentication required— Include session cookie or Bearer token
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
search | string | Optional | Search by list name |
limit | integer | Optional | Number of items to return (default: 20, max: 100) |
offset | integer | Optional | Offset for pagination (default: 0) |
Code Examples
curl "https://api.blueai.jp/api/v1/mail/lists" \
-H "Cookie: better-auth.session_token=<token>"POST
/api/v1/mail/listsCreate a list
Authentication required— Include session cookie or Bearer token
Request Body
| Name | Type | Required | Description |
|---|---|---|---|
name | string | Required | List name |
description | string | Optional | Description |
Code Examples
curl -X POST "https://api.blueai.jp/api/v1/mail/lists" \
-H "Cookie: better-auth.session_token=<token>"GET
/api/v1/mail/lists/{id}Get a list
Authentication required— Include session cookie or Bearer token
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Optional | List ID |
Code Examples
curl "https://api.blueai.jp/api/v1/mail/lists/list_123e4567e89b12d3a456426614174000" \
-H "Cookie: better-auth.session_token=<token>"DELETE
/api/v1/mail/lists/{id}Delete a list
Authentication required— Include session cookie or Bearer token
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Optional | List ID |
Code Examples
curl -X DELETE "https://api.blueai.jp/api/v1/mail/lists/list_123e4567e89b12d3a456426614174000" \
-H "Cookie: better-auth.session_token=<token>"GET
/api/v1/mail/lists/{id}/membersList members of a list
Authentication required— Include session cookie or Bearer token
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Optional | List ID |
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
limit | integer | Optional | Number of items to return (default: 20, max: 100) |
offset | integer | Optional | Offset for pagination (default: 0) |
Code Examples
curl "https://api.blueai.jp/api/v1/mail/lists/list_123e4567e89b12d3a456426614174000/members" \
-H "Cookie: better-auth.session_token=<token>"POST
/api/v1/mail/lists/{id}/membersAdd a member to a list
Authentication required— Include session cookie or Bearer token
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Optional | List ID |
Request Body
| Name | Type | Required | Description |
|---|---|---|---|
contact_id | string | Required | Contact ID |
Code Examples
curl -X POST "https://api.blueai.jp/api/v1/mail/lists/list_123e4567e89b12d3a456426614174000/members" \
-H "Cookie: better-auth.session_token=<token>"DELETE
/api/v1/mail/lists/{id}/members/{contactId}Remove a member from a list
Authentication required— Include session cookie or Bearer token
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Optional | List ID |
contactId | string | Optional | Contact ID |
Code Examples
curl -X DELETE "https://api.blueai.jp/api/v1/mail/lists/list_123e4567e89b12d3a456426614174000/members/cont_123e4567e89b12d3a456426614174000" \
-H "Cookie: better-auth.session_token=<token>"