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]
POST /api/login HTTP/1.1
Host: localhost:8000
Authorization: Bearer JWT
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
GET /api/schedules HTTP/1.1
Host: localhost:8000
Authorization: Bearer JWT
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
1
GET /api/schedules/{scheduleId}/tasks HTTP/1.1
Host: localhost:8000
Authorization: Bearer JWT
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
1
A recognizable label for your reference
Sales overview
The filename for the merged PDF.
Sales
Subject of the email
Weekly update
["5","7"]
[{"email":"[email protected]"}]
Send the email with the following method
bcc
Possible 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.
true
Save a copy of the PDF on your server
true
In 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.
true
The delimiter to be used in your csv export
,
The extension for the csv export
csv
POST /api/schedules/{scheduleId}/tasks HTTP/1.1
Host: localhost:8000
Authorization: Bearer JWT
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
1
Task ID
1
A recognizable label for your reference
Sales overview
The filename for the merged PDF.
Sales
Subject of the email
Weekly update
["5","7"]
[{"email":"[email protected]"}]
Send the email with the following method
bcc
Possible 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.
true
Save a copy of the PDF on your server
true
In 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.
true
The delimiter to be used in your csv export
,
The extension for the csv export
csv
PUT /api/schedules/{scheduleId}/tasks/{taskId} HTTP/1.1
Host: localhost:8000
Authorization: Bearer JWT
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
1
Task ID
1
DELETE /api/schedules/{scheduleId}/tasks/{taskId} HTTP/1.1
Host: localhost:8000
Authorization: Bearer JWT
Accept: */*
No content
The label of the mailinglist
Managers
A description for the mailinglist
Managers from region West
Mailinglist Response.
POST /api/mailing-lists HTTP/1.1
Host: localhost:8000
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 72
{
"name": "Managers",
"description": "Managers from region West",
"sites": []
}
No content
Mailinglist ID
1
The label of the mailinglist
Managers
A description for the mailinglist
Managers from region West
Mailinglist Response.
PUT /api/mailing-lists/{mailinglistId} HTTP/1.1
Host: localhost:8000
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 72
{
"name": "Managers",
"description": "Managers from region West",
"sites": []
}
No content
Mailinglist ID
1
DELETE /api/mailing-lists/{mailinglistId} HTTP/1.1
Host: localhost:8000
Authorization: Bearer JWT
Accept: */*
No content
GET /api/recipients HTTP/1.1
Host: localhost:8000
Authorization: Bearer JWT
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 Doe
5
POST /api/recipients HTTP/1.1
Host: localhost:8000
Authorization: Bearer JWT
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
1
Name of the recipient. Primarely used for your reference, but acts as a fallback when you use the "name" placeholder
John Doe
5
PUT /api/recipients/{recipientId} HTTP/1.1
Host: localhost:8000
Authorization: Bearer JWT
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
1
DELETE /api/recipients/{recipientId} HTTP/1.1
Host: localhost:8000
Authorization: Bearer JWT
Accept: */*
No content
GET /api/sites HTTP/1.1
Host: localhost:8000
Authorization: Bearer JWT
Accept: */*
Get all sites
[
{
"id": "text",
"label": "text",
"site_name": "companyname",
"token_id": "1",
"server_id": 1
}
]
Site ID, required to access Tableau
1
The name of the workbook
MyWorkbook
POST /api/tableau/get-workbook-id/{siteId} HTTP/1.1
Host: localhost:8000
Authorization: Bearer JWT
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
1
The name of the Dashboard or view
MyDashboardName
POST /api/tableau/get-view-id/{siteId} HTTP/1.1
Host: localhost:8000
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 26
{
"name": "MyDashboardName"
}
Get back the view ID from Tableau
{
"view_id": "3a051b9c-e21a-4a77-b809-6d2d0a9f2305"
}
Last updated
Was this helpful?