{"metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"never","params":[],"results":{"codes":[]},"try":true,"basic_auth":false},"next":{"description":"","pages":[]},"title":"A FEW QUICK STEPS FOR INTEGRATING FOR DIGEST EMAILS","type":"basic","slug":"a-few-quick-steps-for-integration","excerpt":"These are the basic steps for getting your integration started for your Digest emails\n\nSee our [Postman collection](http://api.knowtify.io/v1.0/docs/postman).","body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"1. Generate JSON structure\"\n}\n[/block]\nAfter you decide what data you want to pass to Knowtify - either usage data or data that you want to be included in your emails, you will need to create the JSON data structure. This should contain a list of your customers/users along with data associated with each. Here is a sample GIST for how this might look in a sample app:\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"https://gist.github.com/dskaletsky/82560be2a518f4a76297\",\n  \"title\": \"A sample JSON structure\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"2. Create post request script\"\n}\n[/block]\nNext you will set up a script to make a post request to our API with the JSON in the post body.\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Endpoint\",\n  \"body\": \"http://www.knowtify.io/api/v1/contacts/upsert\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"3. Include API token in header\"\n}\n[/block]\nInclude your API token in the header of the request. It should look like this...\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"API token authorization (sample)\",\n  \"body\": \"Authorization: Token token=\\\"9e000aa5045923be62748d6517798925\\\"\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"4. Schedule your script\"\n}\n[/block]\nFinally, you will schedule your script to run at least a few hours before the email is scheduled to go out.","updates":[],"order":4,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"5421d851f980dee664db9ffe","createdAt":"2014-09-23T20:30:09.629Z","version":{"version":"1.0","version_clean":"1.0.0","codename":"false","is_stable":true,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["53844558a43e08da4677be13","538619e1ef91f96d49aa1a0b","541e82877eb16bb64f83c0ca","5445a073c3eb3808000c76b2","5445a098c3eb3808000c76b3","54bb05ab522f03150054d9e8","54bb05cf9741c81500078f73","55b7d0e5568be2230092bb92"],"_id":"53844558a43e08da4677be12","__v":8,"releaseDate":"2014-05-27T07:57:12.136Z","createdAt":"2014-05-27T07:57:12.136Z","project":"53844557a43e08da4677be0e"},"__v":4,"is_link":false,"project":"53844557a43e08da4677be0e","category":{"sync":{"isSync":false,"url":""},"pages":["53844558a43e08da4677be14","54211ad2f980dee664db9fc5","54212689f980dee664db9fc9","5421d851f980dee664db9ffe","54504d643c6f700800a9b4de","548f7589a8f6730b004b34b3","554a9af6b4322819002b6a1b","55a44d8b1fd6fb0d00d6fb2a"],"title":"General API Documentation","slug":"general-api-documentation","order":0,"from_sync":false,"reference":false,"_id":"53844558a43e08da4677be13","createdAt":"2014-05-27T07:57:12.144Z","project":"53844557a43e08da4677be0e","version":"53844558a43e08da4677be12","__v":14},"githubsync":"","user":"5384345d90c19d5e43a8170c"}

A FEW QUICK STEPS FOR INTEGRATING FOR DIGEST EMAILS

These are the basic steps for getting your integration started for your Digest emails See our [Postman collection](http://api.knowtify.io/v1.0/docs/postman).

[block:api-header] { "type": "basic", "title": "1. Generate JSON structure" } [/block] After you decide what data you want to pass to Knowtify - either usage data or data that you want to be included in your emails, you will need to create the JSON data structure. This should contain a list of your customers/users along with data associated with each. Here is a sample GIST for how this might look in a sample app: [block:callout] { "type": "info", "body": "https://gist.github.com/dskaletsky/82560be2a518f4a76297", "title": "A sample JSON structure" } [/block] [block:api-header] { "type": "basic", "title": "2. Create post request script" } [/block] Next you will set up a script to make a post request to our API with the JSON in the post body. [block:callout] { "type": "info", "title": "Endpoint", "body": "http://www.knowtify.io/api/v1/contacts/upsert" } [/block] [block:api-header] { "type": "basic", "title": "3. Include API token in header" } [/block] Include your API token in the header of the request. It should look like this... [block:callout] { "type": "info", "title": "API token authorization (sample)", "body": "Authorization: Token token=\"9e000aa5045923be62748d6517798925\"" } [/block] [block:api-header] { "type": "basic", "title": "4. Schedule your script" } [/block] Finally, you will schedule your script to run at least a few hours before the email is scheduled to go out.