Drupal custom module civicase is creating but it is returning null value?
This may be a permissions issue, depending on who is the logged-in user when your code runs and whether they have permission to create cases. If you want your code to run anyway regardless of who is logged-in, you could add 'check_permissions' =&gt; FALSE to your api $params.