{"_id":"58c8a4cae243022300e4aed5","parentDoc":null,"version":{"_id":"5472329e4f5baa0800199204","__v":8,"project":"5472329e4f5baa0800199201","createdAt":"2014-11-23T19:16:46.915Z","releaseDate":"2014-11-23T19:16:46.915Z","categories":["5472329f4f5baa0800199205","54726e8c4f5baa0800199239","54727c3b4f5baa0800199249","54daa4b86606ea0d0057a60b","54dadc51ee3b8419007e4627","55685a846976ef0d0099c73c","556dc7ede24c5a0d007034f3","5644f242d608df0d00d269f3"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"user":"547232594f5baa0800199200","project":"5472329e4f5baa0800199201","githubsync":"","__v":0,"category":{"_id":"54727c3b4f5baa0800199249","pages":["56898f1d5422830d0024ba8c"],"project":"5472329e4f5baa0800199201","version":"5472329e4f5baa0800199204","__v":1,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2014-11-24T00:30:51.036Z","from_sync":false,"order":3,"slug":"useriq-api","title":"UserIQ API"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-03-15T02:19:54.377Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[{"code":"https://secure.useriq.com/api/1.1/campaign/reset?api_key=572d7372829a3211a73d9c2cb790ffe3&user_id=1234&c_id=9876","language":"http"}]},"settings":"","results":{"codes":[]},"auth":"never","params":[{"_id":"56ae90195938fb0d00fdede3","ref":"","in":"body","required":false,"desc":"A valid, authorized UserIQ API access key.","default":"","type":"string","name":"api_key"},{"_id":"56ae90195938fb0d00fdede2","ref":"","in":"body","required":false,"desc":"The user_id of the user record to be updated with a campaign reset (Note: this should match the value passed in the UserIQ tracking code as 'user_id').","default":"","type":"string","name":"user_id"},{"_id":"56ae90195938fb0d00fdede1","ref":"","in":"body","required":false,"desc":"The UserIQ campaign ID","default":"","type":"string","name":"c_id"},{"_id":"56ae90195938fb0d00fdede0","ref":"","in":"body","required":false,"desc":"Redirect URL the user will be sent to","default":"","type":"string","name":"redirect"}],"url":"/campaign/reset"},"isReference":false,"order":2,"body":"The UserIQ Custom Event API gives development teams more control over event tracking in UserIQ. The UserIQ Custom Event API is available to customers with a valid API access token. \n[block:api-header]\n{\n  \"type\": \"post\",\n  \"title\": \"event/track\"\n}\n[/block]\nTracks a custom event in UserIQ.\n\n**Resource URL**\nhttps://api.useriq.com/api/1.0/event/track\n\n**Resource Information**\nRequest Type: POST\nResponse Format: JSON\n\n**Headers**\n\n1. **useriq-api-key (required)**: Your valid API key generated from the Site settings page\n\n**Parameters**\n\n1. **event_name (required)**\nThe name of the event to be tracked.\n*Example:* 'Created Project'\n\n1. **user_id (required)**\nThe user_id of the account to be updated with the associated custom data attribute (Note: this should match the value passed in the UserIQ tracking code as 'user_id').\n*Example:* 123\n\n1. **account_id (optional)**\nThe account_id of the account to be updated with the associated custom data attribute (Note: this should match the value passed in the UserIQ tracking code as 'account_id').\n*Example:* 123\n\n\n**Example Request:**\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"https://api.useriq.com/api/1.0/event/track?event_name=Registered&user_id=tony:::at:::starkindustries.com&account_id=1234\\n\\t-H\\n\\t\\tuseriq-api-key:572d7372829a3211a73d9c2cb790ffe3\",\n      \"language\": \"http\"\n    }\n  ]\n}\n[/block]\n\n** Example Result **\n{ \"result\":\"success\" }\n\n** Response Codes **\n200: OK. Request processed successfully\n400: Bad Request. API request could not be understood by the server.\n401: Unauthorized. Invalid API access token.","excerpt":"","slug":"useriq-custom-event-api","type":"basic","title":"UserIQ Custom Event API"}

UserIQ Custom Event API


The UserIQ Custom Event API gives development teams more control over event tracking in UserIQ. The UserIQ Custom Event API is available to customers with a valid API access token. [block:api-header] { "type": "post", "title": "event/track" } [/block] Tracks a custom event in UserIQ. **Resource URL** https://api.useriq.com/api/1.0/event/track **Resource Information** Request Type: POST Response Format: JSON **Headers** 1. **useriq-api-key (required)**: Your valid API key generated from the Site settings page **Parameters** 1. **event_name (required)** The name of the event to be tracked. *Example:* 'Created Project' 1. **user_id (required)** The user_id of the account to be updated with the associated custom data attribute (Note: this should match the value passed in the UserIQ tracking code as 'user_id'). *Example:* 123 1. **account_id (optional)** The account_id of the account to be updated with the associated custom data attribute (Note: this should match the value passed in the UserIQ tracking code as 'account_id'). *Example:* 123 **Example Request:** [block:code] { "codes": [ { "code": "https://api.useriq.com/api/1.0/event/track?event_name=Registered&user_id=tony@starkindustries.com&account_id=1234\n\t-H\n\t\tuseriq-api-key:572d7372829a3211a73d9c2cb790ffe3", "language": "http" } ] } [/block] ** Example Result ** { "result":"success" } ** Response Codes ** 200: OK. Request processed successfully 400: Bad Request. API request could not be understood by the server. 401: Unauthorized. Invalid API access token.