How to add email to account through api v8?

I am trying to add email to later associate with an account, but returns the message {“message”: “Not found”}. Below I send part of the code that generates this return.


$header = array('Content-type: application/vnd.api+json','Accept: application/vnd.api+json','Authorization: xxxxxxxx xxxxxxx);
$postStr = '{"data":{"attributes":{"email_address":"atendimento@xxxx.com","email_address_caps":"ATENDIMENTO@xxxx.COM"},"type":"EmailAddresses"}}';
$url = 'https://xxxxxxx.com/Api/index.php/v8/module/EmailAddresses';
$postStr = '{"data":{"attributes":{"email_address":"atendimento@xxxx.com.br","email_address_caps":"ATENDIMENTO@xxxx.COM.BR"},"type":"EmailAddresses"}}';
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_POSTFIELDS, $postStr);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
$output = curl_exec($ch);
$output = json_decode($output, true);

response: {"message":"Not found"}

Thanks
Fábio

new error: Method not allowed. Must be one of: GET