> Toden documentation. For the full index fetch /llms.txt. Every page is available as Markdown by appending .md to its URL. Every endpoint is under /api/v1. Identity verification and Risk Intelligence are separate contracts there with different error shapes; /api/kyc and /api/identity are older prefixes that still answer the same. Never invent an endpoint, field or enum value: read the API reference page for the operation first.

# Check a proof of address

POST https://sandbox-api.toden.co/api/v1/checks/address
Content-Type: application/json

Reads a proof of address document (a utility bill, a bank statement, a tenancy agreement, a government letter) on its own, with no verification, and says whether it holds up: what it is, who issued it, how old it is, whose name and address it carries and where that address is on the map.

Upload the document first with `POST /api/kyc/upload` (multipart `file` and `type=proof_of_address`; JPEG, PNG, WebP or PDF), then send its `mediaId` here as `documentMediaId` within 30 minutes. Send `name` to check the document is addressed to that person, `country` to check the address is in that country, `documentType` if you know what the document is, and `address` to compare with the one printed.

`pass`: readable, recent (90 days or less), addressed to the `name` sent and its address placed on the map. `review`: something a person should look at (see `result.reasons`): no address, too old or undated, nobody named, the address not placed or not the one sent, another country or kind, or signs of editing. `fail`: not a proof of address, or addressed to somebody else. A document that cannot be read is `unavailable` with `failureCode` `unreadable` and is not charged.

Charged at your Verifications proof of address price. In sandbox the document is not read: a sample answer marked `result.sample` comes back, and the `name` picks the outcome (`Stale Document` review, `Name Mismatch` fail, `Not Proof Of Address` fail, `Unreadable Document` unavailable, anything else pass).

Rules: send `rules` to set what each finding does (`decline` fails the check, `review` sends it to review, `approve` keeps it as a note and passes) and to change the check's settings. Anything left out takes your organisation's saved default rules (set in Spot Checks), else Toden's, which judge the check as it was judged before rules existed. `result.rules` says which rules the check ran under, where each came from and what each finding did.

Charged per check at your price (production only); a check that could not be completed is not charged. Send a `requestId`: a retry with the same value returns the same check with `replayed: true`, without running or charging again.

**Error codes**

| `error` | Status | Meaning |
|---|---|---|
| `invalid_input` | 400 | The body is missing something the check needs, or the requestId is malformed. |
| `insufficient_credits` | 402 | Your balance cannot cover the check. Nothing was run or charged. |
| `checks_unavailable` | 403 | These checks are not switched on for your organisation yet. |
| `spot_checks_disabled` | 403 | Spot checks are not enabled for your organisation. |
| `request_id_reused` | 409 | The requestId was used for a different check. |
| `check_in_progress` | 409 | A check with this requestId is still running. |
| `file_not_found` | 422 | The uploaded file was not found, is not yours, or has expired. |
| `check_unavailable` | 503 | The check cannot run on this deployment right now. Nothing was charged. |
| `secret_key_required` | 403 | A publishable key was used. This endpoint accepts secret keys only. |
| `environment_mismatch` | 403 | The key belongs to an environment this deployment does not serve. |
| `ip_not_allowed` | 403 | The key has an IP allowlist and the calling address is not on it. |
| `organization_suspended` | 403 | The organisation is suspended. The response carries `reason` and `suspendedAt`. |
| `business_not_approved` | 403 | A live key was used before the business was approved for production. |

A missing or unknown key answers `401`, where `error` is a short sentence rather than a code.

Requires a secret (`sk_`) key. A publishable key receives `403 secret_key_required`.

Reference: https://docs.toden.co/api-reference/verification/standalone-checks/create-address-check

## Authentication

- `Authorization` header (bearer token, required) — Send the API key as a Bearer token. Each operation states whether a publishable key is enough or a secret key is required. A scoped publishable key has Verification flow access, the fixed set `flow.run`, `flow.config.read` and `verifications.status.read`; a scoped secret key reaches what its scopes allow.

## Servers

- `https://sandbox-api.toden.co` (Sandbox, default)
- `https://api.toden.co` (Production)

## Request

