//'to' => [22505],
Why you commented it?
According to code:
/* Verify there are recipients and all the recipients are valid */
if( !isset( \IPS\Request::i()->to ) OR !\is_array( \IPS\Request::i()->to ) OR !\count( \IPS\Request::i()->to ) )
{
throw new \IPS\Api\Exception( 'INVALID_RECIPIENT', '1C374/3', 404 );
}
else
{
foreach( \IPS\Request::i()->to as $to )
{
if( !\IPS\Member::load( (int) $to )->member_id )
{
throw new \IPS\Api\Exception( 'INVALID_RECIPIENT', '1C374/4', 404 );
}
}
}
INVALID_RECIPIENT -
* @throws 1C374/3 INVALID_RECIPIENT No recipients were supplied
You should really look into code more often. 😉