update_unsubscription
To enable or disable the Unsubscribe link in emails sent by the notifications and jobs of a resource, use the resource/update_unsubscription method.
Endpoint
svc=resource/update_unsubscription¶ms={
"resourceId": <long>,
"enabled": <long>
}
Parameters
The request must contain the following parameters:
| Parameter | Description |
|---|---|
| resourceId | Resource ID. |
| enabled | Whether the Unsubscribe link is added to emails:
|
If the Unsubscribe link is enabled, each recipient gets a separate email with a personal link to unsubscribe from the emails. If it’s disabled, all the recipients are put into one email. For more information, see Unsubscription from email notifications.
To get the current setting, request the resource with the custom properties flag and check the value of the unsl key. The link is disabled if the value is "0". If the value is different or the key is empty, the link is enabled.
Response
If the request is completed successfully, an empty object is returned:
{}
If the request fails, an error code is returned.
Error codes
| Error code | Description |
|---|---|
| 4 | Wrong input parameters. |
| 6 | Failed to update the resource. |
| 7 | The resource doesn’t exist, or the user doesn’t have the Edit not mentioned properties access right to it. |