+<p>To access WebDNS API you must have an API <code>token</code>. If you are a WebDNS user you can generate your token by clicking on the <code>API Token</code> link in the navigation bar.</p>
+<ul>
+<li>All API request should be routed under the <code>/api/</code> prefix.</li>
+<li>The API token needs to be present as a <code>?token</code> URL parameter in all requests.</li>
+<li>When sending data (POST/PUT) make sure to correctly set the content encoding header (<code>Content-Enconding: application/json</code>).</li>
+<p>The <code>bulk</code> API allows multiple operations to be perfomed as a single transactional operation. There a three supported operations and they are applied in the following order:</p>
+<ul>
+<li><code>deletes</code></li>
+<li><code>upserts</code></li>
+<li><code>additions</code></li>
+</ul>
+<p><code>additions</code> is an array of hashes. Each hash represents a record to be added.
+<code>name</code>, <code>type</code>, <code>content</code> and <code>prio</code> fields are supported.</p>
+<p><code>deletes</code> is an array of hashes. Each hash represents a single record to be deleted. The fields musts match <strong>exactly one</strong> record.</p>
+<p><code>upserts</code> is an array of hashes. Each hash represents a records to be added, just like an <code>addition</code>. What’s different about <code>upserts</code> is that, before adding the records, all records matching the hash’s <code>name</code> and <code>type</code> are deleted.</p>
+<h4><a id="Fields_91"></a>Fields</h4>
+<ul>
+<li><code>name</code>: Record name. Should be expanded to contain the full domain name.</li>
+<li><code>type</code>: Capitilized record type (<code>'A'</code>, <code>'AAAA'</code>, etc)</li>
+<li><code>prio</code>: Record priority, if supported.</li>
+<li><code>content</code>: Record content. When this is a CNANE <strong>do not</strong> include the trailing dot.</li>
+To access WebDNS API you must have an API `token`. If you are a WebDNS user you can generate your token by clicking on the `API Token` link in the navigation bar.
+
+ * All API request should be routed under the `/api/` prefix.
+ * The API token needs to be present as a `?token` URL parameter in all requests.
+ * When sending data (POST/PUT) make sure to correctly set the content encoding header (`Content-Enconding: application/json`).
+
+## Debug API
+
+### GET `/ping`
+```bash
+curl -X GET https://webdns/api/ping
+{
+ "ok": true,
+ "response": "pong"
+}
+```
+
+### GET `/whoami`
+```bash
+curl -X GET https://webdns/api/whoami
+{
+ "ok": true,
+ "response": {
+ "id": 1,
+ "email": "user@example.com"
+ }
+}
+```
+
+## Records API
+
+### GET `/domain/<name>/list`
+```bash
+curl -X GET https://webdns/api/domain/example.com/list
+The `bulk` API allows multiple operations to be perfomed as a single transactional operation. There a three supported operations and they are applied in the following order:
+
+ * `deletes`
+ * `upserts`
+ * `additions`
+
+`additions` is an array of hashes. Each hash represents a record to be added.
+`name`, `type`, `content` and `prio` fields are supported.
+
+`deletes` is an array of hashes. Each hash represents a single record to be deleted. The fields musts match **exactly one** record.
+
+`upserts` is an array of hashes. Each hash represents a records to be added, just like an `addition`. What's different about `upserts` is that, before adding the records, all records matching the hash's `name` and `type` are deleted.
+
+#### Fields
+ * `name`: Record name. Should be expanded to contain the full domain name.
+ * `type`: Capitilized record type (`'A'`, `'AAAA'`, etc)
+ * `prio`: Record priority, if supported.
+ * `content`: Record content. When this is a CNANE **do not** include the trailing dot.
+
+```bash
+curl -X POST https://webdns/api/domain/example.com/bulk -H 'Content-Type: application/json' -d '{