App Icon Badge EndpointsView Markdown ↗

Set App Icon Badge

Shows a number on the ActivitySmith app icon. Requires Push Notifications enabled for ActivitySmith on the device.

POST https://activitysmith.com/api/badge

Authentication#

Use your API key in the request header.

Authorization: Bearer $YOUR_API_KEY

Request examples#

await activitysmith.badgeCount(8333);

Bodyapplication/json

badgeintegerrequired
The count to show on the ActivitySmith app icon. Send 0 to clear it.
Minimum: 0
Maximum: 2147483647
targetChannelTarget

Additional Properties: false

set count

{
"badge": 8333
}

clear count

{
"badge": 0
}

channel targeted

{
"badge": 3,
"target": {
"channels": [
"sales",
"customer-success"
]
}
}

Responses#

200#

App Icon Badge updated

Content type: application/json

Schema: AppIconBadgeCountUpdateResponse#

successbooleanrequired
badgeintegerrequired
Minimum: 0
Maximum: 2147483647
devices_updatedintegerrequired
Number of devices whose App Icon Badge was updated.
users_updatedintegerrequired
Number of account users with at least one updated device.
devices_notifiedinteger
Deprecated compatibility alias for devices_updated.
Deprecated: true
users_notifiedinteger
Deprecated compatibility alias for users_updated.
Deprecated: true
effective_channel_slugsarray of string or nullrequired
timestampstring<date-time>required
devices_targetedinteger
Number of device tokens targeted.
devices_deactivatedinteger
Number of device tokens deactivated because APNs reported them unregistered.
devices_unregisteredinteger
Number of targeted device tokens APNs reported as unregistered.

Additional Properties: false

default

{
"success": true,
"badge": 8333,
"devices_updated": 2,
"users_updated": 1,
"effective_channel_slugs": null,
"timestamp": "2026-07-10T12:00:00.000Z"
}

channel targeted

{
"success": true,
"badge": 3,
"devices_updated": 2,
"users_updated": 1,
"effective_channel_slugs": [
"sales",
"customer-success"
],
"timestamp": "2026-07-10T12:00:00.000Z"
}

400#

Bad request

Content type: application/json

Schema: BadRequestError#

errorstringrequired
messagestringrequired

Additional Properties: true

402#

Billing access required

Content type: application/json

Schema: BillingBlockedError#

errorstringrequired
Enum: ["trial_expired","trial_exhausted","billing_overage_cap_reached"]
messagestringrequired
trial_periodobject
trial_period.started_atstring<date-time>required
trial_period.ends_atstring<date-time>required
upgrade_urlstring<uri>required

Additional Properties: true

403#

Forbidden

Content type: application/json

Schema: ForbiddenError#

errorstringrequired
messagestringrequired

Additional Properties: true

422#

No matching devices found, or a targeted device needs to reconnect

Content type: application/json

oneOf

Schema: NoRecipientsError

Schema: AppIconBadgeCountUpdateError

429#

Rate limit exceeded

Content type: application/json

Schema: RateLimitError#

codestring
Enum: ["rate_limited"]
errorstringrequired
messagestringrequired

Additional Properties: false

502#

App Icon Badge could not be updated

Content type: application/json

Schema: AppIconBadgeCountUpdateError#

errorstringrequired
codestringrequired
Enum: ["badge_device_disconnected","badge_update_failed"]
messagestringrequired
badgeintegerrequired
Minimum: 0
Maximum: 2147483647
devices_targetedinteger
devices_updatedintegerrequired
users_updatedinteger
devices_notifiedinteger
Deprecated compatibility alias for devices_updated.
Deprecated: true
effective_channel_slugsarray of string or null

Additional Properties: true

Download the OpenAPI specification