Get Contents of URL
action can fetch data from the shortcut hosting service of your choice, perform version comparison (including support for skipping a version) and determine if an update is available in a split second.installed
value represents the version currently installed on the user's device, available
represents the version listed as the latest version on the remote server, and the update
boolean shows whether an update should be expected given those version numbers. Other parameters, such as prerelease
, are also considered on some tests.[ { "installed": "1.0", "available": "1.0", "update": false }, { "installed": "1.0", "available": "1.0.1", "update": true }, { "installed": "1.0.1", "available": "1.0", "update": false }, { "installed": "1.0.0-beta.1", "available": "1.0.0", "update": true }, { "installed": "1.0.0", "available": "1.0.0-beta.1", "update": false }, { "installed": "1.0.1.0.1.0", "available": "1.0.1.0.0.1", "update": false }, { "installed": "1.0.1.0.0.0", "available": "1.0.1.0.1.1", "update": true }, { "installed": "2.0", "available": "1.0.1.0.0.1", "update": false }, { "installed": "1.0.1.0.1.0", "available": "2", "update": true }, { "installed": "1.0.1.0.1.0", "available": "2.0.0.0.1", "update": true }, { "installed": "2", "available": "2.0", "update": false }, { "installed": "3", "available": "2.0", "update": false }, { "installed": "2.0", "available": "3", "update": true }, { "installed": "1.0.10", "available": "1.0.1", "update": false }, { "installed": "1.0.1", "available": "1.0.10", "update": true }, { "installed": "1.0.1", "available": "1.0.01", "update": false }, { "installed": "1.0.01", "available": "1.0.001", "update": false }, { "installed": "1.0.001", "available": "1.0.01", "update": true }, { "installed": "1.0.1", "available": "1.0.001", "update": false }, { "installed": "1.0.001", "available": "1.0.1", "update": true }, { "installed": "1.0.01", "available": "1.0.1", "update": true }, { "installed": "1.0.10", "available": "1.0.01", "update": false }, { "installed": "1.0-beta.10", "available": "1.0-beta.01", "update": false, "prerelease": true }, { "installed": "1.0-beta.1", "available": "1.0-beta.01", "update": false, "prerelease": true }, { "installed": "1.0-beta.01", "available": "1.0-beta.1", "update": true, "prerelease": true }, { "installed": "1.0-beta.1", "available": "1.0-beta.001", "update": false, "prerelease": true }, { "installed": "1.0-beta.0001", "available": "1.0-beta.1", "update": true, "prerelease": true }, { "installed": "1.0.2", "available": "1.0.10", "update": true }, { "installed": "1.0", "available": "2.0-alpha.1", "prerelease": false, "update": false }, { "installed": "1.0", "available": "2.0-alpha.1", "prerelease": true, "update": true }, { "installed": "2.0", "available": "1.0-beta.1", "prerelease": true, "update": false }, { "installed": "1", "available": "1.0-beta.1", "prerelease": true, "update": false }, { "installed": "2", "available": "1.0-beta.1", "prerelease": true, "update": false }, { "installed": "1", "available": "2.0-beta.1", "prerelease": false, "update": false }, { "installed": "1", "available": "2.0-beta.1", "prerelease": true, "update": true }, { "installed": "2.0-a1", "available": "2.0-a2", "prerelease": false, "update": false }, { "installed": "2.0-a1", "available": "2.0-a2", "prerelease": true, "update": true }, { "installed": "2.0-a1", "available": "3.0-a2", "prerelease": true, "update": true }, { "installed": "2.0-b1", "available": "3.0-a2", "prerelease": true, "update": true }, { "installed": "2.0-b1", "available": "2.0-a2", "prerelease": true, "update": false }, { "installed": "2.0-a1", "available": "2.0-b2", "prerelease": true, "update": true }, { "installed": "2.0-alpha.1", "available": "2.0-beta.2", "prerelease": true, "update": true }, { "installed": "2.0-a.20.1", "available": "2.0-alpha.20.1", "prerelease": true, "update": false }, { "installed": "2.0-prerelease.20.1", "available": "2.0-test.20.1", "prerelease": true, "tags": [ [ "prerelease", "test" ], "rc" ], "update": false }, { "installed": "2.0-prerelease.20.1", "available": "2.0-test.20.2", "prerelease": true, "tags": [ [ "prerelease", "test" ], "rc" ], "update": true }, { "installed": "2.0-prerelease.20.1", "available": "2.0-rc.20.1", "prerelease": true, "tags": [ [ "prerelease", "test" ], "rc" ], "update": true }, { "installed": "2.0-alpha.20.1", "available": "2.0-beta.20.1", "prerelease": true, "tags": [ [ "prerelease", "test" ], "rc" ], "update": false }, { "installed": "2.0-alpha.20.1", "available": "2.0-beta.20.2", "prerelease": true, "tags": [ [ "prerelease", "test" ], "rc" ], "update": true }, { "installed": "2.0-alpha.20.2", "available": "2.0-beta.20.1", "prerelease": true, "tags": [ [ "prerelease", "test" ], "rc" ], "update": false }, { "installed": "2.0-rc.20.1", "available": "2.0-test.20.1", "prerelease": true, "tags": [ [ "prerelease", "test" ], "rc" ], "update": false }, { "installed": "2.0-beta.20.1", "available": "2.0-beta.20.1", "prerelease": true, "update": false }, { "installed": "2.0-beta.20.1", "available": "2.0-beta.20.2", "prerelease": true, "update": true }, { "installed": "2.0-beta.20.2", "available": "2.0-beta.20.1", "prerelease": true, "update": false }, { "installed": "2.0-dev1", "available": "2.0-test2", "prerelease": true, "tags": [ "dev", "pre", "test" ], "update": true }, { "installed": "2.0-test1", "available": "2.0-dev3", "prerelease": true, "tags": [ "dev", "pre", "test" ], "update": false }, { "installed": "2.0-test1", "available": "2.0-dev3", "prerelease": false, "tags": [ "dev", "pre", "test" ], "update": false }, { "installed": "2.0-test1", "available": "3.0-dev3", "prerelease": true, "tags": [ "dev", "pre", "test" ], "update": true }, { "installed": "3.0-dev1", "available": "2.0-test3", "prerelease": true, "tags": [ "dev", "pre", "test" ], "update": false }, { "installed": "1.0.0-alpha+build4", "available": "1.0.0-alpha+build5", "prerelease": true, "update": false }, { "installed": "1.0.0-0.3.7", "available": "1.0.0-0.3.8", "prerelease": true, "update": true }, { "installed": "1.0.0-0.3.8", "available": "1.0.0-0.3.7", "prerelease": true, "update": false }, { "installed": "1.0.0-0.3.7", "available": "1.0.0", "prerelease": true, "update": true }, { "installed": "1.0.0", "available": "1.0.0-0.3.7", "prerelease": true, "update": false }, { "installed": "1.0.0", "available": "1.0.2", "prerelease": true, "skip": "1.0.2", "update": false }, { "installed": "1.0.0", "available": "1.0.2", "prerelease": true, "skip": "1.0.1", "update": true }, { "installed": "1.0.0", "available": "1.0.2", "prerelease": true, "skip": "1.0.3", "update": true }, { "installed": "1.0", "available": "1.0.12-alpha1", "prerelease": true, "update": true }, { "available": "1.0", "update": true } ]
https://updatekit.mikebeas.com
.GET /
POST /v1
POST /v1/bulk
{ "shortcut": { "version": "1.0.0.0.0.0", "url": "https://example.com/shortcuts/shortcut-id" } }
shortcut
object contains details about the shortcut being updated.version
is the installed shortcut's current version number. It can contain any number of points and supports -tags
for SemVer-like versioning. Generally, the UpdateKit API supports anything SemVer 2.0.0 supports, plus more. The only exception to the SemVer standard is that the UpdateKit API does not compare pre-release tags lexically. More information on tags can be found below.url
is the address where an UpdateKit-compatible JSON file describing the latest version of your shortcut can be found. You can find more information about what this file should look like below.{ "shortcut": { "version": "1.0.0.0.0.0", "module": "routinehub", "id": "69" } }
url
string, as the API module will be able to determine the proper URL automatically.module
is a special keyword that tells the API which module to use. You can find a list of supported modules and their keywords by calling the API Details
endpoint. New modules will be announced via the UpdateKit Mastodon and Bluesky accounts. Unless otherwise stated, all modules are supportted on all versions of the API.id
value is the gallery website's specific ID for the shortcut being checked for updates. This will be used to create the URL, communicate with the site's API and perform the update check.Bulk Check for Updates
endpoint to submit an array of multiple shortcut
objects. The API will return the total number of updates and the payload for each shortcut separately. An example body is below.{ "shortcuts": [ { "version": "1.0.0.0.0.0", "url": "https://example.com/shortcuts/shortcut-id" }, { "version": "1.1.0.0.0.1", "module": "routinehub", "id": "69" } ] }
shortcuts
array is a list of shortcuts you want to update, using the same object structure you use for the single-shortcut Check for Update
endpoint. You can also mix and match different updater modules within this array if needed.payloads
array, so you should not use the indexes as a means of matching shortcuts in the response to shortcuts in your request.includeMissed
boolean in your request body.{ "shortcut": { "version": "7.0", "module": "switchblade", "id": "example.com:1" }, "platform": "iPhone", "platformVersion": "16.0", "includeMissed": true }
missedUpdates
array that contains the full history back to, and including, the user's current installed version. You can iterate over this array to display the full list of updates your users have missed.{ "update": true, "payload": { "version": "8.0", "download": "icloud.com/", "notes": "This is a new release!", "release": "2020-10-30T12:00:00.000Z", "required": false, "missedUpdates": [ { "version": "8.0", "download": "icloud.com/", "notes": "This is a new release!", "release": "2020-10-30T12:00:00.000Z", "required": false }, { "version": "7.0", "download": "icloud.com/", "notes": "This is an older release", "release": "2019-10-30T12:00:00.000Z", "required": false } ] } }
getOriginalDownloadUrl
to true
inside the shortcut
object in your request body. This will only work for supported gallery sites. Unsupported sites will return the iCloud URL as usual.{ "shortcut": { "version": "1.0", "module": "routinehub", "id": "69", "getOriginalDownloadUrl": true } }
shortcut
object containing metadata about the shortcut being checked for updates. Currently this metadata includes the shortcut name as reported by Apple's API (useful if the shortcut name provided to you by the shortcut is incorrect or has changed) and the base64-encoded shortcut icon.includeMetadata
property in your POST body with a boolean true
value.{ "shortcut": { "version": "1.0.0.0.0.0", "url": "https://example.com/shortcuts/shortcut-id" }, "includeMetadata": true }
include
array and name only the items you want. You do not need to include the includeMetadata
parameter if you use this option. Using both together will not cause any issues, however, and your include
array will be respected.include
array are: name
, icon
.{ "shortcut": { "version": "1.0.0.0.0.0", "url": "https://example.com/shortcuts/shortcut-id" }, "include": [ "name", "icon" ] }
1.2-beta.1
or 1.2-beta1
(with or without the dot between "beta" and "1"). Both of these are valid in the UpdateKit API. You can include as many dots in your tag as you want. You can also use multiple tags if you need to, such as -beta.alpha.1.rc.alpha
, although this does not typically make sense from a practical standpoint.tags
array. The UpdateKit API's default tags, however, are ordered in such a way that this does not make a difference when using them.+
at the end of your version number. This will be ignored when comparing version numbers.prerelease
in your request body. If this is not true, the user will only get back the latest stable version of the shortcut. This allows you to give the user control over whether they want to see pre-release versions or not.{ "shortcut": { "version": "1.0.0.0.0.0", "url": "https://example.com/shortcuts/shortcut-id", "prerelease": true, "tags": [ "alpha", "beta", "rc" ] } }
{ "shortcut": { "version": "1.0.0.0.0.0", "url": "https://example.com/shortcuts/shortcut-id", "prerelease": true, "tags": [ [ "a", "alpha" ], "beta", "rc" ] } }
[ [ "alpha", "a" ], [ "beta", "b" ], "rc" ]
skip
property in the shortcut
object of your request body that indicates the version the user skipped. As long as this version is available, your shortcut will be told that no update is available.{ "shortcut": { "version": "1.0", "module": "routinehub", "id": "69", "skip": "6.0" }, "platform": "iPhone", "platformVersion": "15.0" }
false
if the user should not see an update. You don't need to do any checks on your end to see if the version they skipped is the same version that's available.system
, which contains the major system version (15), and release
, which contains the specific system version (15.1.1). Then they can look up shortcut versions in their system that correspond to the appropriate version or versions (remembering that shortcuts may be forwards-compatible).platform
is also included. This header will be a string equal to either ios
or mac
to indicate which platform the requested shortcut is running on. For gallery sites, it is good to keep in mind that Shortcuts on a specific Mac version will almost certainly correspond to the iOS version from that same year, since the app runs the same on both platforms. This may help you easily map shortcuts that are compatible with a specific iOS version to an equal Mac version.platform
and platformVersion
items in your POST body. You can populate platform
with the output of the Get Device Details
action (getting the device model value).Get Device Details
action and use the built-in Device Details
global variable. You can use the OS
, Device Type
, or Device Model
value from this global variable. Any of these will work.platformVersion
with the output of the same action getting the system version. You do not need to modify these values in any way, the UpdateKit API can interpret the exact output of the actions and handle them as needed.{ "shortcut": { "version": "1.0", "url": "https://example.com/shortcuts/shortcut-id" }, "platform": "iPhone", "platformVersion": "15.0.1" }
{ "shortcut": { "version": "1.0", "url": "https://example.com/shortcuts/shortcut-id" }, "platform": "Mac", "platformVersion": "12.0.1" }
platform
and platformVersion
, there was another method of sending this information, but it was more complicated to setup from inside a shortcut. This method still works in v1 and will be removed in v2. To use the legacy method, you need to include an ios
or mac
string in your POST body, as shown below. You can use the Get System Details
action in Shortcuts to get this value easily.ios
or mac
based on the results of the Get Device Details
action with the Device Model
option. For Macs, the output from this always seems to be Mac
. Any other device types may be assumed to be iOS. Once that variable is set, you can use it as the key to this property in your JSON data.{ "shortcut": { "version": "1.0", "url": "https://example.com/shortcuts/shortcut-id" }, "ios": "15.0.1" }
{ "shortcut": { "version": "1.0", "url": "https://example.com/shortcuts/shortcut-id" }, "mac": "12.0.1" }
{ "update": true, "payload": { "version": "6.0", "download": "https://www.icloud.com/shortcuts/b7e6382d4b52417cb6597b3f1d4af46f", "notes": "This version of RoutinePub is compatible with iOS 15. If you are not on iOS 15 it is recommended that you skip this version until you update.\r\n\r\nDue to changes made by Apple, you will need to copy the URL to your Shortcut before running RoutinePub and selecting the option to publish a new version.\r\n\r\nDue to the changes Apple made, RoutinePub is not able to take advantage of the previous “Shortcut Associations” feature anymore. Most of the feature was left intact in case Apple backtracks, but the menu option will just show a message and exit now. You will need to select which RoutineHub listing to update each time you publish an update.", "release": "September 11, 2021", "required": false } }
update
will be true and there will be a payload
containing the details of the update. If there is no update available, update
will be false and no payload
will be included.version
in the payload
is the new version of the shortcut that is available.download
URL is the iCloud link to download the latest version of the shortcut. If you set getOriginalDownloadUrl
to true
, this will be the download URL on the gallery website, for modules where this is supported.notes
string will include the release notes for this version.release
value, which is optional in the UpdateKit data format standard, is the release date of this version. It may not be included in all cases.required
value, which is optional in the UpdateKit data format standard, is a boolean value indicating whether this update is required to be installed by the developer. See the UpdateKit Data Format section for more information. This value may not be included in all cases and can be assumed false if not present.{ "update": true, "payload": { "version": "9.0", "download": "https://www.icloud.com/shortcuts/be953510c9094f09b4278ad86043d377", "notes": "UpdateKit 9.0 is compatible with iOS 15. It has been tested with iOS 15.2 beta 1 and should work on earlier versions, but I am not able to confirm that due to Apple having broken a number of things in various builds of iOS 15. Please note that UpdateKit has not been tested on Mac and may not work there.", "release": "October 28, 2021", "required": false, "shortcut": { "name": "UpdateKit", "icon": { "base64": "[base64-encoded icon removed in this example due to length]" } } } }
url
described above.Version
is the version number of the latest version to be released.URL
value points to the iCloud sharing URL for the latest version.Notes
value is a short message that indicates what changes have been made in this version.Release
value contains the release date for the latest version. This may be formatted however you want, although you may want to have a human-readable date format in case an updater displays the value.Required
value indicates whether this update is required to be installed by the user. This can be checked by your updater or shortcut to determine if the user should be allowed to skip the update. Some examples of instances where you might want to force users to install an update would be a situtation where a shortcut that communicates with a server requires changes in order to continue functioning, or where using the old version might create a security risk for the user.{ "Version": "1.0", "URL": "https://www.icloud.com/shortcuts/1f40b16a82c04e989261dfb0054928d0", "Notes": "UpdateKit initial release.", "Release": "September 23, 2018", "Required": true }