### Body (application/json)

This endpoint expects an AddressCheckRequest.

- `documentMediaId` (string, required) — The `mediaId` from uploading the document with `type=proof_of_address`.
- `requestId` (string, required) — Your idempotency key, 8 to 120 characters: a retry with the same value returns the same check.
- `name` (string, optional) — Whose address it should be: checked against the names on the document. Or send `firstName` and `lastName`.
- `firstName` (string, optional) — Whose address it should be, with `lastName`: matched as one name. Not with `name`.
- `lastName` (string, optional) — With `firstName`.
- `country` (string, optional) — The country the address should be in (ISO 3166-1 alpha-2).
- `documentType` (enum, optional) — What the document is. Left out, the kind it is recognised as is used.
  - Allowed values: `utility_bill`, `bank_statement`, `tenancy_agreement`, `government_document`, `other`
- `address` (string, optional) — An address to compare with the one printed on the document.
- `externalUserId` (string, optional) — Your own reference for the check (a customer or case id), kept with it and searchable in your history.
- `rules` (AddressCheckRequestRules, optional) — What each finding does, and the check's settings. Each finding covers some of `result.reasons`: `not_proof_of_address`; `name_mismatch`; `name_not_found`; `address_mismatch` (`address_differs`, `country_differs`); `document_issues` (`no_address`, `stale`, `undated`, `type_differs`, `address_not_located`); `authenticity` (`signs_of_editing`); `issuer_not_identified`; `unsupported_language`. Defaults: `not_proof_of_address` and `name_mismatch` decline, `issuer_not_identified` approve, the rest review.

## Response

### 200

A retry: the check already run under this requestId.

- `id` (string, required) — The check id (`chk_…`).
- `kind` (enum, required) — Which check this is.
  - Allowed values: `address`
- `outcome` (enum, required) — `pass`: nothing of concern. `review`: something a person should look at. `fail`: a clear problem. `unavailable`: the check could not be completed, was not charged, and is never a pass.
  - Allowed values: `pass`, `review`, `fail`, `unavailable`
- `subject` (string, required) — What was checked, as your history lists it.
- `channel` (enum, required) — Whether the check was run through the API or from the dashboard.
  - Allowed values: `api`, `dashboard`
- `createdAt` (datetime, required) — When the check was run.
- `input` (AddressCheckInput, optional) — What was sent, minimised: never image bytes, only media ids.
- `externalUserId` (string, optional, nullable) — Your own reference for the check, as sent.
- `result` (AddressCheckResult, optional, nullable) — What was found. Null when the check could not be completed.
- `failureCode` (string, optional, nullable) — Why the check could not be completed, when `outcome` is `unavailable`.
- `charged` (string, optional, nullable) — What the check cost in USD, as a decimal string. Null when nothing was charged.
- `entityId` (string, optional, nullable) — The customer record this check was saved to.
- `completedAt` (datetime, optional, nullable) — When it finished.
- `replayed` (boolean, optional) — On a run only: true when this is a check already run under the same `requestId`.

### 201

The check was run.

- `id` (string, required) — The check id (`chk_…`).
- `kind` (enum, required) — Which check this is.
  - Allowed values: `address`
- `outcome` (enum, required) — `pass`: nothing of concern. `review`: something a person should look at. `fail`: a clear problem. `unavailable`: the check could not be completed, was not charged, and is never a pass.
  - Allowed values: `pass`, `review`, `fail`, `unavailable`
- `subject` (string, required) — What was checked, as your history lists it.
- `channel` (enum, required) — Whether the check was run through the API or from the dashboard.
  - Allowed values: `api`, `dashboard`
- `createdAt` (datetime, required) — When the check was run.
- `input` (AddressCheckInput, optional) — What was sent, minimised: never image bytes, only media ids.
- `externalUserId` (string, optional, nullable) — Your own reference for the check, as sent.
- `result` (AddressCheckResult, optional, nullable) — What was found. Null when the check could not be completed.
- `failureCode` (string, optional, nullable) — Why the check could not be completed, when `outcome` is `unavailable`.
- `charged` (string, optional, nullable) — What the check cost in USD, as a decimal string. Null when nothing was charged.
- `entityId` (string, optional, nullable) — The customer record this check was saved to.
- `completedAt` (datetime, optional, nullable) — When it finished.
- `replayed` (boolean, optional) — On a run only: true when this is a check already run under the same `requestId`.

