Integrating your scheduled events

Overview

Seamlessly integrate your event planning with T.io and receive real-time, weather-specific insights and notifications tailored to the right recipients at the right time. By aligning your events with precise weather forecasts, you can plan more efficiently, minimize disruptions, and optimize operations based on weather conditions.

This API allows you to create or update event details from your internal system on the Tomorrow.io platform, connecting them to predefined alerts. These alerts are triggered only during the event's timeframe, ensuring timely and relevant notifications.

Synced events can be visualized on the platform's insights dashboard, allowing you to assess potential risks in advance by viewing weather insights in the context of your events.


Relevant Endpoints:

Synced Events display in the platform

Synced Events display in the platform

Sync Event Endpoint

https://api.tomorrow.io/v4/sync-event

Request Body Parameters

Parameter NameData TypeDescriptionSample ValueRequiredValidations
externalIdstringThe external ID of the event.
This id is used to identify the event and decide if this is a create or an update operation.
"67890"Yes
namestringThe name of the event"Test"Yes
startTimestringStart date and time of the event in ISO 8601 format"2024-07-18T10:00:00Z"Yes
endTimestringEnd date and time of the event in ISO 8601 format"2024-07-18T12:00:00Z"YesMust be after startTime
locationobjectThe location of the event. The endpoint supports finding event by id or name. If not found, geometry details can be provided and a location will be created and linked to the event.{"id":"6593f162212b18a3b182f23b" }YesEach location must have location id or name and GeoJSON geometry (point, polygon, polyline) in case the location does not exist.
groupsarray of stringsThe group names that will be subscribed to the event.NoThe groups must exist in the platform before linking them to the event.

Max 50 groups in the array.
usersarray of stringsThe user emails that will be subscribed to the event.NoMax 50 users in the array.
eventTagsarray of stringsTags associated with the event. The tags will be set to the event and are shown in the platform UI.NoMax 50 tags in the array.
alertTagsarray of stringsAlert tags associated with the event. The alerts tags is one way to link alerts to the event. Any alert with the specified tag will be linked to the event.NoMax 50 tags in the array.
alertIdsarray of stringsThe alert ids for which the event will be linked to.NoThe alerts must exist in the platform before linking them to the event.

Max 50 alerts in the array.
persistLocationbooleanConfiguration of whether to persist the location.

By default, location that doesn't exists and received in the request will be created and deleted once the event is over. Setting this parameter to ‘True’ will result in not deleting the location when the event is over.

If the use case is for temporary locations it is advised to set this to false so the locations quotas won't be exceeded.
falseNo

Request Example

Example 1 (existing location):

{
    "externalId": "67890",
    "name": "Test event 2",
  	"startTime": "2024-08-02T11:00:00.571Z",
  	"endTime": "2024-08-02T16:00:00.482Z",
    "location": {
      "id":"6593f162212b18a3b182f23b"
    },
    "groups": [
      	"group1",
      	"group2"
    ],
    "users": [
      	"[email protected]", 
      	"[email protected]"
    ],
    "eventTags": [
    	"Public Events",
    	"Free Events"
  	],
    "alertTags": [
    	"Public Events",
    	"Free Events"
  	]
}

Example 2 (location doesn’t exist):

{
    "externalId": "test-event-1",
    "name": "Test event 1",
    "startTime": "2020-01-01T00:00:00Z",
    "endTime": "2020-01-01T01:00:00Z",
    "location": {
        "name": "Keith Howe",
        "geometry": {
            "type": "Polygon",
            "coordinates": [
              [
                [-122.47736940728976, 45.155939],
                [-122.47758235998081, 45.16271526450315],
                [-122.478220377627, 45.16946478618608],
                [-122.47736940728976, 45.155939]
              ]
            ]
          }
        },
    "groups": ["group1","group2"],
    "users": ["[email protected]", "[email protected]"],
    "eventTags": ["tag1", "tag2"],
    "alertIds": [
    	"bd223359-f90c-4b11-8168-9a0305bdc085"
  	]
    "persistLocation": true
}

Response Example

{
    "data": {
      "event": {
        	"id": "0048bbb7-8398-4a09-b6de-c60693609596",
        	"name": "Test event 1",
        	"externalId": "test-event-1",
          "startTime": "2020-01-01T00:00:00.000Z",
          "endTime": "2020-01-01T01:00:00.000Z",
          "locationId": "664a0d128d24f65f1eed3471",
          "createdAt": "2024-05-20T14:03:05.455Z",
          "updatedAt": "2024-05-20T14:03:05.455Z",
          "createdBy": "60b36e15bf65330008214556",
          "updatedBy": "60b36e15bf65330008214556",
          "users": [
            "[email protected]",
            "[email protected]"
          ],
          "groups": [
            "group1"
          ]
        }
    }
}

Delete Event Endpoint

https://api.tomorrow.io/v4/calendar-events/{eventId}

Request Path Parameters

Parameter NameData TypeDescriptionSample ValueRequiredValidations
eventIdstringTomorrow.io ID of the event to be deleted."67890"Yes

Integration Details

To integrate your data you need to have an authorized API key. Please reach out to your account manager to receive the authentication information and any additional integration details.