API
We are excited to announce that our users can now take advantage of the MailScheduler API as part of our API-first strategy. This allows for seamless integration and automated scheduling of emails.
Authenticate and get a session token. This session token can be used for further authentication of all other requests.
[email protected]Successful operation
Invalid input
POST /api/login HTTP/1.1
Host: localhost:8000
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 46
{
"email": "[email protected]",
"password": "text"
}{
"user": {
"id": "1",
"name": "John Doe",
"email": "[email protected]",
"email_verified_at": "null,",
"is_admin": true,
"created_at": "2023-10-03T08:16:46.000000Z",
"updated_at": "2023-11-20T13:58:04.000000Z"
},
"token": "8|RSX9LwIKpiXdiMr73KOG0gpoEtD8LrMRLuhQOF8u98cfe793"
}Multiple status values can be provided with comma separated strings
successful operation
GET /api/schedules HTTP/1.1
Host: localhost:8000
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
successful operation
[
{
"data": [
{
"id": 3,
"label": "Weekly schedule",
"admin_email": "[email protected]",
"testmode": true,
"is_active": true,
"created_at": "2024-01-01 09:10:00",
"updated_at": "2024-01-01 09:10:00",
"site_id": 2,
"start_on": "2024-01-01",
"end_on": "2024-12-31",
"notify_on_failure": false,
"tasks_count": 12,
"active_tasks_count": 10,
"upcoming": "2024-02-26 09:00:00",
"frequencyString": "Days of the week: MON -> Dailyat: 09:00",
"frequencies": "NA"
}
],
"current_page": 1,
"last_page": 5
}
]Schedule ID
1successfully retrieved task
Model not found
Server error
GET /api/schedules/{scheduleId}/tasks HTTP/1.1
Host: localhost:8000
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"recipient_count": 1,
"label": "Sales overview",
"filename": "Sales",
"subject": "Weekly update",
"mailinglists": [
"5",
"7"
],
"emails": [
{
"email": "[email protected]"
}
],
"send_type": "bcc",
"from_email": "text",
"from_name": "text",
"reply_to_email": "text",
"reply_to_name": "text",
"active": true,
"save": true,
"notify_on_failure": true,
"csv_delimiter": ",",
"csv_extension": "csv",
"views": [
{
"id": "text",
"label": "text",
"workbook_id": "text",
"view_id": "text",
"is_landscape": true,
"order": 1,
"export_types": 2,
"filters": [
{
"id": "temp-key-234",
"key": "Region",
"value": "North"
}
]
}
],
"templates": [
{
"id": 1,
"label": "company logo",
"position": "header-right",
"is_global": true,
"body": "Hi {name}, Please see the overview below...",
"img_id": 2,
"img_url": "https://website.com/images/company-logo.png",
"img_width": 200,
"img_height": 200,
"img_align": "right"
}
]
}Schedule ID
1A recognizable label for your reference
Sales overviewThe filename for the merged PDF.
SalesSubject of the email
Weekly update["5","7"][{"email":"[email protected]"}]Send the email with the following method
bccPossible values: Email address to use in the from email field. Note that you need permission with the authenticated email account to send an email with this email address.
Name from in the email
The reply to email address in the email
The reply to name in the email
When the task is active, it will be sent once the schedule is executed.
trueSave a copy of the PDF on your server
trueIn case a task would fail, all recipients will get a notification that we were not able to send the email. We are aware of the issue and are working on it. This way we prevent that everyone will notify you about the failed email.
trueThe delimiter to be used in your csv export
,The extension for the csv export
csvsuccessfully created task
Unprocessable Content
Server error
POST /api/schedules/{scheduleId}/tasks HTTP/1.1
Host: localhost:8000
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 784
{
"label": "Sales overview",
"filename": "Sales",
"subject": "Weekly update",
"mailinglists": [
"5",
"7"
],
"emails": [
{
"email": "[email protected]"
}
],
"send_type": "bcc",
"from_email": "text",
"from_name": "text",
"reply_to_email": "text",
"reply_to_name": "text",
"active": true,
"save": true,
"notify_on_failure": true,
"csv_delimiter": ",",
"csv_extension": "csv",
"views": [
{
"id": "text",
"label": "text",
"workbook_id": "text",
"view_id": "text",
"is_landscape": true,
"order": 1,
"export_types": 2,
"filters": [
{
"id": "temp-key-234",
"key": "Region",
"value": "North"
}
]
}
],
"templates": [
{
"id": 1,
"label": "company logo",
"position": "header-right",
"is_global": true,
"body": "Hi {name}, Please see the overview below...",
"img_id": 2,
"img_url": "https://website.com/images/company-logo.png",
"img_width": 200,
"img_height": 200,
"img_align": "right"
}
]
}{
"recipient_count": 1,
"label": "Sales overview",
"filename": "Sales",
"subject": "Weekly update",
"mailinglists": [
"5",
"7"
],
"emails": [
{
"email": "[email protected]"
}
],
"send_type": "bcc",
"from_email": "text",
"from_name": "text",
"reply_to_email": "text",
"reply_to_name": "text",
"active": true,
"save": true,
"notify_on_failure": true,
"csv_delimiter": ",",
"csv_extension": "csv",
"views": [
{
"id": "text",
"label": "text",
"workbook_id": "text",
"view_id": "text",
"is_landscape": true,
"order": 1,
"export_types": 2,
"filters": [
{
"id": "temp-key-234",
"key": "Region",
"value": "North"
}
]
}
],
"templates": [
{
"id": 1,
"label": "company logo",
"position": "header-right",
"is_global": true,
"body": "Hi {name}, Please see the overview below...",
"img_id": 2,
"img_url": "https://website.com/images/company-logo.png",
"img_width": 200,
"img_height": 200,
"img_align": "right"
}
]
}Schedule ID
1Task ID
1A recognizable label for your reference
Sales overviewThe filename for the merged PDF.
SalesSubject of the email
Weekly update["5","7"][{"email":"[email protected]"}]Send the email with the following method
bccPossible values: Email address to use in the from email field. Note that you need permission with the authenticated email account to send an email with this email address.
Name from in the email
The reply to email address in the email
The reply to name in the email
When the task is active, it will be sent once the schedule is executed.
trueSave a copy of the PDF on your server
trueIn case a task would fail, all recipients will get a notification that we were not able to send the email. We are aware of the issue and are working on it. This way we prevent that everyone will notify you about the failed email.
trueThe delimiter to be used in your csv export
,The extension for the csv export
csvsuccessfully updated
No content
Model not found
Unprocessable Content
Server error
PUT /api/schedules/{scheduleId}/tasks/{taskId} HTTP/1.1
Host: localhost:8000
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 784
{
"label": "Sales overview",
"filename": "Sales",
"subject": "Weekly update",
"mailinglists": [
"5",
"7"
],
"emails": [
{
"email": "[email protected]"
}
],
"send_type": "bcc",
"from_email": "text",
"from_name": "text",
"reply_to_email": "text",
"reply_to_name": "text",
"active": true,
"save": true,
"notify_on_failure": true,
"csv_delimiter": ",",
"csv_extension": "csv",
"views": [
{
"id": "text",
"label": "text",
"workbook_id": "text",
"view_id": "text",
"is_landscape": true,
"order": 1,
"export_types": 2,
"filters": [
{
"id": "temp-key-234",
"key": "Region",
"value": "North"
}
]
}
],
"templates": [
{
"id": 1,
"label": "company logo",
"position": "header-right",
"is_global": true,
"body": "Hi {name}, Please see the overview below...",
"img_id": 2,
"img_url": "https://website.com/images/company-logo.png",
"img_width": 200,
"img_height": 200,
"img_align": "right"
}
]
}No content
Schedule ID
1Task ID
1successfully deleted task
No content
Model not found
Server error
DELETE /api/schedules/{scheduleId}/tasks/{taskId} HTTP/1.1
Host: localhost:8000
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
No content
The label of the mailinglist
ManagersA description for the mailinglist
Managers from region WestCreate a new mailinglist
Mailinglist Response.
Unprocessable Content
Server error
POST /api/mailing-lists HTTP/1.1
Host: localhost:8000
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 72
{
"name": "Managers",
"description": "Managers from region West",
"sites": []
}No content
Mailinglist ID
1The label of the mailinglist
ManagersA description for the mailinglist
Managers from region WestUpdate a mailinglist
Mailinglist Response.
Model not found
Unprocessable Content
Server error
PUT /api/mailing-lists/{mailinglistId} HTTP/1.1
Host: localhost:8000
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 72
{
"name": "Managers",
"description": "Managers from region West",
"sites": []
}No content
Mailinglist ID
1successfully deleted mailinglist
No content
Model not found
Server error
DELETE /api/mailing-lists/{mailinglistId} HTTP/1.1
Host: localhost:8000
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
No content
Get all recipients
GET /api/recipients HTTP/1.1
Host: localhost:8000
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
Get all recipients
{
"data": [
{
"name": "John Doe",
"email": "[email protected]",
"filters": [
{
"id": "temp-key-234",
"key": "Region",
"value": "North"
}
],
"placeholders": [
{
"id": 1,
"key": "name",
"value": "John Doe"
}
],
"sites": [],
"mailinglists": [
5
],
"created_at": "2024-01-17T09:45:14.000000Z",
"updated_at": "2024-01-17T09:45:14.000000Z"
}
],
"current_page": 1,
"last_page": 5
}Name of the recipient. Primarely used for your reference, but acts as a fallback when you use the "name" placeholder
John Doe5Store a new recipient
Unprocessable Content
Server error
POST /api/recipients HTTP/1.1
Host: localhost:8000
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 199
{
"name": "John Doe",
"email": "[email protected]",
"filters": [
{
"id": "temp-key-234",
"key": "Region",
"value": "North"
}
],
"placeholders": [
{
"id": 1,
"key": "name",
"value": "John Doe"
}
],
"sites": [],
"mailinglists": [
5
]
}{
"name": "John Doe",
"email": "[email protected]",
"filters": [
{
"id": "temp-key-234",
"key": "Region",
"value": "North"
}
],
"placeholders": [
{
"id": 1,
"key": "name",
"value": "John Doe"
}
],
"sites": [],
"mailinglists": [
5
],
"created_at": "2024-01-17T09:45:14.000000Z",
"updated_at": "2024-01-17T09:45:14.000000Z"
}Recipient ID
1Name of the recipient. Primarely used for your reference, but acts as a fallback when you use the "name" placeholder
John Doe5successfully updated recipient
No content
Model not found
Unprocessable Content
Server error
PUT /api/recipients/{recipientId} HTTP/1.1
Host: localhost:8000
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 199
{
"name": "John Doe",
"email": "[email protected]",
"filters": [
{
"id": "temp-key-234",
"key": "Region",
"value": "North"
}
],
"placeholders": [
{
"id": 1,
"key": "name",
"value": "John Doe"
}
],
"sites": [],
"mailinglists": [
5
]
}No content
Recipient ID
1successfully deleted recipient
No content
Unprocessable Content
Server error
DELETE /api/recipients/{recipientId} HTTP/1.1
Host: localhost:8000
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
No content
Get all sites
GET /api/sites HTTP/1.1
Host: localhost:8000
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
Get all sites
[
{
"id": "text",
"label": "text",
"site_name": "companyname",
"token_id": "1",
"server_id": 1
}
]Site ID, required to access Tableau
1The name of the workbook
MyWorkbookGet back the workbook ID from Tableau
POST /api/tableau/get-workbook-id/{siteId} HTTP/1.1
Host: localhost:8000
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 21
{
"name": "MyWorkbook"
}Get back the workbook ID from Tableau
{
"workbookd_id": "3a051b9c-e21a-4a77-b809-6d2d0a9f2305"
}Site ID, required to access Tableau
1The name of the Dashboard or view
MyDashboardNameGet back the view ID from Tableau
POST /api/tableau/get-view-id/{siteId} HTTP/1.1
Host: localhost:8000
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 26
{
"name": "MyDashboardName"
}Get back the view ID from Tableau
{
"view_id": "3a051b9c-e21a-4a77-b809-6d2d0a9f2305"
}