tag:help.lighthouseapp.com,2008-09-20:/discussions/problems/4618-creating-ticket-apiLighthouse: Discussion 2012-06-04T18:06:08Ztag:help.lighthouseapp.com,2008-09-20:Comment/163775832012-06-04T15:01:34Z2012-06-04T17:03:57ZCreating ticket API<div><p>Alexander -</p>
<p>Have you had a chance to read our <a href=
"http://help.lighthouseapp.com/kb/api/the-basics-of-the-lighthouse-api">
API documentation</a>? The Lighthouse API uses standard HTTP
requests to <a href=
"http://help.lighthouseapp.com/kb/api/tickets">create tickets</a>.
I'll double check on whether you can create tickets using JSON.</p>
<p>Thanks,<br>
Nicole</p></div>Nicoletag:help.lighthouseapp.com,2008-09-20:Comment/163775832012-06-04T17:22:46Z2012-06-04T17:22:46ZCreating ticket API<div><p>Hi Alexander,</p>
<p>You can use JSON as long as you use <code>.json</code> in the
URL rather than <code>.xml</code> and that the header are correct.
Here is a simple example:</p>
<pre>
<code>curl \
-X POST \
-H "Content-Type: application/json" \
-d '{"ticket":{"title":"foo","body":"bar"}}' \
"http://USER:PASSWORD@foo.lighthouseapp.com/projects/XXXX/tickets.json"</code>
</pre>
<p>Let me know if you need help with anything else.</p></div>Julien