## Errors

### 400 Bad Request Error

The request body, query or path was invalid.

- `error` (string, required) — A stable machine-readable code such as `invalid_input`. Authentication failures (401) carry a short sentence here instead of a code.
- `message` (string, optional) — A human-readable explanation, safe to log. The wording may change.

### 401 Unauthorized Error

The Authorization header is missing, or the API key is unknown or revoked.

- `error` (string, required) — A stable machine-readable code such as `invalid_input`. Authentication failures (401) carry a short sentence here instead of a code.
- `message` (string, optional) — A human-readable explanation, safe to log. The wording may change.

### 402 Payment Required Error

The organisation does not have enough credit for this request.

- `error` (string, required) — A stable machine-readable code such as `invalid_input`. Authentication failures (401) carry a short sentence here instead of a code.
- `message` (string, optional) — A human-readable explanation, safe to log. The wording may change.

### 403 Forbidden Error

The key may not call this endpoint, or the organisation may not use this feature.

- `error` (string, required) — A stable machine-readable code such as `invalid_input`. Authentication failures (401) carry a short sentence here instead of a code.
- `message` (string, optional) — A human-readable explanation, safe to log. The wording may change.

### 409 Conflict Error

The request conflicts with the current state of the resource.

- `error` (string, required) — A stable machine-readable code such as `invalid_input`. Authentication failures (401) carry a short sentence here instead of a code.
- `message` (string, optional) — A human-readable explanation, safe to log. The wording may change.

### 422 Unprocessable Entity Error

The request was understood but cannot be processed as sent.

- `error` (string, required) — A stable machine-readable code such as `invalid_input`. Authentication failures (401) carry a short sentence here instead of a code.
- `message` (string, optional) — A human-readable explanation, safe to log. The wording may change.

### 503 Service Unavailable Error

The service is temporarily unavailable.

- `error` (string, required) — A stable machine-readable code such as `invalid_input`. Authentication failures (401) carry a short sentence here instead of a code.
- `message` (string, optional) — A human-readable explanation, safe to log. The wording may change.

## Types

### AddressCheckRequestRules

What each finding does, and the check's settings. Each finding covers some of `result.reasons`: `not_proof_of_address`; `name_mismatch`; `name_not_found`; `address_mismatch` (`address_differs`, `country_differs`); `document_issues` (`no_address`, `stale`, `undated`, `type_differs`, `address_not_located`); `authenticity` (`signs_of_editing`); `issuer_not_identified`; `unsupported_language`. Defaults: `not_proof_of_address` and `name_mismatch` decline, `issuer_not_identified` approve, the rest review.

- `not_proof_of_address` (enum, optional)
  - Allowed values: `decline`, `review`, `approve`
- `name_mismatch` (enum, optional)
  - Allowed values: `decline`, `review`, `approve`
- `name_not_found` (enum, optional)
  - Allowed values: `decline`, `review`, `approve`
- `address_mismatch` (enum, optional)
  - Allowed values: `decline`, `review`, `approve`
- `document_issues` (enum, optional)
  - Allowed values: `decline`, `review`, `approve`
- `authenticity` (enum, optional)
  - Allowed values: `decline`, `review`, `approve`
- `issuer_not_identified` (enum, optional) — The reader could not name who issued the document. Approved (a note) by default.
  - Allowed values: `decline`, `review`, `approve`
- `unsupported_language` (enum, optional) — The document is not in one of `languages`. Only found when `languages` is sent.
  - Allowed values: `decline`, `review`, `approve`
- `maxAgeMonths` (enum, optional) — The most months old the document may be, a month counted as 30 days. Left out: 90 days, as before.
  - Allowed values: `1`, `2`, `3`, `6`, `12`, `24`, `36`
- `languages` (list of string, optional) — The languages the document may be in (ISO 639-1). Left out or empty: any.

