diff --git a/userpoints.module b/userpoints.module
index 0f51b96..23687be 100644
--- a/userpoints.module
+++ b/userpoints.module
@@ -804,6 +804,7 @@ function userpoints_get_max_points($uid = NULL, $tid = NULL) {
  *    'txn_id' => Transaction ID of points, If present an UPDATE is performed
  *    'entity_id' => ID of an entity in the Database. ex. $node->id or $user->uid
  *    'entity_type' => string of the entity type. ex. 'node' or 'user' NOT 'node-content-custom'
+ *    'allow_anonymous' => Can anonymous users earn this point? Default = FALSE
  *
  * @return
  *   Array with status and reason.
@@ -833,7 +834,7 @@ function userpoints_userpointsapi($params) {
     }
 
     // Check if parameters are set.
-    $params_null_check = array('operation', 'description', 'reference', 'display', 'entity_id', 'entity_type');
+    $params_null_check = array('operation', 'description', 'reference', 'display', 'entity_id', 'entity_type', 'allow_anonymous');
     foreach ($params_null_check as $param_null_check) {
       if (!isset($params[$param_null_check])) {
         $params[$param_null_check] = NULL;
@@ -852,8 +853,9 @@ function userpoints_userpointsapi($params) {
       $params['tid'] = userpoints_get_default_tid();
     }
 
-    // Anonymous users do not get points, and there have to be points to process.
-    if (empty($params['uid']) || empty($params['points'])) {
+    // Anonymous users do not get points unless specified, and there have to be
+    // points to process.
+    if ((empty($params['uid']) && !$params['allow_anonymous']) || empty($params['points'])) {
       return array(
           'status' => FALSE,
           'reason' => 'uid or points not given. Anonymous users do not get points and there must be points to process.',
