{"_id":"594a84a79c888700245092d0","project":"54aa7f773b56130b0056c86e","version":{"_id":"55781fe25129590d003ff4f7","project":"54aa7f773b56130b0056c86e","forked_from":"54aa7f773b56130b0056c871","__v":8,"createdAt":"2015-06-10T11:30:42.700Z","releaseDate":"2015-06-10T11:30:42.700Z","categories":["55781fe35129590d003ff4f8","55781fe35129590d003ff4f9","55781fe35129590d003ff4fa","55781fe35129590d003ff4fb","55781fe35129590d003ff4fc","55781fe35129590d003ff4fd","55781fe35129590d003ff4fe","564bbc7e8841060d00abb2ee","565b66c446118c0d00dcb0bb","56898269f8dc340d00308c13","582318b23b961a0f009516a1","594a848c9f4771001a43c959","5c73dd27e8fdc000572a206a","5c77ac5af94a920045cb80ca"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"Developers","version_clean":"2.0.0","version":"2.0"},"category":{"_id":"594a848c9f4771001a43c959","project":"54aa7f773b56130b0056c86e","version":"55781fe25129590d003ff4f7","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2017-06-21T14:37:00.910Z","from_sync":false,"order":2,"slug":"pulsate-sdk-api","title":"Pulsate SDK API"},"user":"5874dcd9edcf9f2f00f9e0af","githubsync":"","__v":9,"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-06-21T14:37:27.210Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[{"language":"shell","code":"curl -X POST \"https://app.pulsatehq.com/api/mobile/v2/general/send_in_app_events\" \\\n  -H \"Authorization: Token token=$MY_SDK_ACCESS_TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n\t\"alias\": \"sample_alias\",\n\t\"guid\": \"sample_guid\",\n\t\"in_app_events\": [\n\t\t{\n\t\t\t\"name\": \"sample_event\",\n\t\t\t\"occurred_at\": 1498057805\n\t\t}\n\t]\n}'","name":""}]},"settings":"594a8971f84635001a1f2004","results":{"codes":[]},"method":"post","auth":"required","params":[{"_id":"594a8f95ab684b001a56dfd6","ref":"","in":"body","required":true,"desc":"Alias of the user","default":"","type":"string","name":"alias"},{"_id":"594a8f95ab684b001a56dfd5","ref":"","in":"body","required":true,"desc":"Guid of the users device","default":"","type":"string","name":"guid"},{"_id":"594a8f95ab684b001a56dfd4","ref":"","in":"body","required":true,"desc":"Array of In App Events hash","default":"","type":"array_object","name":"in_app_events"},{"_id":"594a8f95ab684b001a56dfd3","ref":"","in":"body","required":true,"desc":"Name of In App Event","default":"","type":"string","name":"in_app_events[][name]"},{"_id":"594a8f95ab684b001a56dfd2","ref":"","in":"body","required":true,"desc":"When In App Event happened as a seconds from 1970-01-01","default":"","type":"int","name":"in_app_events[][occurred_at]"}],"url":"/general/send_in_app_events"},"isReference":false,"order":0,"body":"[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Alias or Device GUID\",\n  \"body\": \"Please note that if you set the customer's alias, this API endpoint requires either the Puslate device GUID or the user's alias, not both. For more information on deduping and setting an alias for a user, please see our guides on [Android](https://pulsate.readme.io/docs/android-deduping-setting-the-customers-alias) and [iOS](https://pulsate.readme.io/docs/deduping-setting-the-customers-alias).\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"Access Token\",\n  \"body\": \"Please note that the Access Token required for this endpoint is the SDK Access Token and not the Admin Access Token that is used for the CMS API endpoints. To access the SDK Access Token, click on Settings in the Pulsate Dashboard and then App Settings. Scroll to the bottom of this page to a block called SDK Access that contains the SDK Access Token. Make sure you include \\\"Token token=$MY_SDK_ACCESS_TOKEN\\\".\"\n}\n[/block]","excerpt":"","slug":"events_create","type":"endpoint","title":"Events: Create"}

postEvents: Create


Definition

{{ api_url }}{{ page_api_url }}

Parameters

Body Params

alias:
required
string
Alias of the user
guid:
required
string
Guid of the users device
in_app_events:
required
array of objects
Array of In App Events hash
in_app_events[][name]:
required
string
Name of In App Event
in_app_events[][occurred_at]:
required
integer
When In App Event happened as a seconds from 1970-01-01

Examples


Documentation

[block:callout] { "type": "info", "title": "Alias or Device GUID", "body": "Please note that if you set the customer's alias, this API endpoint requires either the Puslate device GUID or the user's alias, not both. For more information on deduping and setting an alias for a user, please see our guides on [Android](https://pulsate.readme.io/docs/android-deduping-setting-the-customers-alias) and [iOS](https://pulsate.readme.io/docs/deduping-setting-the-customers-alias)." } [/block] [block:callout] { "type": "warning", "title": "Access Token", "body": "Please note that the Access Token required for this endpoint is the SDK Access Token and not the Admin Access Token that is used for the CMS API endpoints. To access the SDK Access Token, click on Settings in the Pulsate Dashboard and then App Settings. Scroll to the bottom of this page to a block called SDK Access that contains the SDK Access Token. Make sure you include \"Token token=$MY_SDK_ACCESS_TOKEN\"." } [/block]

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}