### AddressCheckInput

What was sent, minimised: never image bytes, only media ids.

### AddressCheckResult

What was found. Null when the check could not be completed.

- `sample` (boolean, optional) — True in sandbox: the document was not read and every value is a sample.
- `documentMediaId` (string, optional) — The uploaded document checked.
- `documentStatus` (enum, optional) — The proof of address engine's own verdict on the document, as a verification's `proofOfAddress.status`.
  - Allowed values: `verified`, `name_mismatch`, `stale`, `inconclusive`, `no_address`
- `reasons` (list of enum, optional) — Why the check is not a pass; empty on a pass. By default `not_proof_of_address` and `name_mismatch` fail it and the rest send it to review; `rules` can change that.
  - Allowed values: `not_proof_of_address`, `name_mismatch`, `no_address`, `name_not_found`, `stale`, `undated`, `address_not_located`, `address_differs`, `country_differs`, `type_differs`, `signs_of_editing`, `issuer_not_identified`, `unsupported_language`
- `notes` (list of enum, optional) — What was found but approved by the rules: shown as notes, never a reason the check did not pass. By default an issuer the reader could not name.
  - Allowed values: `not_proof_of_address`, `name_mismatch`, `no_address`, `name_not_found`, `stale`, `undated`, `address_not_located`, `address_differs`, `country_differs`, `type_differs`, `signs_of_editing`, `issuer_not_identified`, `unsupported_language`
- `documentType` (enum, optional) — The kind the document was judged as: the `documentType` sent, else the kind recognised, else `other`.
  - Allowed values: `utility_bill`, `bank_statement`, `tenancy_agreement`, `government_document`, `other`
- `documentKind` (string, optional, nullable) — What the document was recognised as: a kind above, or `not_proof_of_address`.
- `documentSubtype` (string, optional, nullable) — The document within that kind, for example `electricity_bill` or `bank_statement`.
- `issuer` (string, optional, nullable) — The company or body that issued it, as printed.
- `language` (string, optional, nullable) — The language it is written in (ISO 639-1).
- `documentDate` (date, optional, nullable) — The issue or statement date (YYYY-MM-DD).
- `documentAgeDays` (integer, optional, nullable) — How old the document was, in days, when checked. Null when undated.
- `maxAgeDays` (integer, optional) — The most days old the document may be: 90, or `rules.maxAgeMonths` times 30.
- `recent` (boolean, optional, nullable) — Whether it is within `maxAgeDays`. Null when undated.
- `nameGiven` (string, optional, nullable) — The `name` sent.
- `nameOnDocument` (string, optional, nullable) — Who the document is addressed to, as printed.
- `documentNames` (list of AddressCheckResultDocumentNamesItems, optional, nullable) — The same people one by one, with the label printed beside each.
- `nameMatch` (boolean, optional, nullable) — Whether the `name` sent is on the document. Null when no name was sent.
- `address` (string, optional, nullable) — The address read off the document, as printed.
- `addressGiven` (string, optional, nullable) — The `address` sent.
- `addressMatch` (enum, optional) — The `address` sent against the document's. `no_match` only when the map placed both far apart; `unknown` when it cannot be settled. Null when no address was sent.
  - Allowed values: `match`, `no_match`, `unknown`
- `location` (AddressCheckResultLocation, optional, nullable) — Where the address read off the document is on the map. Null when no address was read.
- `country` (string, optional, nullable) — The country the document's address is in (ISO 3166-1 alpha-2).
- `countryGiven` (string, optional, nullable) — The `country` sent.
- `countryMatch` (boolean, optional, nullable) — Whether the address is in the `country` sent. Null when either is unknown.
- `integrity` (AddressCheckResultIntegrity, optional, nullable) — Signs the file or the page was edited. Null on a sample.
- `quality` (AddressCheckResultQuality, optional, nullable) — How sharp the photo is. Recorded, never decides. Null for a PDF or a sample.
- `findings` (AddressCheckResultFindings, optional) — One yes or no per proof of address rule, as a verification reports them. `true` is the finding, `false` looked and fine, `null` could not say.
- `checkedAt` (datetime, optional) — When the document was judged.
- `rules` (AddressCheckResultRules, optional) — The rules this check was judged by.

