Subscription
This section shows the available routes related to subscriptions of AcyMailing users to lists.
Get a user's subscriptions
GET
https://www.example.com/index.php?page=acymailing_front&option=com_acym&ctrl=api&task=getUserSubscriptionById
The subscription status will be returned for subscribed and unsubscribed lists.
Query Parameters
{
"message": "User ID not provided in the query parameters."
}
[
{
"1": {
"id": "1",
"translation": "",
"name": "Newsletters",
"display_name": null,
"color": "#3366ff",
"active": "1",
"visible": "1",
"description": "",
"status": "1",
"subscription_date": "2023-07-21 09:17:06",
"unsubscribe_date": null
},
"17": {
"id": "17",
"translation": "",
"name": "N",
"display_name": "",
"color": "#5f702b",
"active": "1",
"visible": "1",
"description": "",
"status": "0",
"subscription_date": "2024-01-16 10:58:05",
"unsubscribe_date": "2024-01-16 16:27:13"
},
"19": {
"id": "19",
"translation": "",
"name": "Testing list",
"display_name": null,
"color": "#94d4a6",
"active": "1",
"visible": "0",
"description": "",
"status": "1",
"subscription_date": "2024-01-15 09:52:10",
"unsubscribe_date": null
}
}
]
Get subscribers of lists
GET
https://www.example.com/index.php?page=acymailing_front&option=com_acym&ctrl=api&task=getSubscribersFromLists
Returns the subscribers of specific lists
Query Parameters
[
[
{
"email": "address@example.com",
"name": "My name",
"id": "1",
"confirmed": "1",
"status": "1",
"subscription_date": "2023-07-21 09:17:06"
},
{
"email": "address2@example.com",
"name": "acytest",
"id": "2",
"confirmed": "1",
"status": "1",
"subscription_date": "2023-07-24 08:26:26"
}
]
]
{
"message": "List IDs not provided in the query parameters."
}
Get unsubscribed users of lists
GET
https://www.example.com/index.php?page=acymailing_front&option=com_acym&ctrl=api&task=getUnsubscribedUsersFromLists
Returns the AcyMailing users unsubscribed from specific lists
Query Parameters
[
[
{
"email": "address@example.com",
"name": "My name",
"id": "4",
"confirmed": "1",
"status": "0",
"subscription_date": "2023-10-04 09:54:43"
},
{
"email": "address2@example.com",
"name": "acytest",
"id": "9",
"confirmed": "1",
"status": "0",
"subscription_date": "2023-12-18 08:35:02"
}
]
]
{
"message": "List IDs not provided in the query parameters."
}
Subscribe users to lists
POST
https://www.example.com/index.php?page=acymailing_front&option=com_acym&ctrl=api&task=subscribeUsers
Subscribe a list of users to one or more lists
Request Body
{
"message": "Emails not provided in the request body."
}
{
"message": "List IDs not provided in the request body."
}
{
"message": "Users subscribed."
}
When this happens, it will correctly subscribe the found users and return the list of users not found.
{
"message": "Could not find some users.",
"errors": [
"test@example.com"
]
}
Unsubscribe users from lists
POST
https://www.example.com/index.php?page=acymailing_front&option=com_acym&ctrl=api&task=unsubscribeUsers
Unsubscribe a list of users from one or more lists
Request Body
{
"message": "Users unsubscribed."
}
{
"message": "Could not find some users.",
"errors": [
"test@example.com"
]
}
{
"message": "Emails not provided in the request body."
}
{
"message": "List IDs not provided in the request body."
}
Last updated