Delete several trigger subscriptions
Changed onDeletes many trigger subscriptions on one connection, and reports what happened to each one separately. Use this endpoint to unsubscribe a selection from the subscription list, or every subscription a set of connected accounts holds to one trigger, instead of calling DeleteTriggerSubscription once per subscription. Pass the connection ID in the path, and name the subscriptions in the body in exactly one of two ways: by subscription_ids, or by trigger_name together with connected_account_ids, which deletes every subscription those accounts hold to that trigger on this connection, whatever its filter. trigger_name alone is refused, so no request can delete every subscription to a trigger. The call is best-effort rather than all-or-nothing: a subscription that could not be deleted does not bring back one that was. Retrying the whole request is safe: a subscription deleted by an earlier attempt comes back as NOT_FOUND, so treat DELETED and NOT_FOUND alike as gone. Unlike DeleteTriggerSubscription, which answers 404 for a missing subscription, the batch reports it as one NOT_FOUND result among many. Delivery stops for each deleted subscription exactly as with DeleteTriggerSubscription: an event already handed off for delivery is still delivered. Returns one result per subscription, each with its outcome (DELETED, NOT_FOUND, FAILED, or NOT_ATTEMPTED when the request ran out of time before reaching it) and a reason, plus deleted_count.
Request
- Base URLhttps://$SCALEKIT_ENVIRONMENT_URL
- AuthOAuth 2Client credentialsToken URLhttps://$SCALEKIT_ENVIRONMENT_URL/oauth/token
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
ID of the connection whose subscriptions to delete. Only subscriptions on this connection are deleted: a subscription ID from another connection comes back as NOT_FOUND.
Request body
Example request
{
"connected_account_ids": [
"ca_123456789012345",
"ca_123456789012346"
],
"subscription_ids": [
"trgs_28128748834787841",
"trgs_28128748834787842"
],
"trigger_name": "slack_message_posted"
}Response
Request processed; every subscription ID, or every subscription found for the named accounts, has its own result in results, and deleted_count says how many subscriptions this call deleted
Example response
{
"deleted_count": 2,
"results": [
{
"connected_account_id": "ca_123456789012345",
"reason": "trigger subscription not found",
"subscription_id": "trgs_28128748834787841"
}
]
}Changes
- info
endpoint added
- info