Direct URL Method

This tool is a customizable link that can be used to create an event on-the-fly, or send your users to their calendar service where they can add your event, or attach your event to an email you send to your users, or create a short link to an event which you can use in media like SMS/TEXT. Read more

Essentially we’re doing our best to go overboard on the number of ways you can get your events in front of your users. Specifically on their calendars. Because that’s what we do.

Use it in newsletters, as event attachments in newsletters, in web apps, SMS/TEXT, on websites or in mobile/tablet development.

Please notice: The API examples below and on this page requires a client ID to work.
Please sign in or create an account to use your accounts API client ID.

  • Create an "Add to Calendar" link in e.g. newsletters. The link redirects your user to an event page.
    Add event to your calendar
  • Create an "Add to Calendar" link in e.g. newsletters. The link redirects to the specified service.
    Add event to your calendar:
    Apple  •  Google  •  Outlook  •  Outlook.com  •  Yahoo
  • Attach an event file in e.g. newsletters/reminders using your existing Mail API. See example below for details.
  • Create a short-link event to use in messages with limited character length e.g. SMS/TEXT messages.

Create an event on-the-fly (endpoint: event page)

Creates an event on-the-fly. The users end up on an event page.

https://www.addevent.com/dir/?client=CLIENT&start=start&end=end&title=title&timezone=timezone
									
https://www.addevent.com/dir/?client=USER-CLIENT-ID&start=09%2F02%2F2018+09%3A00+AM&end=09%2F02%2F2018+11%3A00+AM&title=Title+of+the+event&description=Description+of+the+event&location=1600+Amphitheatre+Pkwy%2C+Mountain+View%2C+CA+94043&timezone=America%2FLos_Angeles 
										

Create an event on-the-fly (endpoint: calendar service)

Creates an event on-the-fly. Downloads an event file or redirects the user to the calendar client.

https://www.addevent.com/dir/?client=CLIENT&start=start&end=end&title=title&timezone=timezone&service=service
									
https://www.addevent.com/dir/?client=USER-CLIENT-ID&start=09%2F02%2F2018+09%3A00+AM&end=09%2F02%2F2018+11%3A00+AM&title=Title+of+the+event&description=Description+of+the+event&location=1600+Amphitheatre+Pkwy%2C+Mountain+View%2C+CA+94043&timezone=America%2FLos_Angeles&service=google
										

Attach an event in newsletters

If you send emails using a Mail API or your own code you can attach an event in an email.
In the example you'll find an example on how to attach an event using the Mandrill Mail API.

https://www.addevent.com/dir/?client=CLIENT&start=start&end=end&title=title&description=description&timezone=timezone&service=stream
									
