{"metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"required","params":[],"results":{"codes":[]},"settings":""},"next":{"description":"","pages":[]},"title":"A cURL Test for connecting with the Knowtify API","type":"basic","slug":"curl-test-for-api","excerpt":"Shows how to connect to the Knowtify API using cURL.","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]","updates":[],"order":2,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"538cf4ac3325b9e6626b5896","createdAt":"2014-06-02T22:03:24.138Z","githubsync":"","comments":[],"tags":[],"user":"5384345d90c19d5e43a8170c","__v":3,"project":"53844557a43e08da4677be0e","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"},"category":{"sync":{"isSync":false,"url":""},"pages":["538cf51a3325b9e6626b5897","538cfd183325b9e6626b5898","538cf4ac3325b9e6626b5896","53daa04f971607581f86ea2e","560332f790ee490d004403ac"],"title":"Libraries","slug":"libraries","order":4,"from_sync":false,"reference":false,"_id":"541e82877eb16bb64f83c0ca","version":"53844558a43e08da4677be12","__v":1,"createdAt":"2014-09-21T07:47:19.722Z","project":"53844557a43e08da4677be0e"}}

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\":\"[email protected]\",\"data\":{ \"test_key\":\"Test Value\" }} ]}' \\\n http://www.knowtify.io/api/v1/contacts/add", "language": "text" } ] } [/block]