{"_id":"5abec3a22ce15c0058d88909","project":"55208137623ff50d009b2bec","version":{"_id":"55208137623ff50d009b2bef","__v":14,"project":"55208137623ff50d009b2bec","createdAt":"2015-04-05T00:26:31.564Z","releaseDate":"2015-04-05T00:26:31.563Z","categories":["55208138623ff50d009b2bf0","55494a226a82a10d00817ae5","55494ba7ee219b0d001743c8","55494bc1ee219b0d001743cc","56ead8c1df765617008bccaf","573a2073dd007d1700cf288f","579695b1f64c9f0e007cd76c","57969e3dfa1ff60e006a1274","579a4592fd9f3c0e008e4f4a","57ab9afe54fa780e006c5430","57b784f5b7ebd60e009cb4a6","58f686818193090f008cec76","59e79fbd4cf31900341d50c6","5b2436973fd93f0003dcf99d"],"is_deprecated":false,"is_hidden":false,"is_beta":true,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"category":{"_id":"55494a226a82a10d00817ae5","project":"55208137623ff50d009b2bec","version":"55208137623ff50d009b2bef","__v":15,"pages":["55494ad0ee219b0d001743bb","55494b05f452670d00ec0c29","55494b11ee219b0d001743bf","55494b20ee219b0d001743c1","55494b2bee219b0d001743c3","55494b4a6a82a10d00817af5","55494b686a82a10d00817af9","5549651ccd09b317005f8f50","55497273cd09b317005f8f86","554977f0c634cf2d001250a7","55b970eab42b610d00c9b2e3","5696f3688560a60d00e2c216","5696f91c59a6692d003fad50","5696f92c24490c3700170a2d","5696f9700b09a41900b24422"],"sync":{"url":"","isSync":false},"reference":true,"createdAt":"2015-05-05T22:54:26.925Z","from_sync":false,"order":2,"slug":"public-api","title":"Public API"},"user":"59e51455df6835002e0f0f8f","githubsync":"","__v":6,"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-03-30T23:09:22.787Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","examples":{"codes":[{"code":"curl 'https://www.sendsonar.com/api/v1/events' \\\n  -X POST \\\n  -H 'X-Token:XXXXXXXXXXXXXXXXXXXXXXXX' \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"phone_number\": \"+13105551234\", \"type\": \"conversion\", \"event_properties\": {\"name\": \"Online Store Purchase\", \"value\": 25.00}}'\n","language":"curl","name":"Example via Phone Number"},{"code":"curl 'https://www.sendsonar.com/api/v1/events' \\\n  -X POST \\\n  -H 'X-Token:XXXXXXXXXXXXXXXXXXXXXXXX' \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"email\": \"matt:::at:::sendsonar.com\", \"type\": \"conversion\", \"event_properties\": {\"name\": \"Online Store Purchase\", \"value\": 25.00}}'","language":"curl","name":"Example via Email"}]},"method":"post","auth":"required","params":[{"_id":"5abec791a87acc0043388b58","ref":"","in":"body","required":false,"desc":"The email of your customer","default":"test@sendsonar.com","type":"string","name":"email"},{"_id":"5abec791a87acc0043388b57","ref":"","in":"body","required":false,"desc":"The phone number of your customer","default":"+13105551234","type":"string","name":"phone_number"},{"_id":"5abec791a87acc0043388b56","ref":"","in":"body","required":true,"desc":"The event type. Must be a valid type (currently only \"conversion\". Custom types will be supported in the future.)","default":"conversion","type":"string","name":"type"},{"_id":"5abec791a87acc0043388b55","ref":"","in":"body","required":false,"desc":"State the name of your conversion and the value","default":"\"name\": \"Online Store Purchase\", \"value\": 25.00","type":"object","name":"event_properties"}],"url":"/events"},"isReference":true,"order":11,"body":"[block:api-header]\n{\n  \"title\": \"Conversions\"\n}\n[/block]\nConversions now allow our partners to define conversion events that can be tracked either from your system or within Sonar (lead bot, Calendly integration, etc).  This endpoint can either use a customer's phone number or email address to associate a conversion with that individual.","excerpt":"","slug":"conversion","type":"endpoint","title":"Custom Tracking Events"}

postCustom Tracking Events


Definition

{{ api_url }}{{ page_api_url }}

Parameters

Body Params

email:
stringtest@sendsonar.com
The email of your customer
phone_number:
string+13105551234
The phone number of your customer
type:
required
stringconversion
The event type. Must be a valid type (currently only "conversion". Custom types will be supported in the future.)
event_properties:
object"name": "Online Store Purchase", "value": 25.00
State the name of your conversion and the value

Examples


Documentation

[block:api-header] { "title": "Conversions" } [/block] Conversions now allow our partners to define conversion events that can be tracked either from your system or within Sonar (lead bot, Calendly integration, etc). This endpoint can either use a customer's phone number or email address to associate a conversion with that individual.