Capture Behavior Data
Post Data from an Authenticated Server-to-Server Connection
Post Data from an Unauthenticated Server-to-Server Connection
Use the POST method to send event data through an authenticated server-to-server connection. Use a server-to-server connection when your server already collects engagement data that you want to forward to Data 360 or when you require an authenticated connection.
/server/events/{appSourceId}.
Retrieve the {appSourceId} after you create a server-to-server connection in Data 360.
Salesforce v63.0
REST
POST
Authenticated connections require a connected app. For instructions, see Create an Authenticated Server-to-Server Connection.
1url --location --request POST
2'https://{Data_Cloud_instance_url}/server/events/{appSourceId}\
3--header 'Authorization: Bearer {access_token}' \
4--header 'Content-Type: application/json' \
5--data `{
6 "events": [
7 {
8 "eventId": "Event ID",
9 "dateTime": "Time stamp",
10 "sessionId": "Session ID",
11 "deviceId": "Device ID",
12 "eventType": "Event type",
13 "category": "Category"
14 }
15 ]
16}`You can include multiple event types in a request. For more information, see the recommended schema.
Note
| Parameter | Description |
|---|---|
eventId |
A unique ID for each event |
dateTime |
Timestamp must be in ISO8601 format YYYY-MM-DD'T'HH:mm:ss.SSS'Z' |
sessionId |
Same as the deviceId |
deviceId |
A unique ID, stored in a cookie, for the device from which the request is made |
eventType |
Contains the developerName value used in the definition of an event schema |
category |
Must be either profile or engagement |
| Code | Description |
|---|---|
204 |
No Content (payload posted) |
400 |
Bad Request |
401 |
Unauthorized |
500 |
Server Error |