Notify from email from JIRA Cloud api

Hi Team,

Trying to send notification from Jira cloud API, getting this error

Below is my code


AP.request({
        url: '/rest/api/3/issue/TEST-1/notify',
        type: 'POST',
        contentType: 'application/json',
        data:
        { 
            htmlBody: 'The <strong>latest</strong> test results for this ticket are now available.',
            subject: 'Latest test results',
            textBody: 'The latest test results for this ticket are now available.',
            to : 
            {
                
                assignee : true
            }

        },
        success: function(result)
        {
            alert(result);
        },
        error: function(result)
        {
                    AP.flag.create({
                      title: 'Oops!',
                      body: 'Something was wrong.',
                      type: 'error'
                    });
                    alert("______Error____");
                    console.log(result.status+"---error))))))) > "+result.responseText);
        }
    });

This is a scope I have added in the app

![image|382x85](upload://7UBn9am1Gn7x6wShVWEtGhTVfBb.png)

HI Team, any Update on this please, Its a blocker for me.

Hi @SarikaDalal,

Instead of passing an object to the data field, try passing a JSON string.

Regards,
Dugald