diff --git a/docs/_sidebar.md b/docs/_sidebar.md
index e02080e..505fbd0 100644
--- a/docs/_sidebar.md
+++ b/docs/_sidebar.md
@@ -10,7 +10,7 @@
- [DOIP](doip.md)
- [Cryptographic keys](cryptographickeys.md)
- [Proofs](proofs.md)
- - [Claims](claims.nd)
+ - [Claims](claims.md)
- [Service providers](serviceproviders,md)
- Service providers
diff --git a/docs/api.md b/docs/api.md
index fc7d158..183076a 100644
--- a/docs/api.md
+++ b/docs/api.md
@@ -8,18 +8,35 @@ Verifies the identity behind the provided **uri** using the **fingerprint**.
**Parameters**
-| Name | Mandatory | Type | Description |
-|-------------|-----------|--------|----------------------------------|
-| uri | true | string | the URI to an identity to verify |
-| fingerprint | false | string | the fingerprint of the claim |
-| opts | false | object | options (see below) |
+| Name | Type | Mandatory | Description |
+|-------------|--------|-----------|----------------------------------|
+| uri | string | true | the URI to an identity to verify |
+| fingerprint | string | false | the fingerprint of the claim |
+| opts | object | false | options (see below) |
**Options**
-| Name | Default | Type | Description |
-|-------------|-----------|--------|----------------------------------|
-| uri | true | string | the URI to an identity to verify |
-| fingerprint | false | string | the fingerprint of the claim |
-| opts | false | object | options |
+| Name | Type | Default value | Description |
+|-------------------|---------|----------------------|---------------------------------------------------------------------|
+| returnMatchesOnly | boolean | false | only return matching service providers, do not attempt verification |
+| proxyPolicy | string | 'adaptive' | when to use a proxy ['adaptive', 'always', 'never'] |
+| doipProxyHostname | string | 'proxy.keyoxide.org' | the hostname of the proxy server |
+
+When the `proxyPolicy` option is to `adaptive`, the chosen strategy is
+the one suggested by the service provider.
**Returns**
+
+An object with the results of the identity claim verification containing a
+boolean named `isVerified` and a [serviceproviderData](serviceproviderdataobject.md#service-provider-data-object)
+object.
+
+```json
+{
+ "isVerified": true,
+ "serviceproviderData": { ... }
+}
+```
+
+If `opts.returnMatchesOnly` is `true`, this function instead returns a list of
+service providers matched to the provided `uri`.
diff --git a/docs/claims.md b/docs/claims.md
index 34f417c..51933cc 100644
--- a/docs/claims.md
+++ b/docs/claims.md
@@ -1 +1,138 @@
# Claims
+
+## Definition
+
+A **claim** is one of the two pieces of data needed to verify an online
+identity, the other being a [proof](proofs.md).
+
+A claim is always a phrase, string or URI that is expected to be found inside
+the proof. **The presence of a claim inside a proof verifies that claim.**
+
+## Relation with proof
+
+The relation between proof and claim is defined by three variables: `format`,
+`path` and `relation`.
+
+In the following examples, we'll assume we are dealing with a key that has the
+fingerprint `13ec664f5e0c3e4ebad8b7441adbf09217175f75`.
+
+### format
+
+This variable describes how the proof is integrated in the data returned by the
+service provider.
+
+If `format` is set to `uri`, the claim expects the proof to be or contain:
+
+```
+openpgp4fpr:13ec664f5e0c3e4ebad8b7441adbf09217175f75
+```
+
+If `format` is set to `message`, the claim expects the proof to be or contain:
+
+```
+[Verifying my OpenPGP key: openpgp4fpr:13ec664f5e0c3e4ebad8b7441adbf09217175f75]
+```
+
+If `format` is set to `fingerprint`, the claim expects the proof to be or
+contain:
+
+```
+13ec664f5e0c3e4ebad8b7441adbf09217175f75
+```
+
+### path
+
+This variables describes how to get to the important proof-containing field
+inside the JSON data. It is an array of strings, each string equal to the next
+field inside the JSON data.
+
+If the proof data is text, the `path` value is ignored.
+
+Assuming the following JSON data:
+
+```json
+"firstField": {
+ "secondField": {
+ "finalField": "openpgp4fpr:13ec664f5e0c3e4ebad8b7441adbf09217175f75",
+ "yetAnotherField": "yetAnotherValue"
+ },
+ "otherField": "someValue"
+}
+```
+
+To verify any claim, the `path` should be set to:
+
+```javascript
+['firstField', 'secondField', 'finalField']
+```
+
+**JSON data containing arrays**
+
+In cases there are arrays in the JSON data, these should **not** be entered in
+`path`. They will always be iterated over.
+
+Assuming the following JSON data:
+
+```json
+"firstField": {
+ "fieldContainingArray": [
+ {
+ "finalField": "https://domain.org",
+ "yetAnotherField": "yetAnotherValue1"
+ },
+ {
+ "finalField": "openpgp4fpr:13ec664f5e0c3e4ebad8b7441adbf09217175f75",
+ "yetAnotherField": "yetAnotherValue2"
+ }
+ ],
+ "otherField": "someValue"
+}
+```
+
+To verify any claim, the `path` should be set to:
+
+```javascript
+['firstField', 'fieldContainingArray', 'finalField']
+```
+
+Every `finalField` field for every item in the `fieldContainingArray` array will
+be tested for the claim.
+
+### relation
+
+This variable simply states whether after following the `path` inside the JSON
+data, the obtained value `contains` the claim, `equals` the claim or if the
+obtained value is an array, the claim is `oneOf` the values of the array.
+
+The `relation` should be `contains` for the following proof data:
+
+```json
+"firstField": {
+ "secondField": {
+ "finalField": "Long text. openpgp4fpr:13ec664f5e0c3e4ebad8b7441adbf09217175f75. Perhaps more text."
+ }
+}
+```
+
+The `relation` should be `equals` for the following proof data:
+
+```json
+"firstField": {
+ "secondField": {
+ "finalField": "openpgp4fpr:13ec664f5e0c3e4ebad8b7441adbf09217175f75"
+ }
+}
+```
+
+The `relation` should be `oneOf` for the following proof data:
+
+```json
+"firstField": {
+ "secondField": {
+ "finalField": [
+ "cats",
+ "openpgp4fpr:13ec664f5e0c3e4ebad8b7441adbf09217175f75"
+ ]
+ }
+}
+```
diff --git a/docs/index.html b/docs/index.html
index 4d9a7f3..dbac058 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -23,6 +23,7 @@
-
+
+