// Get event file for attachment
										$attachment = file_get_contents('https://www.addevent.com/dir/?
										client=USER-CLIENT-ID&start=09%2F02%2F2018+09%3A00+AM&
										end=09%2F02%2F2018+11%3A00+AM&title=Title+of+the+event&
										description=Description+of+the+event&timezone=America%2FLos_Angeles&
										service=stream');

										// Base 64 encode the event file
										$attachment_encoded = base64_encode($attachment);

										// Set message object
										$compose = array(
										   'html' => 'Email content',
										   'subject' => 'Email subject',
										   'from_email' => 'from@example.com',
										   'to' => array(
										       array(
										           'email' => 'to@example.com'
										       )
										   ),
										   'attachments' => array(
										       array(
										           'content' => $attachment_encoded,
										           'type' => 'text/calendar',
										           'name' => 'event.ics',
										       )
										   )
										);

										// Send
										$response = $mandrill->messages->send($compose);
										

Create a short-link event (for SMS/TEXT messages)

The purpose of this method is to store event details in our event database and generate a short-link to the event which you can use in media that can only contain a limited number of characters like SMS/TEXT messages. Consider this method to be an URL shortener/container for your "Direct URL Method" parameters.

When you create a short-link event, the event details will be accessible via a short URL, e.g. http://evt.to/a and when your users click the link all of the details you've saved in the event will be used using the "Direct URL Method". The short-link event can contain all the parameters listed in the "Parameters" section.

All data is stored as-is and not validated by entry so please make sure that the event details you are entering are correct. By following the URL to the event, the event will be validated by the "Direct URL Method".

Create a short-link event

Create an event using cURL and get a short-link to the event in return (JSON). The ID of the event is the "uniquekey" which after creation can be used to view details about the event or edit/delete it.

$ curl https://www.addevent.com/dir/link/add/?client=CLIENT&start=start&end=end&title=title&timezone=timezone
									
// Event data
											$data = array(
											   "client" => "USER-CLIENT-ID", 
											   "start" => "09/02/2018 09:00 AM",
											   "end" => "09/02/2018 11:00 AM",
											   "title" => "Title of the event",
											   "description" => "Description of the event",
											   "location" => "1600 Amphitheatre Pkwy, Mountain View, CA 94043",
											   "alarm" => "60",
											   "timezone" => "America/Los_Angeles"
											);

											// URL
											$url = "https://www.addevent.com/dir/link/add/?" . http_build_query($data);

											// Create event, get JSON in return
											$json = file_get_contents($url);

											// Or by using cURL
											// $curl = curl_init(); 
											// curl_setopt($curl,CURLOPT_URL, $url);
											// curl_setopt($curl,CURLOPT_RETURNTRANSFER, true);
											// curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
											// $json = curl_exec($curl);
											// curl_close($curl);

											// Decode
											$json_obj = json_decode($json);

											// OK?
											if($json_obj->meta->code == '200'){

											   // Get link
											   $link = $json_obj->data->link;

											   // Out
											   echo 'Event link -> ' . $link;

											}
										
{
											   "meta": {
											      "code": "200"
											   },
											   "data": {
											      "action": "add",
											      "link": "http:\/\/evt.to\/a",
											      "uniquekey": "a",
											      "status": "added"
											   }
											}
										

Get a short-link event

Get a short-link event using cURL and view detailed information about the event in return (JSON).

$ curl https://www.addevent.com/dir/link/get/?client=CLIENT&uniquekey=uniquekey
									
// Event data
											$data = array(
											   "client" => "USER-CLIENT-ID", 
											   "uniquekey" => "a"
											);

											// URL
											$url = "https://www.addevent.com/dir/link/get/?" . http_build_query($data);

											// Create event, get JSON in return
											$json = file_get_contents($url);

											// Or by using cURL
											// $curl = curl_init(); 
											// curl_setopt($curl,CURLOPT_URL, $url);
											// curl_setopt($curl,CURLOPT_RETURNTRANSFER, true);
											// curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
											// $json = curl_exec($curl);
											// curl_close($curl);

											// Decode
											$json_obj = json_decode($json);

											// OK?
											if($json_obj->meta->code == '200'){

											   // Get link
											   $link = $json_obj->data->link;

											   // Out
											   echo 'Event link -> ' . $link;

											}
										
{
											   "meta": {
											      "code": "200"
											   },
											   "data": {
											      "client": "USER-CLIENT-ID",
											      "start": "11\/22\/2018 09:00 AM",
											      "end": "11\/22\/2018 11:00 AM",
											      "duration": "",
											      "title": "Title of the event",
											      "description": "Description of the event",
											      "location": "1600 Amphitheatre Pkwy, Mountain View, CA 94043",
											      "organizer": "",
											      "organizer_email": "",
											      "all_day_event": "",
											      "date_format": "",
											      "timezone": "America\/Los_Angeles",
											      "reference": "",
											      "service": "",
											      "template": "",
											      "alarm": "",
											      "recurring": "",
											      "calname": "",
											      "uid": "",
											      "status": "",
											      "method": "",
											      "link": "http:\/\/evt.to\/a",
											      "clicks": "2",
											      "created": "2018-11-08 22:33:44 (UTC)",
											      "modified": "2018-11-09 21:41:59 (UTC)"
											   }
											}
										

Save a short-link event

Edit the details in a short-link event using cURL.

$ curl https://www.addevent.com/dir/link/save/?client=CLIENT&uniquekey=UNIQUEKEY&start=start&end=end&title=title&timezone=timezone
									
// Event data
											$data = array(
											   "client" => "USER-CLIENT-ID", 
											   "uniquekey" => "a", 
											   "start" => "09/02/2018 09:00 AM",
											   "end" => "09/02/2018 11:00 AM",
											   "title" => "Title of the event",
											   "description" => "Description of the event",
											   "location" => "1600 Amphitheatre Pkwy, Mountain View, CA 94043",
											   "alarm" => "60",
											   "timezone" => "America/Los_Angeles"
											);

											// URL
											$url = "https://www.addevent.com/dir/link/save/?" . http_build_query($data);

											// Create event, get JSON in return
											$json = file_get_contents($url);

											// Or by using cURL
											// $curl = curl_init(); 
											// curl_setopt($curl,CURLOPT_URL, $url);
											// curl_setopt($curl,CURLOPT_RETURNTRANSFER, true);
											// curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
											// $json = curl_exec($curl);
											// curl_close($curl);

											// Decode
											$json_obj = json_decode($json);

											// OK?
											if($json_obj->meta->code == '200'){

											   // Get status
											   $status = $json_obj->data->status;

											   // Out
											   echo 'Status -> ' . $status;

											}
										
{
											   "meta": {
											      "code": "200"
											   },
											   "data": {
											      "action": "save",
											      "link": "http:\/\/evt.to\/a",
											      "uniquekey": "a",
											      "status": "saved"
											   }
											}
										

Delete a short-link event

Delete a short-link event using cURL.

$ curl https://www.addevent.com/dir/link/delete/?client=CLIENT&uniquekey=UNIQUEKEY
									
// Event data
											$data = array(
											   "client" => "USER-CLIENT-ID", 
											   "uniquekey" => "a"
											);

											// URL
											$url = "https://www.addevent.com/dir/link/delete/?" . http_build_query($data);

											// Create event, get JSON in return
											$json = file_get_contents($url);

											// Or by using cURL
											// $curl = curl_init(); 
											// curl_setopt($curl,CURLOPT_URL, $url);
											// curl_setopt($curl,CURLOPT_RETURNTRANSFER, true);
											// curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
											// $json = curl_exec($curl);
											// curl_close($curl);

											// Decode
											$json_obj = json_decode($json);

											// OK?
											if($json_obj->meta->code == '200'){

											   // Get status
											   $status = $json_obj->data->status;

											   // Out
											   echo 'Status -> ' . $status;

											}
										
{
											   "meta": {
											      "code": "200"
											   },
											   "data": {
											      "action": "delete",
											      "link": "",
											      "uniquekey": "",
											      "status": "deleted"
											   }
											}
										
Parameter
Description
client
Required

Account client ID. The account client ID is available in the Account section and is incorporated in all code examples on this page.
start
Required

Start date of the event. Accepts most date/time formats, e.g. 08/19/2018 03:00 PM (12-hour format) or 19-08-2018 15:00 (24-hour format).

Use numeric values to describe the date, e.g. "09/02/2018" and not textual, e.g. "September 2nd, 2018".

Dates in the m/d/y or d-m-y formats are disambiguated by looking at the separator between the various components: if the separator is a slash (/), then the American m/d/y is assumed; whereas if the separator is a dash (-) or a dot (.), then the European d-m-y format is assumed. If, however, the year is given in a two digit format and the separator is a dash (-, the date string is parsed as y-m-d. To avoid potential ambiguity, it's best to use ISO 8601 (YYYY-MM-DD) dates

Date examples:
08/19/2018 03:00 PM or 19-08-2018 15:00 or 2018/08/19 03:00 PM or 2018-08-19 15:00
end
End date of the event. Accepts most date/time formats, e.g. 08/19/2018 05:00 PM (12-hour format) or 19-08-2018 17:00 (24-hour format).

Use numeric values to describe the date, e.g. "09/02/2018" and not textual, e.g. "September 2nd, 2018".

Dates in the m/d/y or d-m-y formats are disambiguated by looking at the separator between the various components: if the separator is a slash (/), then the American m/d/y is assumed; whereas if the separator is a dash (-) or a dot (.), then the European d-m-y format is assumed. If, however, the year is given in a two digit format and the separator is a dash (-, the date string is parsed as y-m-d. To avoid potential ambiguity, it's best to use ISO 8601 (YYYY-MM-DD) dates

Date examples:
08/19/2018 05:00 PM or 19-08-2018 17:00 or 2018/08/19 05:00 PM or 2018-08-19 17:00

If end is not defined, the end date is automatically set to start date plus one hour.
duration
Duration of the event in minutes, e.g. "30". Ignores the end date if set and adds the minutes to the start date.
title
Required

Title of the event. Single line string.
description
Description of the event. Use <br> or \n to separate lines.

The field accepts plain text or simplified HTML. Simplified HTML is supported by calendar clients like Outlook and Apple Calendar. If the calendar client does accept HTML, the content of the field is automatically converted into readable text.

Keep the description short and to the point. Link to a website for further details if the event description is long. Maximum 500 characters recommended.

Reason: Most modern browsers allow an unlimited number of characters to be transferred by the browser. Internet Explorer / Edge only allows ~2000 characters. A 500 characters maximum is recommended to make sure your event is cross browser compatible.
location
Event location, eg. "Eiffel Tower, Paris".
organizer
Event organizer, e.g. "John Johnson".

If you fill out organizer you must also include the organizer_email field.

If you include an organizer and an organizer_email, the event is considered to be a "meeting" by calendar clients like Outlook. If you don't include the fields, the event is considered to be an "appointment".
organizer_email
Event organizer e-mail, e.g. "your@email.com".

If you fill out organizer_email you must also include the organizer field.

If you include an organizer and an organizer_email, the event is considered to be a "meeting" by calendar clients like Outlook. If you don't include the fields, the event is considered to be an "appointment".
all_day_event
All day event. Accepts true or false.
date_format
The format of the date in start and end. Accepts the values MM/DD/YYYY or DD/MM/YYYY only. Lets the engine know how to handle the date, e.g. 12-hour format (MM/DD/YYYY) or 24-hour format (DD/MM/YYYY).

The date_format used to be mandatory but is optional today.
timezone
The events time zone, e.g. Europe/Paris or America/Los_Angeles.

If timezone is applied (recommended), date/time will be converted to Zulu time / GMT / UTC. If timezone is not applied, date/time will be parsed as is (fluid date/time).

Explanation: The timezone parameter makes sure the date/time is correct no matter if you are in New York or Sydney. If your event has users from multiple time zones in the world, it's highly recommended to use the parameter.
reference
Value to keep track of events. Used for statistics. E.g. "iPhone" or "Newsletter Oct 2016" or URL reference.
service
Accepts: apple or google or outlook or outlookcom or yahoo or stream.

If a service is specified, e.g. "apple" the event will be downloaded immediately to the users computer/device. If service isn't defined, the user will be redirected to an event page. Example: https://www.addevent.com/event/?db52444.

Use the value stream if you want to attach event files in your existing Mail API.
template
Id of a "Custom Event Page" template, e.g. "lm2015e14o720j11". Uses the "AddEvent default" template if template is not defined.
In order to create/access custom templates please go to "Events" -> "New Event" and save it. Then scroll down the page and click the "Custom template" button. With "Custom templates" you can edit all HTML of the event page, change date formats (e.g. 24-hour clock) etc.
alarm
Event reminder. Trigger an event reminder e.g. "15" minutes before the event starts.
Accepted input: Number

Example: Reminder "15" minutes before event starts = 15 or
one day before event starts : 60 minutes x 24 hours = 1440.

Event reminders are currently supported by:
- Apple Calendar
- Google Calendar
- Outlook
recurring
Make the event repeat for a number of times.

Recurring rules are advanced and needs to be tested before you publish it. Generate your recurring rules with tools like TextMagic RRule Generator. Then make sure they work in calendar clients like Outlook and Apple Calendar.

Recurring rules are currently supported by:
- Apple Calendar
- Google Calendar
- Outlook
- Outlook.com

Please notice: Recurring events in Google Calendar + Outlook.com are only supported when using the Google Events API + Outlook.com Events API (default method used by AddEvent). If you have opted out using the Google API or Outlook.com API recurring rules will not work.

If you want multiple events to be supported by all calendar vendors we recommend that you use the subscription calendar.
calname
Custom filenaming of the .ics file used for e.g. Outlook and Apple Calendar. If not defined the name defaults to "event.ics". Use the phrase use-title to use the title from the title parameter or enter a custom filename.
uid
Define your own UID for the event. If not defined, a system UID is generated. Please notice; Yahoo Calendar reports error 404 if an UID is defined. We therefore don't include UID's in Yahoo Calendar.

Warning. Use this option only if it serves a purpose in your coding.
status
Define the status parameter in the .ics file used for e.g. Outlook and Apple Calendar. The options can be CONFIRMED, TENTATIVE, CANCELLED, NEEDS-ACTION, COMPLETED, IN-PROCESS according to the iCalendar guidelines.
If the value is not defined (recommended), the system defaults to "CONFIRMED".

Warning. Use this option only if it serves a purpose in your coding.
method
If defined, a method parameter is added in the .ics file used by e.g. Outlook and Apple Calendar. If not defined, no method parameter is added in the .ics file. http://www.kanzaki.com/docs/ical/method.html + https://tools.ietf.org/html/rfc2446

Examples of usage:
PUBLISH, REQUEST, CANCEL, "REFRESH".

Warning. Use this option only if it serves a purpose in your coding.
transp
<span class="transp">TRANSPARENT</span>

Determines whether the event appears as "free" or "busy" on the users calendar. Default value is OPAQUE (busy).

Accepted values:
TRANSPARENT or OPAQUE.