### AddressCheckResultDocumentNamesItems

- `name` (string, optional) — As printed.
- `label` (string, optional, nullable) — The words printed beside it, for example "Customer Name".

### AddressCheckResultLocation

Where the address read off the document is on the map. Null when no address was read.

- `status` (enum, optional) — `found`: placed. `not_found`: looked for and not placed. `not_checked`: nobody could be asked, which says nothing about the address.
  - Allowed values: `found`, `not_found`, `not_checked`
- `lat` (double, optional, nullable)
- `lng` (double, optional, nullable)
- `formattedAddress` (string, optional, nullable) — The map's own form of the address it found.
- `precision` (enum, optional) — How closely it was placed.
  - Allowed values: `exact`, `street`, `area`, `approximate`
- `partialMatch` (boolean, optional) — True when the map matched only part of the printed address.
- `placeId` (string, optional, nullable) — The map's id for the place.
- `checkedAt` (datetime, optional) — When it was placed.

### AddressCheckResultIntegrity

Signs the file or the page was edited. Null on a sample.

- `status` (enum, optional) — `signs_of_editing` sends the check to review.
  - Allowed values: `clean`, `signs_of_editing`, `not_checked`
- `signals` (list of AddressCheckResultIntegritySignalsItems, optional)
- `pageInspected` (boolean, optional) — Whether the page itself was looked at, beside the file.

### AddressCheckResultQuality

How sharp the photo is. Recorded, never decides. Null for a PDF or a sample.

- `sharpness` (integer, optional, nullable) — Higher is sharper.
- `poor` (boolean, optional)

### AddressCheckResultFindings

One yes or no per proof of address rule, as a verification reports them. `true` is the finding, `false` looked and fine, `null` could not say.

- `attemptsExceeded` (boolean, optional, nullable)
- `dataMismatch` (boolean, optional, nullable)
- `poorQuality` (boolean, optional, nullable)
- `tampered` (boolean, optional, nullable)
- `unsupportedType` (boolean, optional, nullable)
- `unsupportedLanguage` (boolean, optional, nullable)
- `issuerMissing` (boolean, optional, nullable)
- `dateMissing` (boolean, optional, nullable)
- `addressMissing` (boolean, optional, nullable)

### AddressCheckResultRules

The rules this check was judged by.

- `actions` (map from string to enum, optional) — Each finding's action.
  - Allowed values: `decline`, `review`, `approve`
- `settings` (AddressCheckResultRulesSettings, optional) — Each setting's value.
- `source` (map from string to enum, optional) — Where each finding's action and each setting came from.
  - Allowed values: `default`, `organisation`, `request`
- `triggered` (list of AddressCheckResultRulesTriggeredItems, optional) — The findings this check found, each with the action it took.

### AddressCheckResultIntegritySignalsItems

- `code` (enum, optional) — What was seen.
  - Allowed values: `edited_in_image_editor`, `edited_in_pdf_editor`, `changed_after_signing`, `visible_editing`, `saved_again`
- `strength` (enum, optional) — `strong` is enough on its own to put the document in front of a person.
  - Allowed values: `strong`, `weak`
- `detail` (string, optional, nullable) — The software named, or what was seen on the page.

### AddressCheckResultRulesSettings

Each setting's value.

### AddressCheckResultRulesTriggeredItems

- `finding` (string, optional) — The finding.
- `action` (enum, optional) — What it did.
  - Allowed values: `decline`, `review`, `approve`

## Examples

### Example 1

**Request**

```json
{
  "documentMediaId": "med_3f9a1c2b4d5e6f708192a3b4c5d6e7f8",
  "requestId": "poa-check-7f3c9a21",
  "name": "Amina Bello",
  "country": "NG",
  "documentType": "utility_bill",
  "address": "12 Adeola Odeku Street, Victoria Island, Lagos"
}
```

**Response**

