Direct URL Method

This method creates an event on-the-fly. It's a simple link with parameters usable for many purposes.

  • 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:
    AppleGoogleOutlookOutlook.comYahoo
  • Attach an event file in e.g. newsletters/reminders using your existing Mail API. See example below for details.

Please notice:
All values must be URL encoded.

Recommended usage:
Websites, mobile, tablets, SDK's, newsletters

Example

https://www.addevent.com/dir/ ?client=
&start=
&end=
&title=
&date_format=
&timezone=
https://www.addevent.com/dir/ ?client=
&start=09%2F26%2F2017+09%3A00+AM
&end=09%2F26%2F2017+11%3A00+AM
&title=Headline+of+the+event
&date_format=MM%2FDD%2FYYYY
&timezone=Europe%2FParis
https://www.addevent.com/dir/ ?client=
&start=
&end=
&title=
&description=
&location=
&organizer=
&organizer_email=
&all_day_event=
&date_format=
&timezone=
&reference=
&service=
&template=
&alarm=
&recurring=
&calname=
&uid=
&status=
&method=
https://www.addevent.com/dir/ ?client=
&start=09%2F26%2F2017+09%3A00+AM
&end=09%2F26%2F2017+11%3A00+AM
&title=Headline+of+the+event
&description=Description+of+the+event
&location=Eiffel+Tower%2C+Champ+de+Mars%2C+5+Anatole+France+Avenue%2C+75007+Paris%2C+France
&organizer=Your+Organization
&organizer_email=your%40email.com
&all_day_event=false
&date_format=MM%2FDD%2FYYYY
&timezone=Europe%2FParis
&reference=iphone+app
&service=appleical
&template=lm2015e14o720j11
&alarm=60
&recurring=FREQ%3DDAILY%3BCOUNT%3D10
&calname=use-title
&uid=event123
&status=confirmed
&method=request
// Encode attachment
$attachment = file_get_contents('https://www.addevent.com/dir/?
client=&start=09%2F26%2F2017+09%3A00+AM&
end=09%2F26%2F2017+11%3A00+AM&title=Headline+of+the+event&
description=Event+description&timezone=Europe%2FParis&service=stream');

// Encode
$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);

Parameters

Parameter Description
client User account client id. Mandatory.
start Event start date. Mandatory. Format: "MM/DD/YYYY" or "DD/MM/YYYY". Date must contain numeric values only, eg. "09/26/2017 09:00 AM".
end Event end date. Mandatory. Format: "MM/DD/YYYY" or "DD/MM/YYYY". Date must contain numeric values only, eg. "09/26/2017 11:00 AM".
duration Duration in minutes, e.g. "30". Ignores the end date and adds the minutes to the start date.
title Event title. Mandatory.
description Event description. Use <br> or \n to create line break. 300 characters maximum (recommend).
location Event location, eg. "Eiffel Tower, Paris".
organizer Event organizer, eg. "John Doe".
organizer_email Event organizer e-mail, eg. "your@email.com".
all_day_event All day event, eg "true" or "false".
date_format Format of the date in "start" and "end", eg "MM/DD/YYYY". Values can be "MM/DD/YYYY" or "DD/MM/YYYY". Mandatory.
timezone Timezone of the event, eg. "Europe/Paris". Recommended. If not set, date / time is parsed as floating time.
reference Value to keep track of events added by users. Used for statistics (available soon). Eg. "iPhone" or "Newsletter Oct 2016".
service Values: "outlook" or "google" or "apple" or "outlookcom" or "yahoo" or "stream". If a service is specified, eg. "apple" the event will be downloaded immediately. If no service is specified, the user will be redirected to a landing page. Example: https://www.addevent.com/?db52444.

Use the "stream" parameter if you want to attach event files in your existing Mail API.
template Id of "Custom Landing Page" template, eg. "lm2015e14o720j11". Uses "AddEvent default" template if "template" is not defined.
alarm Supported in clients like Outlook and Apple Calendar. Trigger eg. reminder "15" minutes before event or one day before event : 60 x 24 = "1440".
recurring Requires a recurring rule, eg. "FREQ=DAILY;COUNT=10"

Supported in clients like Outlook and Apple Calendar.

There are a lot of recurrence rules you can apply. If you set up an invalid rule clients like Outlook and Calendar throw an error. You are adviced to test your rule by adding it to AddEvent, then test it with Outlook and similar clients.
This website has many great examples: http://www.kanzaki.com/docs/ical/rrule.html
calname Custom filenaming of the .ics file used for e.g. Outlook and Apple Calendar. If not specified 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 specified, a system UID will be generated.
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, the system defaults to "CONFIRMED".
method If specified a method parameter is added in the .ics file used for e.g. Outlook and Apple Calendar. If not specified, no method parameter is added. No methods are defined by this specification. http://www.kanzaki.com/docs/ical/method.html + https://tools.ietf.org/html/rfc2446

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