Public API
API Base
All the API endpoints described in this article are relative to the base URL:
https://api.mailtimer.io
Authentication
To access the API, you will need the API key that you will find in your account:
This API key should be included in the X-API-Key
HTTP header.
Unauthenticated responses will return in a HTTP 401 Unauthorized
code.
Here's a request example using cURL:
curl -X GET https://api.mailtimer.io/users/me/ -H "X-API-Key: <YOUR_API_KEY>"
Manage Timers
List timers
GET /timers
Parameters:
- page (number)
Get timer
GET /timers/<timer_id>
Clone (duplicate) timer
POST /timers/<timer_id>/clone
Delete timer
DELETE /timers/<timer_id>
Update timer
POST /timers/<timer_id>
Parameters:
- name (string)
- is_enabled (boolean)
- template (number): timer template id [1..9]
- type (string): standard | eg1 (start when email is opened) | eg2 (start when email is sent) | dynamic
- ts_end (string): format "YYYYMMDD HHmm"
- show_d, show_h, show_m, show_s (boolean): show/hide days, hours, minutes, seconds
- bg_color (string): background HEX color. Empty for transparent background
- matte_color (string): matte HEX color (only for transparent background)
- bg_url (string): background image URL
- tz (string): timezone (example: Europe/Berlin), list
- rounded_corners
- is_enabled (boolean)
- radius (number): [0..100]
- links
- is_enabled (boolean)
- url_active (string)
- url_expired (string)
- expire
- mode (number): 0-hide timer, 1-show zeros, 2-show message, 3-reset and restart
- msg_line1 (string): only for "show message" mode
- title
- show (boolean): show or hide the title
- text (string)
- font_size (number)
- color (string): title color in HEX format
- dividers
- show (boolean): show or hide the dividers
- color (string): dividers color in HEX format
- labels
- font_size (number)
- color (string): labels color in HEX format
- label_d (string): custom label for 'Days'
- label_h (string): custom label for 'Hours'
- label_m (string): custom label for 'Minutes'
- label_s (string): custom label for 'Seconds'
- counter
- font_size (number)
- color (string): counter color in HEX format
- has_lead_zeros (boolean)
- bg_color (string): background color in HEX format
Create timer
POST /timers
Parameters: same as for update timer endpoint.