```json
{
  "id": "string",
  "kind": "address",
  "outcome": "pass",
  "subject": "string",
  "channel": "api",
  "createdAt": "2024-01-15T09:30:00Z",
  "input": {},
  "externalUserId": "string",
  "result": {
    "sample": true,
    "documentMediaId": "string",
    "documentStatus": "verified",
    "reasons": [
      "not_proof_of_address"
    ],
    "notes": [
      "not_proof_of_address"
    ],
    "documentType": "utility_bill",
    "documentKind": "string",
    "documentSubtype": "string",
    "issuer": "string",
    "language": "string",
    "documentDate": "2023-01-15",
    "documentAgeDays": 1,
    "maxAgeDays": 1,
    "recent": true,
    "nameGiven": "string",
    "nameOnDocument": "string",
    "documentNames": [
      {
        "name": "string",
        "label": "string"
      }
    ],
    "nameMatch": true,
    "address": "string",
    "addressGiven": "string",
    "addressMatch": "match",
    "location": {
      "status": "found",
      "lat": 1.1,
      "lng": 1.1,
      "formattedAddress": "string",
      "precision": "exact",
      "partialMatch": true,
      "placeId": "string",
      "checkedAt": "2024-01-15T09:30:00Z"
    },
    "country": "string",
    "countryGiven": "string",
    "countryMatch": true,
    "integrity": {
      "status": "clean",
      "signals": [
        {
          "code": "edited_in_image_editor",
          "strength": "strong",
          "detail": "string"
        }
      ],
      "pageInspected": true
    },
    "quality": {
      "sharpness": 1,
      "poor": true
    },
    "findings": {
      "attemptsExceeded": true,
      "dataMismatch": true,
      "poorQuality": true,
      "tampered": true,
      "unsupportedType": true,
      "unsupportedLanguage": true,
      "issuerMissing": true,
      "dateMissing": true,
      "addressMissing": true
    },
    "checkedAt": "2024-01-15T09:30:00Z",
    "rules": {
      "actions": {},
      "settings": {},
      "source": {},
      "triggered": [
        {
          "finding": "string",
          "action": "decline"
        }
      ]
    }
  },
  "failureCode": "string",
  "charged": "string",
  "entityId": "string",
  "completedAt": "2024-01-15T09:30:00Z",
  "replayed": true
}
```

**SDK Code**

