

# Amazon Personalize Events
<a name="API_Operations_Amazon_Personalize_Events"></a>

The following actions are supported by Amazon Personalize Events:
+  [PutActionInteractions](API_UBS_PutActionInteractions.md) 
+  [PutActions](API_UBS_PutActions.md) 
+  [PutEvents](API_UBS_PutEvents.md) 
+  [PutItems](API_UBS_PutItems.md) 
+  [PutUsers](API_UBS_PutUsers.md) 

# PutActionInteractions
<a name="API_UBS_PutActionInteractions"></a>

Records action interaction event data. An *action interaction* event is an interaction between a user and an *action*. For example, a user taking an action, such a enrolling in a membership program or downloading your app.

 For more information about recording action interactions, see [Recording action interaction events](https://docs.aws.amazon.com/personalize/latest/dg/recording-action-interaction-events.html). For more information about actions in an Actions dataset, see [Actions dataset](https://docs.aws.amazon.com/personalize/latest/dg/actions-datasets.html).

## Request Syntax
<a name="API_UBS_PutActionInteractions_RequestSyntax"></a>

```
POST /action-interactions HTTP/1.1
Content-type: application/json

{
   "actionInteractions": [ 
      { 
         "actionId": "string",
         "eventId": "string",
         "eventType": "string",
         "impression": [ "string" ],
         "properties": "string",
         "recommendationId": "string",
         "sessionId": "string",
         "timestamp": number,
         "userId": "string"
      }
   ],
   "trackingId": "string"
}
```

## URI Request Parameters
<a name="API_UBS_PutActionInteractions_RequestParameters"></a>

The request does not use any URI parameters.

## Request Body
<a name="API_UBS_PutActionInteractions_RequestBody"></a>

The request accepts the following data in JSON format.

 ** [actionInteractions](#API_UBS_PutActionInteractions_RequestSyntax) **   <a name="personalize-UBS_PutActionInteractions-request-actionInteractions"></a>
A list of action interaction events from the session.  
Type: Array of [ActionInteraction](API_UBS_ActionInteraction.md) objects  
Array Members: Minimum number of 1 item. Maximum number of 10 items.  
Required: Yes

 ** [trackingId](#API_UBS_PutActionInteractions_RequestSyntax) **   <a name="personalize-UBS_PutActionInteractions-request-trackingId"></a>
The ID of your action interaction event tracker. When you create an Action interactions dataset, Amazon Personalize creates an action interaction event tracker for you. For more information, see [Action interaction event tracker ID](https://docs.aws.amazon.com/personalize/latest/dg/action-interaction-tracker-id.html).  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 256.  
Required: Yes

## Response Syntax
<a name="API_UBS_PutActionInteractions_ResponseSyntax"></a>

```
HTTP/1.1 200
```

## Response Elements
<a name="API_UBS_PutActionInteractions_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

## Errors
<a name="API_UBS_PutActionInteractions_Errors"></a>

 ** InvalidInputException **   
Provide a valid value for the field or parameter.  
HTTP Status Code: 400

 ** ResourceInUseException **   
The specified resource is in use.  
HTTP Status Code: 409

 ** ResourceNotFoundException **   
Could not find the specified resource.  
HTTP Status Code: 404

## See Also
<a name="API_UBS_PutActionInteractions_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/personalize-events-2018-03-22/PutActionInteractions) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/personalize-events-2018-03-22/PutActionInteractions) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/personalize-events-2018-03-22/PutActionInteractions) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/personalize-events-2018-03-22/PutActionInteractions) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/personalize-events-2018-03-22/PutActionInteractions) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/personalize-events-2018-03-22/PutActionInteractions) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/personalize-events-2018-03-22/PutActionInteractions) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/personalize-events-2018-03-22/PutActionInteractions) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/personalize-events-2018-03-22/PutActionInteractions) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/personalize-events-2018-03-22/PutActionInteractions) 

# PutActions
<a name="API_UBS_PutActions"></a>

Adds one or more actions to an Actions dataset. For more information see [Importing actions individually](https://docs.aws.amazon.com/personalize/latest/dg/importing-actions.html). 

## Request Syntax
<a name="API_UBS_PutActions_RequestSyntax"></a>

```
POST /actions HTTP/1.1
Content-type: application/json

{
   "actions": [ 
      { 
         "actionId": "string",
         "properties": "string"
      }
   ],
   "datasetArn": "string"
}
```

## URI Request Parameters
<a name="API_UBS_PutActions_RequestParameters"></a>

The request does not use any URI parameters.

## Request Body
<a name="API_UBS_PutActions_RequestBody"></a>

The request accepts the following data in JSON format.

 ** [actions](#API_UBS_PutActions_RequestSyntax) **   <a name="personalize-UBS_PutActions-request-actions"></a>
A list of action data.  
Type: Array of [Action](API_UBS_Action.md) objects  
Array Members: Minimum number of 1 item. Maximum number of 10 items.  
Required: Yes

 ** [datasetArn](#API_UBS_PutActions_RequestSyntax) **   <a name="personalize-UBS_PutActions-request-datasetArn"></a>
The Amazon Resource Name (ARN) of the Actions dataset you are adding the action or actions to.  
Type: String  
Length Constraints: Maximum length of 256.  
Pattern: `arn:([a-z\d-]+):personalize:.*:.*:.+`   
Required: Yes

## Response Syntax
<a name="API_UBS_PutActions_ResponseSyntax"></a>

```
HTTP/1.1 200
```

## Response Elements
<a name="API_UBS_PutActions_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

## Errors
<a name="API_UBS_PutActions_Errors"></a>

 ** InvalidInputException **   
Provide a valid value for the field or parameter.  
HTTP Status Code: 400

 ** ResourceInUseException **   
The specified resource is in use.  
HTTP Status Code: 409

 ** ResourceNotFoundException **   
Could not find the specified resource.  
HTTP Status Code: 404

## See Also
<a name="API_UBS_PutActions_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/personalize-events-2018-03-22/PutActions) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/personalize-events-2018-03-22/PutActions) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/personalize-events-2018-03-22/PutActions) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/personalize-events-2018-03-22/PutActions) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/personalize-events-2018-03-22/PutActions) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/personalize-events-2018-03-22/PutActions) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/personalize-events-2018-03-22/PutActions) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/personalize-events-2018-03-22/PutActions) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/personalize-events-2018-03-22/PutActions) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/personalize-events-2018-03-22/PutActions) 

# PutEvents
<a name="API_UBS_PutEvents"></a>

Records item interaction event data. For more information see [Recording item interaction events](https://docs.aws.amazon.com/personalize/latest/dg/recording-item-interaction-events.html).

**Note**  
 If you use an AWS Lambda function to call the PutEvents operation, your function's execution role must have permission to perform the `personalize:PutEvents` action with the wildcard `*` in the `Resource` element. 

## Request Syntax
<a name="API_UBS_PutEvents_RequestSyntax"></a>

```
POST /events HTTP/1.1
Content-type: application/json

{
   "eventList": [ 
      { 
         "eventId": "string",
         "eventType": "string",
         "eventValue": number,
         "impression": [ "string" ],
         "itemId": "string",
         "metricAttribution": { 
            "eventAttributionSource": "string"
         },
         "properties": "string",
         "recommendationId": "string",
         "sentAt": number
      }
   ],
   "sessionId": "string",
   "trackingId": "string",
   "userId": "string"
}
```

## URI Request Parameters
<a name="API_UBS_PutEvents_RequestParameters"></a>

The request does not use any URI parameters.

## Request Body
<a name="API_UBS_PutEvents_RequestBody"></a>

The request accepts the following data in JSON format.

 ** [eventList](#API_UBS_PutEvents_RequestSyntax) **   <a name="personalize-UBS_PutEvents-request-eventList"></a>
A list of event data from the session.  
Type: Array of [Event](API_UBS_Event.md) objects  
Array Members: Minimum number of 1 item. Maximum number of 10 items.  
Required: Yes

 ** [sessionId](#API_UBS_PutEvents_RequestSyntax) **   <a name="personalize-UBS_PutEvents-request-sessionId"></a>
The session ID associated with the user's visit. Your application generates the sessionId when a user first visits your website or uses your application. Amazon Personalize uses the sessionId to associate events with the user before they log in. For more information, see [Recording item interaction events](https://docs.aws.amazon.com/personalize/latest/dg/recording-item-interaction-events.html).  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 256.  
Required: Yes

 ** [trackingId](#API_UBS_PutEvents_RequestSyntax) **   <a name="personalize-UBS_PutEvents-request-trackingId"></a>
The tracking ID for the event. The ID is generated by a call to the [CreateEventTracker](https://docs.aws.amazon.com/personalize/latest/dg/API_CreateEventTracker.html) API.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 256.  
Required: Yes

 ** [userId](#API_UBS_PutEvents_RequestSyntax) **   <a name="personalize-UBS_PutEvents-request-userId"></a>
The user associated with the event.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 256.  
Required: No

## Response Syntax
<a name="API_UBS_PutEvents_ResponseSyntax"></a>

```
HTTP/1.1 200
```

## Response Elements
<a name="API_UBS_PutEvents_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

## Errors
<a name="API_UBS_PutEvents_Errors"></a>

 ** InvalidInputException **   
Provide a valid value for the field or parameter.  
HTTP Status Code: 400

## See Also
<a name="API_UBS_PutEvents_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/personalize-events-2018-03-22/PutEvents) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/personalize-events-2018-03-22/PutEvents) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/personalize-events-2018-03-22/PutEvents) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/personalize-events-2018-03-22/PutEvents) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/personalize-events-2018-03-22/PutEvents) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/personalize-events-2018-03-22/PutEvents) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/personalize-events-2018-03-22/PutEvents) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/personalize-events-2018-03-22/PutEvents) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/personalize-events-2018-03-22/PutEvents) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/personalize-events-2018-03-22/PutEvents) 

# PutItems
<a name="API_UBS_PutItems"></a>

Adds one or more items to an Items dataset. For more information see [Importing items individually](https://docs.aws.amazon.com/personalize/latest/dg/importing-items.html). 

## Request Syntax
<a name="API_UBS_PutItems_RequestSyntax"></a>

```
POST /items HTTP/1.1
Content-type: application/json

{
   "datasetArn": "string",
   "items": [ 
      { 
         "itemId": "string",
         "properties": "string"
      }
   ]
}
```

## URI Request Parameters
<a name="API_UBS_PutItems_RequestParameters"></a>

The request does not use any URI parameters.

## Request Body
<a name="API_UBS_PutItems_RequestBody"></a>

The request accepts the following data in JSON format.

 ** [datasetArn](#API_UBS_PutItems_RequestSyntax) **   <a name="personalize-UBS_PutItems-request-datasetArn"></a>
The Amazon Resource Name (ARN) of the Items dataset you are adding the item or items to.  
Type: String  
Length Constraints: Maximum length of 256.  
Pattern: `arn:([a-z\d-]+):personalize:.*:.*:.+`   
Required: Yes

 ** [items](#API_UBS_PutItems_RequestSyntax) **   <a name="personalize-UBS_PutItems-request-items"></a>
A list of item data.  
Type: Array of [Item](API_UBS_Item.md) objects  
Array Members: Minimum number of 1 item. Maximum number of 10 items.  
Required: Yes

## Response Syntax
<a name="API_UBS_PutItems_ResponseSyntax"></a>

```
HTTP/1.1 200
```

## Response Elements
<a name="API_UBS_PutItems_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

## Errors
<a name="API_UBS_PutItems_Errors"></a>

 ** InvalidInputException **   
Provide a valid value for the field or parameter.  
HTTP Status Code: 400

 ** ResourceInUseException **   
The specified resource is in use.  
HTTP Status Code: 409

 ** ResourceNotFoundException **   
Could not find the specified resource.  
HTTP Status Code: 404

## See Also
<a name="API_UBS_PutItems_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/personalize-events-2018-03-22/PutItems) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/personalize-events-2018-03-22/PutItems) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/personalize-events-2018-03-22/PutItems) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/personalize-events-2018-03-22/PutItems) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/personalize-events-2018-03-22/PutItems) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/personalize-events-2018-03-22/PutItems) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/personalize-events-2018-03-22/PutItems) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/personalize-events-2018-03-22/PutItems) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/personalize-events-2018-03-22/PutItems) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/personalize-events-2018-03-22/PutItems) 

# PutUsers
<a name="API_UBS_PutUsers"></a>

Adds one or more users to a Users dataset. For more information see [Importing users individually](https://docs.aws.amazon.com/personalize/latest/dg/importing-users.html).

## Request Syntax
<a name="API_UBS_PutUsers_RequestSyntax"></a>

```
POST /users HTTP/1.1
Content-type: application/json

{
   "datasetArn": "string",
   "users": [ 
      { 
         "properties": "string",
         "userId": "string"
      }
   ]
}
```

## URI Request Parameters
<a name="API_UBS_PutUsers_RequestParameters"></a>

The request does not use any URI parameters.

## Request Body
<a name="API_UBS_PutUsers_RequestBody"></a>

The request accepts the following data in JSON format.

 ** [datasetArn](#API_UBS_PutUsers_RequestSyntax) **   <a name="personalize-UBS_PutUsers-request-datasetArn"></a>
The Amazon Resource Name (ARN) of the Users dataset you are adding the user or users to.  
Type: String  
Length Constraints: Maximum length of 256.  
Pattern: `arn:([a-z\d-]+):personalize:.*:.*:.+`   
Required: Yes

 ** [users](#API_UBS_PutUsers_RequestSyntax) **   <a name="personalize-UBS_PutUsers-request-users"></a>
A list of user data.  
Type: Array of [User](API_UBS_User.md) objects  
Array Members: Minimum number of 1 item. Maximum number of 10 items.  
Required: Yes

## Response Syntax
<a name="API_UBS_PutUsers_ResponseSyntax"></a>

```
HTTP/1.1 200
```

## Response Elements
<a name="API_UBS_PutUsers_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

## Errors
<a name="API_UBS_PutUsers_Errors"></a>

 ** InvalidInputException **   
Provide a valid value for the field or parameter.  
HTTP Status Code: 400

 ** ResourceInUseException **   
The specified resource is in use.  
HTTP Status Code: 409

 ** ResourceNotFoundException **   
Could not find the specified resource.  
HTTP Status Code: 404

## See Also
<a name="API_UBS_PutUsers_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/personalize-events-2018-03-22/PutUsers) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/personalize-events-2018-03-22/PutUsers) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/personalize-events-2018-03-22/PutUsers) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/personalize-events-2018-03-22/PutUsers) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/personalize-events-2018-03-22/PutUsers) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/personalize-events-2018-03-22/PutUsers) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/personalize-events-2018-03-22/PutUsers) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/personalize-events-2018-03-22/PutUsers) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/personalize-events-2018-03-22/PutUsers) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/personalize-events-2018-03-22/PutUsers) 