Mailman 3 rest api documentation
Mailman 3 is a popular open-source mailing list manager, and its REST API provides a way to interact with the system programmatically. Here is the official documentation for the Mailman 3 REST API:
Overview
The Mailman 3 REST API is a JSON-based API that provides access to the Mailman 3 system. It allows you to create, read, update, and delete (CRUD) mailing lists, members, and other resources.
API Endpoints
The Mailman 3 REST API has several endpoints that you can use to interact with the system. Here are some of the most commonly used endpoints:
- /lists: Returns a list of all mailing lists.
- /lists/{list_name}: Returns information about a specific mailing list.
- /lists/{list_name}/members: Returns a list of members for a specific mailing list.
- /lists/{list_name}/members/{member_email}: Returns information about a specific member of a mailing list.
- /lists/{list_name}/posts: Returns a list of posts for a specific mailing list.
- /lists/{list_name}/posts/{post_id}: Returns information about a specific post in a mailing list.
- /lists/{list_name}/topics: Returns a list of topics for a specific mailing list.
- /lists/{list_name}/topics/{topic_id}: Returns information about a specific topic in a mailing list.
API Methods
The Mailman 3 REST API supports several HTTP methods, including:
- GET: Used to retrieve information about a resource.
- POST: Used to create a new resource.
- PUT: Used to update an existing resource.
- DELETE: Used to delete a resource.
API Parameters
The Mailman 3 REST API supports several parameters that you can use to filter or sort the results of a query. Here are some of the most commonly used parameters:
- page: Used to specify the page number of the results.
- per_page: Used to specify the number of results per page.
- sort: Used to specify the field to sort the results by.
- order: Used to specify the order of the results (ascending or descending).
API Authentication
The Mailman 3 REST API uses HTTP Basic Authentication to authenticate requests. You can use a username and password to authenticate with the API.
API Rate Limiting
The Mailman 3 REST API has rate limiting in place to prevent abuse. The rate limit is 100 requests per minute per IP address.
API Documentation
The official Mailman 3 REST API documentation is available at https://docs.mailman3.org/en/latest/api.html.
Example Requests
Here are some example requests that you can use to interact with the Mailman 3 REST API:
- GET /lists:
curl -u username:password http://localhost:8001/lists
- GET /lists/mylist/members:
curl -u username:password http://localhost:8001/lists/mylist/members
- POST /lists/mylist/members:
curl -u username:password -X POST -H "Content-Type: application/json" -d '{"email": "[email protected]"}' http://localhost:8001/lists/mylist/members