---
agentTools:
  projectIndex: https://docs.addevent.com/llms.txt
---

# Create an event

Creates a new event on an existing calendar.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "version": "v2.14.0",
    "title": "Calendar and Event API",
    "contact": {
      "name": "AddEvent Inc",
      "email": "support@addevent.com"
    }
  },
  "servers": [
    {
      "url": "https://api.addevent.com/calevent/v2"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "paths": {
    "/events": {
      "post": {
        "operationId": "create-event",
        "summary": "Create an event",
        "tags": [
          "Events"
        ],
        "description": "Creates a new event on an existing calendar.",
        "requestBody": {
          "$ref": "#/components/requestBodies/event-create"
        },
        "responses": {
          "201": {
            "$ref": "#/components/responses/20x-event"
          },
          "400": {
            "$ref": "#/components/responses/400-invalid-request-body"
          }
        }
      }
    }
  },
  "components": {
    "requestBodies": {
      "event-create": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/event-input",
              "required": [
                "title",
                "datetime_start"
              ]
            },
            "examples": {
              "Request body": {
                "$ref": "#/components/examples/event-body"
              }
            }
          }
        }
      }
    },
    "schemas": {
      "event-input": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "pattern": "^(?!\\s*$).+",
            "description": "The event's title. It must be a non-empty, single-line string."
          },
          "calendar_id": {
            "type": "string",
            "pattern": "^(?!\\s*$).+",
            "description": "The ID of the calendar that this event will be associated with. Defaults to the default calendar on the account if not provided."
          },
          "datetime_start": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}(\\s\\d{2}:\\d{2}(:\\d{2})?)?$",
            "description": "The start date & time of the event. Accepts datetimes in the following formats:\n\n* `YYYY-MM-DD hh:mm:ss` e.g. 2023-11-28 10:00:00\n* `YYYY-MM-DD hh:mm` e.g. 2023-11-28 10:00\n* `YYYY-MM-DD` e.g. 2023-11-28\n"
          },
          "datetime_end": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}(\\s\\d{2}:\\d{2}(:\\d{2})?)?$",
            "description": "The end date & time of the event. Accepts datetimes in the following formats:\n\n* `YYYY-MM-DD hh:mm:ss` e.g. 2023-11-28 10:00:00\n* `YYYY-MM-DD hh:mm` e.g. 2023-11-28 10:00\n* `YYYY-MM-DD` e.g. 2023-11-28\n\nDefaults to `datetime_start + 1 hour` if not set.\n"
          },
          "all_day_event": {
            "type": "boolean",
            "default": false,
            "description": "Whether the event is an all day event. If `true` then the start and end time of the event are ignored, and only the date is used."
          },
          "timezone": {
            "type": "string",
            "pattern": "^(?!\\s*$).+",
            "description": "The event's timezone. This ensures that the event appears at the correct time for users regardless of their timezone.\n\nThe `List timezones` endpoint returns all of the timezone values that are supported, or you can use our <a href=\"https://www.addevent.com/c/documentation/tools/time-zone-lookup\" target=\"_blank\">Timezone Lookup Tool</a> to find a timezone. Defaults to the calendar's timezone if not provided.\n\nThis property also accepts the value `floating`, which means that the event will appear at the same time in each user's timezone. For example, the event will be at 2 pm local time for users in Paris and 2 pm for local time for users in San Francisco.\n"
          },
          "recurring_rule": {
            "type": "string",
            "pattern": "(?:(\\w+)=((?:(?:[^;,=]+,?)*[^;,=])|\"(?:[^\"]|\"\")*\");?)+",
            "description": "The event's recurring rule which must use the iCalendar Standard's format. See our <a href=\"https://www.addevent.com/c/documentation/tools/recurring-rule-generator\" target=\"_blank\">Recurring Rule Generator</a> for help with generating valid recurring rules.\n\nLeave this property empty to create an even that does not repeat.\n\n**Please note:**\n1. Recurring rules are advanced functionality and need to be tested before using them.\n2. `datetime_start` must match the recurring rule to work in strict calendar systems like Outlook (desktop) and Apple Calendar.\n3. Recurring rules are not supported by Yahoo Calendar.\n"
          },
          "description": {
            "type": "string",
            "description": "The event's description. This field accepts plain text or simplified HTML. Use `\\n` to create a new line. Simplified HTML is not supported by all calendar clients, in which case, the content will be automatically converted into readable text.\n\n**Please note:** We recommend keeping your description short and to the point, with a maximum of 500 characters. Some browsers (e.g., Microsoft Edge) limit the number of characters that can be transferred in a URL, so this limit ensures that your event is cross-browser compatible.\n"
          },
          "internal_name": {
            "type": "string",
            "description": "An internal name for the event which will not be displayed publicly. This can be used internally to distinguish between events, to add additional information/context to an event, or to store an external ID that relates to another system."
          },
          "location": {
            "type": "string",
            "description": "The event's location. This can be an address or a URL, for example, a meeting or webinar link. Only one of `location` and `location_id` can be provided."
          },
          "location_id": {
            "type": "integer",
            "minimum": 0,
            "description": "The ID of the saved location to associate with the event. The value `0` means that a saved location is not being used. Only one of `location` and `location_id` can be provided."
          },
          "organizer_name": {
            "type": "string",
            "description": "The event organizer's name. If `organizer_name` is provided, then `organizer_email` must also be provided. The organizer information is displayed on the event landing page, and including an organizer means the event is considered a `meeting` by calendar clients such as Outlook (desktop) rather than an `appointment`."
          },
          "organizer_email": {
            "type": "string",
            "format": "email",
            "pattern": "^$|^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$",
            "description": "The event organizer's email address. If `organizer_email` is provided, then `organizer_name` must also be provided. The organizer information is displayed on the event landing page, and including an organizer means the event is considered a `meeting` by calendar clients such as Outlook (desktop) rather than an `appointment`."
          },
          "reminder": {
            "type": "integer",
            "minimum": 0,
            "maximum": 10800,
            "default": 30,
            "description": "The number of minutes prior to the start of an event that a reminder notification will be sent to the user via their calendar app. Event reminders are currently only supported by:\n* Apple calendar\n* Outlook desktop\n* Office 365 and Outlook.com (when using the Microsoft Events API)\n"
          },
          "color": {
            "type": "integer",
            "minimum": 1,
            "maximum": 20,
            "default": 1,
            "description": "The event's color. This appears in the dashboard and on calendar landing pages or embeddable calendars. Accepts values between `1` and `20` that correspond to the colors on the calendar's palette."
          },
          "free_busy": {
            "type": "string",
            "enum": [
              "free",
              "busy",
              "default"
            ],
            "default": "default",
            "description": "Indicates whether the event appears as *free* or *busy* when the user adds it to their calendar. Accepts the following values:\n* `free`: the event appears as free and does not block the user's calendars\n* `busy`: the event appears as busy and blocks the user's calendar\n* `default`: the event uses the user's default free/busy setting\n"
          },
          "landing_page_template_id": {
            "type": "string",
            "pattern": "^(?!\\s*$).+",
            "default": "default",
            "description": "The ID of the custom event landing page template to associate with the event. Accepts the value `default`, which uses the standard AddEvent template, or the ID of a custom template, which can be retrieved with the `List event templates` endpoint."
          },
          "rsvp_enabled": {
            "type": "boolean",
            "default": false,
            "description": "Whether the event requires a user to respond and enter their information before adding the event to their calendar."
          },
          "rsvp_form_id": {
            "type": "string",
            "pattern": "^(?!\\s*$).+",
            "default": "default",
            "description": "The ID of the custom RSVP form to associate with the event. Accepts the value `default`, which uses the standard AddEvent template, or the ID of a custom RSVP form, which can be retrieved with the `List RSVP forms` endpoint."
          },
          "custom_data": {
            "type": "object",
            "description": "Arbitary key-value pairs that can be attached to an event. Useful for storing additional structured data on an object, for example, storing external IDs to link an event to another system or linking to custom images for each event. `snake_case` should be used for custom data keys."
          }
        }
      },
      "event": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier for the event."
          },
          "unique_key": {
            "type": "string",
            "description": "Public identifier for the event that is used for sharing the event."
          },
          "title": {
            "type": "string",
            "description": "The event's title."
          },
          "calendar_id": {
            "type": "string",
            "description": "The ID of the calendar that the event is associated with."
          },
          "datetime_start": {
            "type": "string",
            "description": "The start date & time of the event. Datetimes are in `YYYY-MM-DD hh:mm:ss` format e.g. 2023-11-28 10:00:00"
          },
          "datetime_end": {
            "type": "string",
            "description": "The end date & time of the event. Datetimes are in `YYYY-MM-DD hh:mm:ss` format e.g. 2023-11-28 10:00:00"
          },
          "all_day_event": {
            "type": "boolean",
            "description": "Whether the event is an all day event."
          },
          "timezone": {
            "type": "string",
            "description": "The event's timezone. The value `floating` means that the event will appear at the same time in each user's timezone. For example, the event will be at 2 pm local time for users in Paris and 2 pm local time for users in San Francisco."
          },
          "recurring_rule": {
            "type": "string",
            "description": "The event's recurring rule in the iCalendar Standard's format. If this value is empty, then the event does not repeat."
          },
          "description": {
            "type": "string",
            "description": "The event's description."
          },
          "internal_name": {
            "type": "string",
            "description": "An internal name for the event. This will not be displayed publicly."
          },
          "location": {
            "type": "string",
            "description": "The location of the event. This can be an address or a URL, for example, a meeting or webinar link."
          },
          "location_id": {
            "type": "integer",
            "description": "The ID of a saved location that is associated with the event. The value `0` indicates that a saved location is not being used."
          },
          "organizer_name": {
            "type": "string",
            "description": "The event organizer's name."
          },
          "organizer_email": {
            "type": "string",
            "format": "email",
            "description": "The event organizer's email."
          },
          "reminder": {
            "type": "integer",
            "description": "The number of minutes prior to the start of an event that a reminder notification will be sent to the user via their calendar app. Event reminders are currently only supported by:\n* Apple Calendar\n* Outlook desktop\n* Office 365 and Outlook.com (when using the Microsoft Events API)\n"
          },
          "color": {
            "type": "integer",
            "description": "The event's color. This appears in the dashboard and on calendar landing pages or embeddable calendars. Values are between `1` and `20` and correspond to the colors on the calendar's palette."
          },
          "free_busy": {
            "type": "string",
            "description": "Indicates whether the event appears as *free* or *busy* in the user's calendar. Values are `free`, `busy`, or `default`."
          },
          "landing_page_template_id": {
            "type": "string",
            "description": "The ID of the custom event landing page template that is associated with the event. The value `default` indicates that the standard AddEvent template is being used."
          },
          "rsvp_enabled": {
            "type": "boolean",
            "description": "Whether the event requires a user to respond and enter their information before adding the event to their calendar."
          },
          "rsvp": {
            "type": "object",
            "properties": {
              "settings": {
                "$ref": "#/components/schemas/event-rsvp-settings"
              },
              "stats": {
                "$ref": "#/components/schemas/event-rsvp-stats"
              }
            }
          },
          "custom_data": {
            "type": "object",
            "description": "Arbitary key-value pairs that can be attached to an event. Useful for storing additional structured data on an object, for example, storing external IDs to link an event to another system or linking to custom images for each event."
          },
          "link_long": {
            "type": "string",
            "description": "The public URL to the event landing page. Used for sharing the event."
          },
          "link_short": {
            "type": "string",
            "description": "The public short URL to the event landing page. Used for sharing the event."
          },
          "created": {
            "type": "string",
            "description": "Time at which the event was created."
          },
          "modified": {
            "type": "string",
            "description": "Time at which the event was last updated."
          }
        }
      },
      "event-rsvp-settings": {
        "type": "object",
        "properties": {
          "rsvp_form_id": {
            "type": "string",
            "description": "The ID of the custom event landing page template that is associated with the event. The value `default` indicates that the standard AddEvent template is being used."
          },
          "seats_limited": {
            "type": "boolean",
            "description": "Whether the number of seats for an event is limited. If `true`, then a limit of `seats_limit` responses applies to the event. If `false` there is no limit to the number of responses that will be accepted."
          },
          "seats_limit": {
            "type": "integer",
            "description": "The number of seats that the event is limited to. Once this limit is reached, no additional responses will be accepted for the event."
          },
          "inactive": {
            "type": "boolean",
            "description": "Whether the event is still accepting RSVP responses. If `true`, then no additional responses will be accepted for the event."
          },
          "notify_emails": {
            "type": "string",
            "description": "A comma-separated list of email addresses that will be sent internal notification emails based on the `notify_frequency` setting."
          },
          "notify_frequency": {
            "type": "string",
            "description": "Indicates how often internal notification emails should be sent for new RSVP attendees:\n\n* `none`: don't send any notification emails\n* `all`: send a notification email for each new RSVP attendee\n* `summary`: send a daily summary email with a list of the new RSVP attendees from that day\n"
          }
        },
        "description": "The event's RSVP settings. These settings only apply if `rsvp_enabled` is set to `true`."
      },
      "event-rsvp-stats": {
        "type": "object",
        "properties": {
          "seats_left": {
            "type": "integer",
            "description": "The number of seats left for the event. Calculated as `seats_limit - count_going`."
          },
          "count_total": {
            "type": "integer",
            "description": "The total number of RSVP attendees who have responded to an event, regardless of their response."
          },
          "count_going": {
            "type": "integer",
            "description": "The number of RSVP attendees who have responded `going` to an event."
          },
          "count_maybe": {
            "type": "integer",
            "description": "The number of RSVP attendees who have responded `maybe` to an event."
          },
          "count_cantgo": {
            "type": "integer",
            "description": "The number of RSVP attendees who have responded `not-going` to an event."
          }
        },
        "description": "The event's RSVP stats."
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "APIkey",
        "description": "Your API key can be found on your AddEvent account page - https://dashboard.addevent.com/account/settings"
      }
    },
    "responses": {
      "20x-event": {
        "description": "Ok",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/event"
            },
            "examples": {
              "Event": {
                "$ref": "#/components/examples/event-min"
              },
              "Event 2": {
                "$ref": "#/components/examples/event-all"
              }
            }
          }
        }
      },
      "400-invalid-request-body": {
        "description": "Bad request",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "error_id": {
                  "type": "string",
                  "description": "A UUID which can be used to troubleshoot the error."
                },
                "error_message": {
                  "type": "string",
                  "description": "Additional information about the error."
                },
                "property_validation_errors": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      },
                      "reason": {
                        "type": "string"
                      }
                    }
                  },
                  "description": "An array of invalid property names, and the associated reason that the property is invalid."
                }
              }
            },
            "examples": {
              "Invalid request body": {
                "$ref": "#/components/examples/invalid-request-body"
              }
            }
          }
        }
      }
    },
    "examples": {
      "invalid-request-body": {
        "value": {
          "error_message": "There are a number of validation errors with the request",
          "error_id": "00c3317d-ecdc-449d-84f5-8562bc1ff831",
          "property_validation_errors": [
            {
              "name": "rrule",
              "reason": "Not a valid RRule value"
            },
            {
              "name": "title",
              "reason": "Cannot have blank value"
            }
          ]
        }
      },
      "event-body": {
        "value": {
          "title": "Event name",
          "datetime_start": "2024-06-01 10:00",
          "datetime_end": "2024-06-01 11:00",
          "timezone": "America/Los_Angeles",
          "recurring_rule": "FREQ=DAILY;COUNT=2",
          "landing_page_template_id": "default",
          "rsvp_form_id": "default"
        }
      },
      "event-min": {
        "value": {
          "id": "evt-0f571af553d8437eb6a9ce22384fdcba",
          "calendar_id": 1687480957492930,
          "unique_key": "de16434237",
          "title": "Event name",
          "internal_name": "",
          "datetime_start": "2023-07-02 15:00:00",
          "datetime_end": "2023-07-02 16:00:00",
          "recurring_rule": "",
          "all_day_event": false,
          "timezone": "America/Los_Angeles",
          "description": "",
          "location": "",
          "location_id": 0,
          "organizer_name": "",
          "organizer_email": "",
          "reminder": 30,
          "free_busy": "default",
          "color": 1,
          "landing_page_template_id": "default",
          "rsvp_enabled": false,
          "rsvp": {
            "settings": {
              "rsvp_form_id": "default",
              "seats_limited": false,
              "seats_limit": 50,
              "inactive": false,
              "notify_emails": "",
              "notify_frequency": "none"
            },
            "stats": {
              "seats_left": 50,
              "count_total": 0,
              "count_going": 0,
              "count_maybe": 0,
              "count_cantgo": 0
            }
          },
          "custom_data": {},
          "link_long": "https://www.addevent.com/event/de16434237",
          "link_short": "https://evt.to/aougueghw",
          "created": "2023-07-19 23:46:13",
          "modified": "2023-07-19 23:46:37"
        }
      },
      "event-all": {
        "value": {
          "id": "evt-0f571af553d8437eb6a9ce22384fdcba",
          "calendar_id": 1687480957492930,
          "unique_key": "de16434237",
          "title": "Event Title",
          "internal_name": "Internal Event Name",
          "datetime_start": "2023-07-02 15:00:00",
          "datetime_end": "2023-07-02 16:00:00",
          "recurring_rule": "FREQ=DAILY;COUNT=2",
          "all_day_event": false,
          "timezone": "America/Los_Angeles",
          "description": "This is a description of what the event is about.",
          "location": "https://www.zoom.com/join/123456",
          "location_id": 0,
          "organizer_name": "Firstname Lastname",
          "organizer_email": "emailaddress@addevent.com",
          "reminder": 30,
          "free_busy": "default",
          "color": 1,
          "landing_page_template_id": "QnTHySwB6570",
          "rsvp_enabled": true,
          "rsvp": {
            "settings": {
              "rsvp_form_id": "8709VYGmXZOkJh",
              "seats_limited": false,
              "seats_limit": 50,
              "inactive": false,
              "notify_emails": "",
              "notify_frequency": "none"
            },
            "stats": {
              "seats_left": 50,
              "count_total": 20,
              "count_going": 15,
              "count_maybe": 3,
              "count_cantgo": 2
            }
          },
          "custom_data": {
            "internal_id": 123456,
            "bannerimage": "https://cdn.example.org/banner1.jpg"
          },
          "link_long": "https://www.addevent.com/event/de16434237",
          "link_short": "https://evt.to/aougueghw",
          "created": "2023-07-19 23:46:13",
          "modified": "2023-07-19 23:46:37"
        }
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 103,
      "1": 165,
      "2": 2,
      "3": 119,
      "4": 10,
      "5": 212,
      "6": 106,
      "7": 0,
      "8": 55,
      "9": 83,
      "10": 79,
      "11": 76
    }
  }
}
```