title: Jenkins REST API Create job
body: <p>I'm creating a new job in Jenkins using the REST API. I tried the below curl command lines, but they are throwing an error</p>
  
  <pre><code>curl -i -X POST --user "admin:&lt;API token&gt;" --data-binary "@C:\mylocalconfig.xml" -H "Content-Type: text/xml" http://localhost:8080/createItem?name=NewJob
  
  curl -X POST -u &lt;username&gt;:&lt;pass&gt; -H "Content-Type:application/xml" -d "@C:\mylocalconfig.xml" "http://localhost:8080/createItem?name=AA_TEST_JOB3"
  </code></pre>
  
  <p>Error:</p>
  
  <hr>
  
  <pre><code>HTTP/1.1 403 No valid crumb was included in the request
  Date: Fri, 01 Jul 2016 05:25:59 GMT
  X-Content-Type-Options: nosniff
  Content-Type: text/html; charset=ISO-8859-1
  Cache-Control: must-revalidate,no-cache,no-store
  Content-Length: 360
  Server: Jetty(9.2.z-SNAPSHOT)
  &lt;html&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/&gt;
  &lt;title&gt;Error 403 No valid crumb was included in the request&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;&lt;h2&gt;HTTP ERROR 403&lt;/h2&gt;
  &lt;p&gt;Problem accessing /createItem. Reason:
  &lt;pre&gt;    No valid crumb was included in the request&lt;/pre&gt;&lt;/p&gt;&lt;hr&gt;&lt;i&gt;&lt;small&gt;Power
  ed by Jetty://&lt;/small&gt;&lt;/i&gt;&lt;hr/&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <hr>