diff --git a/templates/apiDocs.html b/templates/apiDocs.html
index e6b57217f3485d05f6c06ec8a34c64827215f721..7c176beffac516524c1ca90feaff5ce8d52258be 100644
--- a/templates/apiDocs.html
+++ b/templates/apiDocs.html
@@ -30,7 +30,7 @@
         <li>qr: if you add this parameter you will get an base64 encoded QR code image</li>
         <li>apikey: you can add this argument, if you want to assign this link to your account.</li>
     </ul>
-    <p>example API call with curl: <i>curl -d "apikey={{apikey}}&short={{domain}}/example&long=http://example.com" -X POST {{url_scheme}}://{{domain}}/user/api</i>
+    <p>example API call with curl: <i>curl -d "{% if apikey %}apikey={{apikey}}&{% endif %}short={{domain}}/example&long=http://example.com" -X POST {{url_scheme}}://{{domain}}/user/api</i>
 
     <h2>Responses from Server</h2>
     <p>The response from the server is always made in json format it includes the following arguments:</p>