{"_id":"538cf4ac3325b9e6626b5896","comments":[],"tags":[],"user":"5384345d90c19d5e43a8170c","__v":3,"project":"53844557a43e08da4677be0e","version":{"_id":"53844558a43e08da4677be12","__v":8,"project":"53844557a43e08da4677be0e","createdAt":"2014-05-27T07:57:12.136Z","releaseDate":"2014-05-27T07:57:12.136Z","categories":["53844558a43e08da4677be13","538619e1ef91f96d49aa1a0b","541e82877eb16bb64f83c0ca","5445a073c3eb3808000c76b2","5445a098c3eb3808000c76b3","54bb05ab522f03150054d9e8","54bb05cf9741c81500078f73","55b7d0e5568be2230092bb92"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"false","version_clean":"1.0.0","version":"1.0"},"category":{"_id":"541e82877eb16bb64f83c0ca","version":"53844558a43e08da4677be12","__v":1,"pages":["538cf51a3325b9e6626b5897","538cfd183325b9e6626b5898","538cf4ac3325b9e6626b5896","53daa04f971607581f86ea2e","560332f790ee490d004403ac"],"project":"53844557a43e08da4677be0e","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2014-09-21T07:47:19.722Z","from_sync":false,"order":4,"slug":"libraries","title":"Libraries"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2014-06-02T22:03:24.138Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":2,"body":"[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"# Send Knowtify global data\\ncurl -i \\\\\\n  -H \\\"Authorization: Token token=KNOWTIFY_TOKEN\\\"\\\\\\n  -H \\\"Content-Type: application/json\\\"\\\\\\n  -X POST \\\\\\n  -d '{\\\"data\\\":{ \\\"test_key\\\":\\\"Test Value\\\" }}' \\\\\\n  http://www.knowtify.io/api/v1/data/edit\\n\\n\\n# Add a contact\\ncurl -i \\\\\\n  -H \\\"Authorization: Token token=KNOWTIFY_TOKEN\\\"\\\\\\n  -H \\\"Content-Type: application/json\\\"\\\\\\n  -X POST \\\\\\n  -d '{\\\"contacts\\\":[ {\\\"name\\\":\\\"Tom\\\",\\\"email\\\":\\\"tom:::at:::test.com\\\",\\\"data\\\":{ \\\"test_key\\\":\\\"Test Value\\\" }} ]}' \\\\\\n  http://www.knowtify.io/api/v1/contacts/add\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]","excerpt":"Shows how to connect to the Knowtify API using cURL.","slug":"curl-test-for-api","type":"basic","title":"A cURL Test for connecting with the Knowtify API"}

A cURL Test for connecting with the Knowtify API

Shows how to connect to the Knowtify API using cURL.

[block:code] { "codes": [ { "code": "# Send Knowtify global data\ncurl -i \\\n -H \"Authorization: Token token=KNOWTIFY_TOKEN\"\\\n -H \"Content-Type: application/json\"\\\n -X POST \\\n -d '{\"data\":{ \"test_key\":\"Test Value\" }}' \\\n http://www.knowtify.io/api/v1/data/edit\n\n\n# Add a contact\ncurl -i \\\n -H \"Authorization: Token token=KNOWTIFY_TOKEN\"\\\n -H \"Content-Type: application/json\"\\\n -X POST \\\n -d '{\"contacts\":[ {\"name\":\"Tom\",\"email\":\"tom@test.com\",\"data\":{ \"test_key\":\"Test Value\" }} ]}' \\\n http://www.knowtify.io/api/v1/contacts/add", "language": "text" } ] } [/block]