```python
import requests

url = "https://sandbox-api.toden.co/api/v1/checks/address"

payload = {
    "documentMediaId": "med_3f9a1c2b4d5e6f708192a3b4c5d6e7f8",
    "requestId": "poa-check-7f3c9a21",
    "name": "Amina Bello",
    "country": "NG",
    "documentType": "utility_bill",
    "address": "12 Adeola Odeku Street, Victoria Island, Lagos"
}
headers = {
    "Authorization": "Bearer <apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://sandbox-api.toden.co/api/v1/checks/address';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <apiKey>', 'Content-Type': 'application/json'},
  body: '{"documentMediaId":"med_3f9a1c2b4d5e6f708192a3b4c5d6e7f8","requestId":"poa-check-7f3c9a21","name":"Amina Bello","country":"NG","documentType":"utility_bill","address":"12 Adeola Odeku Street, Victoria Island, Lagos"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://sandbox-api.toden.co/api/v1/checks/address"

	payload := strings.NewReader("{\n  \"documentMediaId\": \"med_3f9a1c2b4d5e6f708192a3b4c5d6e7f8\",\n  \"requestId\": \"poa-check-7f3c9a21\",\n  \"name\": \"Amina Bello\",\n  \"country\": \"NG\",\n  \"documentType\": \"utility_bill\",\n  \"address\": \"12 Adeola Odeku Street, Victoria Island, Lagos\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://sandbox-api.toden.co/api/v1/checks/address")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"documentMediaId\": \"med_3f9a1c2b4d5e6f708192a3b4c5d6e7f8\",\n  \"requestId\": \"poa-check-7f3c9a21\",\n  \"name\": \"Amina Bello\",\n  \"country\": \"NG\",\n  \"documentType\": \"utility_bill\",\n  \"address\": \"12 Adeola Odeku Street, Victoria Island, Lagos\"\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://sandbox-api.toden.co/api/v1/checks/address")
  .header("Authorization", "Bearer <apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"documentMediaId\": \"med_3f9a1c2b4d5e6f708192a3b4c5d6e7f8\",\n  \"requestId\": \"poa-check-7f3c9a21\",\n  \"name\": \"Amina Bello\",\n  \"country\": \"NG\",\n  \"documentType\": \"utility_bill\",\n  \"address\": \"12 Adeola Odeku Street, Victoria Island, Lagos\"\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://sandbox-api.toden.co/api/v1/checks/address', [
  'body' => '{
  "documentMediaId": "med_3f9a1c2b4d5e6f708192a3b4c5d6e7f8",
  "requestId": "poa-check-7f3c9a21",
  "name": "Amina Bello",
  "country": "NG",
  "documentType": "utility_bill",
  "address": "12 Adeola Odeku Street, Victoria Island, Lagos"
}',
  'headers' => [
    'Authorization' => 'Bearer <apiKey>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://sandbox-api.toden.co/api/v1/checks/address");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"documentMediaId\": \"med_3f9a1c2b4d5e6f708192a3b4c5d6e7f8\",\n  \"requestId\": \"poa-check-7f3c9a21\",\n  \"name\": \"Amina Bello\",\n  \"country\": \"NG\",\n  \"documentType\": \"utility_bill\",\n  \"address\": \"12 Adeola Odeku Street, Victoria Island, Lagos\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "documentMediaId": "med_3f9a1c2b4d5e6f708192a3b4c5d6e7f8",
  "requestId": "poa-check-7f3c9a21",
  "name": "Amina Bello",
  "country": "NG",
  "documentType": "utility_bill",
  "address": "12 Adeola Odeku Street, Victoria Island, Lagos"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://sandbox-api.toden.co/api/v1/checks/address")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Example 2

**Request**

```json
{
  "documentMediaId": "med_3f9a1c2b4d5e6f708192a3b4c5d6e7f8",
  "requestId": "poa-check-7f3c9a21",
  "name": "Amina Bello",
  "country": "NG",
  "documentType": "utility_bill",
  "address": "12 Adeola Odeku Street, Victoria Island, Lagos"
}
```

**Response**

```json
{
  "id": "string",
  "kind": "address",
  "outcome": "pass",
  "subject": "string",
  "channel": "api",
  "createdAt": "2024-01-15T09:30:00Z",
  "input": {},
  "externalUserId": "string",
  "result": {
    "sample": true,
    "documentMediaId": "string",
    "documentStatus": "verified",
    "reasons": [
      "not_proof_of_address"
    ],
    "notes": [
      "not_proof_of_address"
    ],
    "documentType": "utility_bill",
    "documentKind": "string",
    "documentSubtype": "string",
    "issuer": "string",
    "language": "string",
    "documentDate": "2023-01-15",
    "documentAgeDays": 1,
    "maxAgeDays": 1,
    "recent": true,
    "nameGiven": "string",
    "nameOnDocument": "string",
    "documentNames": [
      {
        "name": "string",
        "label": "string"
      }
    ],
    "nameMatch": true,
    "address": "string",
    "addressGiven": "string",
    "addressMatch": "match",
    "location": {
      "status": "found",
      "lat": 1.1,
      "lng": 1.1,
      "formattedAddress": "string",
      "precision": "exact",
      "partialMatch": true,
      "placeId": "string",
      "checkedAt": "2024-01-15T09:30:00Z"
    },
    "country": "string",
    "countryGiven": "string",
    "countryMatch": true,
    "integrity": {
      "status": "clean",
      "signals": [
        {
          "code": "edited_in_image_editor",
          "strength": "strong",
          "detail": "string"
        }
      ],
      "pageInspected": true
    },
    "quality": {
      "sharpness": 1,
      "poor": true
    },
    "findings": {
      "attemptsExceeded": true,
      "dataMismatch": true,
      "poorQuality": true,
      "tampered": true,
      "unsupportedType": true,
      "unsupportedLanguage": true,
      "issuerMissing": true,
      "dateMissing": true,
      "addressMissing": true
    },
    "checkedAt": "2024-01-15T09:30:00Z",
    "rules": {
      "actions": {},
      "settings": {},
      "source": {},
      "triggered": [
        {
          "finding": "string",
          "action": "decline"
        }
      ]
    }
  },
  "failureCode": "string",
  "charged": "string",
  "entityId": "string",
  "completedAt": "2024-01-15T09:30:00Z",
  "replayed": true
}
```

**SDK Code**

```python
import requests

