{"info":{"_postman_id":"9cc6b4ee-80dd-491c-af86-7cdebea435b6","name":"Selgora API Collection","description":"#Authorization\n\nTo access Selgora APIs you need to provide the API Key as a header (X-API-KEY) or as a query parameter (?apiKey=<yourApiKey>).\n\nTo find your API key, login to Selgora's Panel and:\n1. Select Teams from menu.\n2. Select your team from the table by clicking on the team name.\n3. The api key will appear at the top of the page.\n\nReplace {{HOST}} with https://app.selgora.com in all of your requests.","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json"},"item":[{"name":"Customer","item":[{"name":"Get customer data","id":"8073d73e-f105-410e-9df1-d40c22e03e66","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth"},"method":"GET","header":[{"key":"X-API-KEY","value":"3645a8a3-5b83-459a-9bea-0eb53e4d8eaf","description":"API Key","type":"text"}],"url":{"raw":"{{HOST}}/api/1.0/customer/:email/{{debug}}","host":["{{HOST}}"],"path":["api","1.0","customer",":email","{{debug}}"],"variable":[{"key":"email","value":"george.olah@selgora.com","type":"string","description":"Customer email"}]},"description":"Request the data for a customer."},"response":[{"id":"61456082-9054-49cd-89dc-189ea99dc56a","name":"Get a customer data","originalRequest":{"method":"GET","header":[{"key":"X-API-KEY","value":"3645a8a3-5b83-459a-9bea-0eb53e4d8eaf","description":"API Key","type":"text"}],"url":"{{HOST}}/api/1.0/customer/george.olah@selgora.com{{debug}}"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 19 Jul 2019 13:01:48 GMT"},{"key":"Server","value":"Apache/2.4.25 (Debian)"},{"key":"Cache-Control","value":"no-cache, private"},{"key":"X-Debug-Token","value":"64e42b"},{"key":"X-Debug-Token-Link","value":"http://localhost/_profiler/64e42b"},{"key":"X-Robots-Tag","value":"noindex"},{"key":"Set-Cookie","value":"XDEBUG_SESSION=PHP_STORM; expires=Fri, 19-Jul-2019 14:01:47 GMT; Max-Age=3600; path=/"},{"key":"Vary","value":"Authorization"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"name\": \"George\",\n    \"email\": \"george.olah@selgora.com\",\n    \"signupDate\": \"1924-06-19 00:00:00\",\n    \"pricingPlan\": \"gold\",\n    \"lastloginDate\": \"2019-06-24 00:00:00\"\n}"},{"id":"a5733222-ff4e-4fd5-890a-f32d9db9ef62","name":"404  Customer was not found","originalRequest":{"method":"GET","header":[{"key":"X-API-KEY","value":"3645a8a3-5b83-459a-9bea-0eb53e4d8eaf","description":"API Key","type":"text"}],"url":{"raw":"{{HOST}}/api/1.0/customer/:email/{{debug}}","host":["{{HOST}}"],"path":["api","1.0","customer",":email","{{debug}}"],"variable":[{"key":"email","value":"george.olah@selgora.com","description":"Customer email"}]}},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 19 Jul 2019 13:16:59 GMT"},{"key":"Server","value":"Apache/2.4.25 (Debian)"},{"key":"Cache-Control","value":"no-cache, private"},{"key":"X-Debug-Token","value":"3a95bc"},{"key":"X-Debug-Token-Link","value":"http://localhost/_profiler/3a95bc"},{"key":"X-Robots-Tag","value":"noindex"},{"key":"Set-Cookie","value":"XDEBUG_SESSION=PHP_STORM; expires=Fri, 19-Jul-2019 14:16:59 GMT; Max-Age=3600; path=/"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"Customer with email :email was not found.\"\n}"}],"_postman_id":"8073d73e-f105-410e-9df1-d40c22e03e66"},{"name":"Create or Update Customer","id":"db8c3227-d90e-4e74-8449-df53c74af95a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"x-api-key","value":"3645a8a3-5b83-459a-9bea-0eb53e4d8eaf","type":"text"}],"body":{"mode":"formdata","formdata":[{"key":"signupDate","value":"2019-07-07 12:22:22","type":"text"},{"key":"projects","value":"4","type":"text"},{"key":"tasks","value":"15","type":"text"},{"key":"hasFinishedOnboarding","value":"0","type":"text"},{"key":"name","value":"George","type":"text"}]},"url":{"raw":"{{HOST}}/api/1.0/customer/:email/{{debug}}","host":["{{HOST}}"],"path":["api","1.0","customer",":email","{{debug}}"],"variable":[{"key":"email","value":"name@yourcompany.com","type":"string"}]},"description":"Create a new customer or update an existing one. \n\nYou need to provide the 'email' parameter every time, because the email is used as a unique identified between all import sources (API, interface, integrations etc.).\n\nIf the email can not be found for the team that has this API key, a new customer will be created.\n\nProvide all parameters in key:value pairs. You can provide as many parameters as you need, from different data points.\n\nWe consider very important for the success of your campaigns to send at least an event when the customer is created (your signup page) and when he logs in.\n\nOn signup, please send an array that contains this parameters:\n* email\n* name or firstName, lastName = will be very useful when you want to personalize your communication with the customer\n* signupDate = in date format (i.e. 2019-08-05 22:02:01)\n* pricingPlan = one of the plans you provided in your Team settings (this will be used to calculate conversitions)\n\nAfter login, please send:\n* email\n* lastLoginDate = the date the customer logged in in date format (i.e. 2019-08-05 23:00:15)"},"response":[{"id":"24d76fbc-aa3c-43d5-aecf-9fbd800b33d5","name":"Create Customer","originalRequest":{"method":"POST","header":[{"key":"x-api-key","value":"3645a8a3-5b83-459a-9bea-0eb53e4d8eaf","type":"text"}],"body":{"mode":"formdata","formdata":[{"key":"signupDate","value":"2019-07-07 12:22:22","type":"text"},{"key":"projects","value":"4","type":"text"},{"key":"tasks","value":"15","type":"text"},{"key":"hasFinishedOnboarding","value":"0","type":"text"},{"key":"name","value":"George","type":"text"}]},"url":{"raw":"{{HOST}}/api/1.0/customer/:email{{debug}}","host":["{{HOST}}"],"path":["api","1.0","customer",":email{{debug}}"],"variable":[{"key":"email","value":"name@yourcompany.com"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 29 Jul 2019 06:36:09 GMT"},{"key":"Server","value":"Apache/2.4.25 (Debian)"},{"key":"Cache-Control","value":"no-cache, private"},{"key":"X-Debug-Token","value":"3af057"},{"key":"X-Debug-Token-Link","value":"http://localhost/_profiler/3af057"},{"key":"X-Robots-Tag","value":"noindex"},{"key":"Set-Cookie","value":"XDEBUG_SESSION=PHP_STORM; expires=Mon, 29-Jul-2019 07:36:09 GMT; Max-Age=3600; path=/"},{"key":"Vary","value":"Authorization"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"email\": \":email\",\n    \"signupDate\": \"2007-07-19 12:22:00\",\n    \"projects\": \"4\",\n    \"tasks\": \"15\",\n    \"hasFinishedOnboarding\": \"0\",\n    \"name\": \"George\"\n}"},{"id":"bc2f2b4a-1c76-4763-bab8-a40f14e0bb9b","name":"Create Customer","originalRequest":{"method":"POST","header":[{"key":"x-api-key","value":"3645a8a3-5b83-459a-9bea-0eb53e4d8eaf","type":"text"}],"body":{"mode":"formdata","formdata":[{"key":"signupDate","value":"2019-07-07 12:22:22","type":"text"},{"key":"projects","value":"4","type":"text"},{"key":"tasks","value":"15","type":"text"},{"key":"hasFinishedOnboarding","value":"0","type":"text"},{"key":"name","value":"George","type":"text"}]},"url":{"raw":"{{HOST}}/api/1.0/customer/:email{{debug}}","host":["{{HOST}}"],"path":["api","1.0","customer",":email{{debug}}"],"variable":[{"key":"email","value":"name@yourcompany.com"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 29 Jul 2019 06:36:09 GMT"},{"key":"Server","value":"Apache/2.4.25 (Debian)"},{"key":"Cache-Control","value":"no-cache, private"},{"key":"X-Debug-Token","value":"3af057"},{"key":"X-Debug-Token-Link","value":"http://localhost/_profiler/3af057"},{"key":"X-Robots-Tag","value":"noindex"},{"key":"Set-Cookie","value":"XDEBUG_SESSION=PHP_STORM; expires=Mon, 29-Jul-2019 07:36:09 GMT; Max-Age=3600; path=/"},{"key":"Vary","value":"Authorization"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"email\": \":email\",\n    \"signupDate\": \"2007-07-19 12:22:00\",\n    \"projects\": \"4\",\n    \"tasks\": \"15\",\n    \"hasFinishedOnboarding\": \"0\",\n    \"name\": \"George\"\n}"}],"_postman_id":"db8c3227-d90e-4e74-8449-df53c74af95a"},{"name":"Delete a customer","id":"08aea55e-6602-4294-bb14-1a450aabfc7c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"X-API-KEY","value":"3645a8a3-5b83-459a-9bea-0eb53e4d8eaf","type":"text"}],"url":{"raw":"{{HOST}}/api/1.0/customer/:email/{{debug}}","host":["{{HOST}}"],"path":["api","1.0","customer",":email","{{debug}}"],"variable":[{"key":"email","value":"someval2u3e@selgora.com","type":"string"}]},"description":"Delete one customer by email address."},"response":[{"id":"acbae7de-bf06-4c4b-8228-4684bf9181bd","name":"Delete a customer","originalRequest":{"method":"DELETE","header":[{"key":"X-API-KEY","value":"3645a8a3-5b83-459a-9bea-0eb53e4d8eaf","type":"text"}],"url":{"raw":"{{HOST}}/api/1.0/customer/:email/{{debug}}","host":["{{HOST}}"],"path":["api","1.0","customer",":email","{{debug}}"],"variable":[{"key":"email","value":"someval2u3e@selgora.com"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 29 Jul 2019 07:19:59 GMT"},{"key":"Server","value":"Apache/2.4.25 (Debian)"},{"key":"Cache-Control","value":"no-cache, private"},{"key":"X-Debug-Token","value":"b50e09"},{"key":"X-Debug-Token-Link","value":"http://localhost/_profiler/b50e09"},{"key":"X-Robots-Tag","value":"noindex"},{"key":"Set-Cookie","value":"XDEBUG_SESSION=PHP_STORM; expires=Mon, 29-Jul-2019 08:19:17 GMT; Max-Age=3600; path=/"},{"key":"Vary","value":"Authorization"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true\n}"}],"_postman_id":"08aea55e-6602-4294-bb14-1a450aabfc7c"}],"id":"455499ce-1a76-49a5-9007-1b7febcbee38","description":"APIs that read, create, update or delete a single customer.","_postman_id":"455499ce-1a76-49a5-9007-1b7febcbee38"},{"name":"Customers","item":[{"name":"Get a list of customers","id":"6c76e35f-d15b-4f9c-ae3e-2bb8c15ab064","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"x-api-key","value":"3645a8a3-5b83-459a-9bea-0eb53e4d8eaf","type":"text"},{"key":"Content-Type","name":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"}],"body":{"mode":"raw","raw":""},"url":{"raw":"{{HOST}}/api/1.0/customers?startingFrom=15&itemsPerPage=5","host":["{{HOST}}"],"path":["api","1.0","customers"],"query":[{"key":"startingFrom","value":"15"},{"key":"itemsPerPage","value":"5"}]},"description":"Get a list of customers, with pagination.\n\nUse startingFrom and itemsPerPage GET parameters to paginate your data. The default value for itemsPerPage is 50, meaning it will display 50 customers."},"response":[{"id":"1bc7b2a0-c090-43d3-8825-f4994d87115d","name":"Get a list of customers","originalRequest":{"method":"GET","header":[{"key":"x-api-key","value":"3645a8a3-5b83-459a-9bea-0eb53e4d8eaf","type":"text"}],"url":{"raw":"{{HOST}}/api/1.0/customers?startingFrom=15&itemsPerPage=5","host":["{{HOST}}"],"path":["api","1.0","customers"],"query":[{"key":"startingFrom","value":"15"},{"key":"itemsPerPage","value":"5"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 29 Jul 2019 12:03:44 GMT"},{"key":"Server","value":"Apache/2.4.25 (Debian)"},{"key":"Cache-Control","value":"no-cache, private"},{"key":"X-Debug-Token","value":"a62f26"},{"key":"X-Debug-Token-Link","value":"http://localhost/_profiler/a62f26"},{"key":"X-Robots-Tag","value":"noindex"},{"key":"Vary","value":"Authorization"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"metadata\": {\n        \"numberOfResults\": 112,\n        \"startingFrom\": \"15\",\n        \"itemsPerPage\": \"5\",\n        \"nextPageUrl\": \"http://localhost/api/1.0/customers?startingFrom=20&itemsPerPage=5\"\n    },\n    \"results\": [\n        {\n            \"name\": \"Mr. Buck Torp\",\n            \"email\": \"lemke.gilberto@hotmail.com\",\n            \"lastloginDate\": \"2019-05-06 23:11:42\",\n            \"pricingPlan\": \"gold\"\n        },\n        {\n            \"name\": \"Jarrod Huels\",\n            \"email\": \"schroeder.dennis@moore.com\",\n            \"signupDate\": \"2019-05-22 18:56:41\",\n            \"convertedToPaidDate\": \"2019-04-30 02:13:31\",\n            \"lastloginDate\": \"2019-06-01 14:26:20\",\n            \"pricingPlan\": \"gold\"\n        },\n        {\n            \"name\": \"Tito Nicolas\",\n            \"email\": \"lbailey@hotmail.com\",\n            \"lastloginDate\": \"2019-05-13 20:50:21\",\n            \"pricingPlan\": \"bronze\"\n        },\n        {\n            \"name\": \"Cara Cummings\",\n            \"email\": \"west.kiarra@gmail.com\",\n            \"signupDate\": \"2019-05-10 21:39:25\",\n            \"convertedToPaidDate\": \"2019-05-26 10:43:11\",\n            \"lastloginDate\": \"2019-04-27 18:40:40\",\n            \"pricingPlan\": \"trial\"\n        },\n        {\n            \"name\": \"Dylan Herzog MD\",\n            \"email\": \"aswaniawski@lebsack.com\",\n            \"lastloginDate\": \"2019-05-01 12:09:09\",\n            \"pricingPlan\": \"bronze\"\n        }\n    ]\n}"}],"_postman_id":"6c76e35f-d15b-4f9c-ae3e-2bb8c15ab064"},{"name":"Batch Create/Update Customers","id":"48abcfe2-a1d1-48d3-a94c-5240773ea1dc","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"},{"key":"x-api-key","value":"3645a8a3-5b83-459a-9bea-0eb53e4d8eaf","type":"text"}],"body":{"mode":"raw","raw":"[{\"email\":\"george.olah@selgora.com\",\"signupDate\":\"2019-07-19 12:22:00\",\"projects\":\"3\",\"tasks\":\"15\",\"hasFinishedOnboarding\":\"0\",\"name\":\"George\"},{\"email\":\"mycustomer@gmail.com\",\"signupDate\":\"2019-05-17 14:22:00\",\"campaigns\":\"2\",\"emailsSent\":\"1504\",\"hasFinishedOnboarding\":\"0\",\"name\":\"George\",\"secondary_email\":\"personal@yahoo.com\"}]"},"url":"{{HOST}}/api/1.0/customers{{debug}}","description":"Create or modify one or more customers by providing an array of customers.\n\nEach customer array must include the email address, used as a unique identifier between all your data sources (API, interface, integrations) and a list of 'key: value' pairs containing the attribute you want to create/update.\n\nThe API will return a list with all the saved customers with their attributes. If a customer is not in the list, most probably the email attribute is missing."},"response":[{"id":"e368f089-49bc-4039-9684-b86046d6433f","name":"Batch Create/Update Customers","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"},{"key":"x-api-key","value":"3645a8a3-5b83-459a-9bea-0eb53e4d8eaf","type":"text"}],"body":{"mode":"raw","raw":"[{\"email\":\"george.olah@selgora.com\",\"signupDate\":\"2019-07-19 12:22:00\",\"projects\":\"3\",\"tasks\":\"15\",\"hasFinishedOnboarding\":\"0\",\"name\":\"George\"},{\"email\":\"mycustomer@gmail.com\",\"signupDate\":\"2019-05-17 14:22:00\",\"campaigns\":\"2\",\"emailsSent\":\"1504\",\"hasFinishedOnboarding\":\"0\",\"name\":\"George\",\"secondary_email\":\"personal@yahoo.com\"}]"},"url":"{{HOST}}/api/1.0/customers{{debug}}"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 29 Jul 2019 09:25:39 GMT"},{"key":"Server","value":"Apache/2.4.25 (Debian)"},{"key":"Cache-Control","value":"no-cache, private"},{"key":"X-Debug-Token","value":"8190b5"},{"key":"X-Debug-Token-Link","value":"http://localhost/_profiler/8190b5"},{"key":"X-Robots-Tag","value":"noindex"},{"key":"Set-Cookie","value":"XDEBUG_SESSION=PHP_STORM; expires=Mon, 29-Jul-2019 10:25:39 GMT; Max-Age=3600; path=/"},{"key":"Vary","value":"Authorization"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"[\n    {\n        \"name\": \"George\",\n        \"email\": \"george.olah@selgora.com\",\n        \"signupDate\": \"2019-07-19 12:22:00\",\n        \"pricingPlan\": \"gold\",\n        \"lastloginDate\": \"2019-06-24 00:00:00\",\n        \"projects\": \"3\",\n        \"tasks\": \"15\",\n        \"hasFinishedOnboarding\": \"0\"\n    },\n    {\n        \"email\": \"mycustomer@gmail.com\",\n        \"signupDate\": \"2017-05-19 14:22:00\",\n        \"campaigns\": \"2\",\n        \"emailsSent\": \"1504\",\n        \"hasFinishedOnboarding\": \"0\",\n        \"name\": \"George\",\n        \"secondary_email\": \"personal@yahoo.com\"\n    }\n]"}],"_postman_id":"48abcfe2-a1d1-48d3-a94c-5240773ea1dc"},{"name":"Batch Delete Customers","id":"9682f784-a8a6-4cc9-8881-4f3069cc33e6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"x-api-key","value":"3645a8a3-5b83-459a-9bea-0eb53e4d8eaf","type":"text"},{"key":"Content-Type","name":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"}],"body":{"mode":"raw","raw":"{\"emails\":[\"george.olah@selgora.com\",\"hello@selgora.com\"]}"},"url":"{{HOST}}/api/1.0/customers{{debug}}","description":"Delete a list of customers by their email address."},"response":[{"id":"1009ce96-933c-4e81-9062-309ddb20fd44","name":"Batch Delete Customers","originalRequest":{"method":"DELETE","header":[{"key":"x-api-key","value":"3645a8a3-5b83-459a-9bea-0eb53e4d8eaf","type":"text"},{"key":"Content-Type","name":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"}],"body":{"mode":"raw","raw":"{\"emails\":[\"george.olah@selgora.com\",\"hello@selgora.com\"]}"},"url":"{{HOST}}/api/1.0/customers{{debug}}"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 29 Jul 2019 10:33:23 GMT"},{"key":"Server","value":"Apache/2.4.25 (Debian)"},{"key":"Cache-Control","value":"no-cache, private"},{"key":"X-Debug-Token","value":"63ea34"},{"key":"X-Debug-Token-Link","value":"http://localhost/_profiler/63ea34"},{"key":"X-Robots-Tag","value":"noindex"},{"key":"Set-Cookie","value":"XDEBUG_SESSION=PHP_STORM; expires=Mon, 29-Jul-2019 11:33:16 GMT; Max-Age=3600; path=/"},{"key":"Vary","value":"Authorization"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"deletedCustomers\": [],\n    \"couldNotDelete\": [\n        \"george.olah@selgora.com\",\n        \"hello@selgora.com\"\n    ]\n}"}],"_postman_id":"9682f784-a8a6-4cc9-8881-4f3069cc33e6"}],"id":"56f0fdba-d644-4b7e-a471-cc790eb80bee","description":"APIs that act on more than one customer. Bulk delete, batch create/update or get customers list with pagination and filtering.","_postman_id":"56f0fdba-d644-4b7e-a471-cc790eb80bee"},{"name":"Events","item":[{"name":"Create event","id":"80fc0588-a978-4830-b44c-9fc70dd4d5b2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"x-api-key","value":"3645a8a3-5b83-459a-9bea-0eb53e4d8eaf","type":"text"}],"body":{"mode":"raw","raw":"{\n\"key\": \"Here can be any json that makes sense for you such\",\n\"trigger\": \"Can be triggered when an event is happening in your system for a given user, such as task created, order complete, etc.\",\n\"key2\":[\n{\"key3\":\"can have arrays and multilevel elements in it\"}\n],\n\"key4\":\"Each element can be used in campaigns & automation flows ({{event.body.key}}) and will be replaced with its value.\",\n\"hello\": \"Enjoy life!\"\n}"},"url":{"raw":"{{HOST}}/api/1.0/events/:eventName/:customerEmail/:externalId/{{debug}}","host":["{{HOST}}"],"path":["api","1.0","events",":eventName",":customerEmail",":externalId","{{debug}}"],"variable":[{"key":"eventName","value":"task.created","type":"string"},{"key":"customerEmail","value":"george.olah@selgora.com","type":"string"},{"key":"externalId","value":"3321","type":"string"}]},"description":"Send an event in Selgora that will trigger a campaign for a customer.\n\nAll the events you send here can be used in campaigns. You can send events such as: task created, order started, order complete, campaign created etc.\n\nTo use events in campaigns follow this process:\n1. Create an event. \n* When a new event is created, we check if an event of that type (that eventName) has been created before. If no, then we create an event type.\n* Create a new campaign from the admin panel and set as trigger \"Start when event occurs\"\n* Select from the events dropdown the event with this name\n* Save\n* Now, when a new event is sent through this API for the given customer, the campaign is triggered and the customer enters starts the journey through that campaign.\n\nIf the customerEmail does not exist for this team, then it will be created. You don't need to worry about failing to save events because of this."},"response":[{"id":"2dd9c632-d44f-4bf9-875b-e2dd96fe239f","name":"Create event","originalRequest":{"method":"POST","header":[{"key":"x-api-key","value":"3645a8a3-5b83-459a-9bea-0eb53e4d8eaf","type":"text"}],"body":{"mode":"raw","raw":"{\n\"key\": \"Here can be any json that makes sense for you such\",\n\"trigger\": \"Can be triggered when an event is happening in your system for a given user, such as task created, order complete, etc.\",\n\"key2\":[\n{\"key3\":\"can have arrays and multilevel elements in it\"}\n],\n\"key4\":\"Each element can be used in campaigns as key2.key3 and will be replaced with its value.\",\n\"hello\": \"Enjoy life!\"\n}"},"url":{"raw":"{{HOST}}/api/1.0/events/:eventName/:customerEmail/:externalId/{{debug}}","host":["{{HOST}}"],"path":["api","1.0","events",":eventName",":customerEmail",":externalId","{{debug}}"],"variable":[{"key":"eventName","value":"task.created"},{"key":"customerEmail","value":"george.olah@selgora.com"},{"key":"externalId","value":"3321"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 20 Aug 2019 06:13:47 GMT"},{"key":"Server","value":"Apache/2.4.25 (Debian)"},{"key":"Cache-Control","value":"no-cache, private"},{"key":"X-Debug-Token","value":"3b936f"},{"key":"X-Debug-Token-Link","value":"http://localhost/_profiler/3b936f"},{"key":"X-Robots-Tag","value":"noindex"},{"key":"Set-Cookie","value":"XDEBUG_SESSION=PHP_STORM; expires=Tue, 20-Aug-2019 07:13:46 GMT; Max-Age=3600; path=/"},{"key":"Vary","value":"Authorization"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"id\": 2,\n    \"eventName\": \"task.created\",\n    \"externalId\": \"3321\",\n    \"body\": {\n        \"key\": \"Here can be any json that makes sense for you such\",\n        \"trigger\": \"Can be triggered when an event is happening in your system for a given user, such as task created, order complete, etc.\",\n        \"key2\": [\n            {\n                \"key3\": \"can have arrays and multilevel elements in it\"\n            }\n        ],\n        \"key4\": \"Each element can be used in campaigns as key2.key3 and will be replaced with its value.\",\n        \"hello\": \"Enjoy life!\"\n    }\n}"}],"_postman_id":"80fc0588-a978-4830-b44c-9fc70dd4d5b2"}],"id":"677d33f2-00d6-4cbd-abeb-cef61111922d","description":"Send events from your app that will trigger campaigns in Selgora.","_postman_id":"677d33f2-00d6-4cbd-abeb-cef61111922d"}],"auth":{"type":"bearer","bearer":{"token":"test"}}}