updateRecords - no permisiion

updateRecords - no permisiion

Hello,
I wrote an api to update records by ID. I crated a new custome field named ID and I insert int to it in the leads. My api is:

$xmlData = '<Leads>
<row no="1">
<FL val="affStatus">'.$newstatus.'</FL>
</row>
</Leads>';
$id = '123456789';

$post=array("id"=>$id,"xmlData"=>$xmlData);
//--curl--//
I get:
You do not have the permission to edit this record or the "id" value you have given is invalid.
Why I don't have permission?
Thanks