url = "https://sandbox-api.toden.co/api/v1/checks/address"

payload = {
    "documentMediaId": "med_3f9a1c2b4d5e6f708192a3b4c5d6e7f8",
    "requestId": "poa-check-7f3c9a21",
    "name": "Amina Bello",
    "country": "NG",
    "documentType": "utility_bill",
    "address": "12 Adeola Odeku Street, Victoria Island, Lagos"
}
headers = {
    "Authorization": "Bearer <apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://sandbox-api.toden.co/api/v1/checks/address';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <apiKey>', 'Content-Type': 'application/json'},
  body: '{"documentMediaId":"med_3f9a1c2b4d5e6f708192a3b4c5d6e7f8","requestId":"poa-check-7f3c9a21","name":"Amina Bello","country":"NG","documentType":"utility_bill","address":"12 Adeola Odeku Street, Victoria Island, Lagos"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://sandbox-api.toden.co/api/v1/checks/address"

	payload := strings.NewReader("{\n  \"documentMediaId\": \"med_3f9a1c2b4d5e6f708192a3b4c5d6e7f8\",\n  \"requestId\": \"poa-check-7f3c9a21\",\n  \"name\": \"Amina Bello\",\n  \"country\": \"NG\",\n  \"documentType\": \"utility_bill\",\n  \"address\": \"12 Adeola Odeku Street, Victoria Island, Lagos\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://sandbox-api.toden.co/api/v1/checks/address")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"documentMediaId\": \"med_3f9a1c2b4d5e6f708192a3b4c5d6e7f8\",\n  \"requestId\": \"poa-check-7f3c9a21\",\n  \"name\": \"Amina Bello\",\n  \"country\": \"NG\",\n  \"documentType\": \"utility_bill\",\n  \"address\": \"12 Adeola Odeku Street, Victoria Island, Lagos\"\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://sandbox-api.toden.co/api/v1/checks/address")
  .header("Authorization", "Bearer <apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"documentMediaId\": \"med_3f9a1c2b4d5e6f708192a3b4c5d6e7f8\",\n  \"requestId\": \"poa-check-7f3c9a21\",\n  \"name\": \"Amina Bello\",\n  \"country\": \"NG\",\n  \"documentType\": \"utility_bill\",\n  \"address\": \"12 Adeola Odeku Street, Victoria Island, Lagos\"\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://sandbox-api.toden.co/api/v1/checks/address', [
  'body' => '{
  "documentMediaId": "med_3f9a1c2b4d5e6f708192a3b4c5d6e7f8",
  "requestId": "poa-check-7f3c9a21",
  "name": "Amina Bello",
  "country": "NG",
  "documentType": "utility_bill",
  "address": "12 Adeola Odeku Street, Victoria Island, Lagos"
}',
  'headers' => [
    'Authorization' => 'Bearer <apiKey>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://sandbox-api.toden.co/api/v1/checks/address");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"documentMediaId\": \"med_3f9a1c2b4d5e6f708192a3b4c5d6e7f8\",\n  \"requestId\": \"poa-check-7f3c9a21\",\n  \"name\": \"Amina Bello\",\n  \"country\": \"NG\",\n  \"documentType\": \"utility_bill\",\n  \"address\": \"12 Adeola Odeku Street, Victoria Island, Lagos\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "documentMediaId": "med_3f9a1c2b4d5e6f708192a3b4c5d6e7f8",
  "requestId": "poa-check-7f3c9a21",
  "name": "Amina Bello",
  "country": "NG",
  "documentType": "utility_bill",
  "address": "12 Adeola Odeku Street, Victoria Island, Lagos"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://sandbox-api.toden.co/api/v1/checks/address")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```