Note: Requires a token with the updates:read permission. Updates are served while the update-support period of your purchase is still running; after it ends we still tell you a newer version exists, but the file is no longer available until you renew.
Tip: On WordPress? Skip the code. The Toolkit plugin already wires these endpoints into the normal Themes and Plugins update screens. Install it, paste a token, and purchased items update like anything else in WordPress. Download the plugin Β· Installation guide
#Check for updates
/api/updates/check| Parameter | Type | Description |
|---|---|---|
packages |
array | installed packages, up to 100 per call |
packages[].slug |
string | the theme or plugin folder name |
packages[].type |
string | theme | plugin |
packages[].version |
string | the version currently installed (optional) |
curl "https://sellmycode.net/api/updates/check" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"packages":[{"slug":"my-theme","type":"theme","version":"1.4.0"}]}'
{
"status": "success",
"checked": 1,
"updates": [
{
"item_id": 123,
"slug": "my-theme",
"type": "theme",
"name": "My Theme",
"installed_version": "1.4.0",
"new_version": "1.6.2",
"changelog": { "version": "1.6.2", "body": "Fixed ..." },
"can_download": true,
"reason": null,
"update_window_ends_at": "2027-01-30T10:00:00+00:00",
"download_url": "https://sellmycode.net/api/updates/download/123",
"renew_url": null
}
]
}
Note: Only items you actually bought are returned β anything else installed on the site is ignored, so it is safe to send your whole plugin list.
#Download the installable package
/api/updates/download/{id}Responds with a 302 redirect to a short-lived storage URL (valid a few minutes). Follow redirects and save the ZIP β it contains only the theme or plugin, ready to install.
curl -L -o update.zip "https://sellmycode.net/api/updates/download/123" \
-H "Authorization: Bearer YOUR_API_KEY"
| Error code | HTTP | Meaning |
|---|---|---|
not_purchased |
403 | this account did not buy the item |
update_window_expired |
403 | update support has ended β renew_url is included in the response |
no_installable_file |
404 | the author has not provided an installable package for this item |
item_removed |
410 | the item is no longer available |
Warning: These endpoints are limited to 60 requests per minute. A site normally needs only a few calls per day β check once, then download what changed.
Developers