# Init

## Account init

<mark style="color:green;">`POST`</mark> `https://biometrid.com/api/accounts/init`

This endpoint allows you to initialize Biometrid and will return a JWT Authentication Bearer Token.

#### Headers

| Name              | Type   | Description      |
| ----------------- | ------ | ---------------- |
| x-biometridon-sdk | string | standard/full    |
| Accept-Language   | string | en (default), pt |
| Content-Type      | string | application/json |

#### Request Body

| Name   | Type   | Description    |
| ------ | ------ | -------------- |
| key    | string | Account key    |
| secret | string | Account secret |
| flowId | string | Flow id        |

{% tabs %}
{% tab title="200 " %}

```bash
{
  "data": {
    "account": {
      "id": {String},
      "name": {String},
      "key": {String},
      "customization": { // appears only with the full x-biometridon-sdk value
        "colors": {Object},
        "icons": {Object},
        "images": {Object},
        "guide": {Object},
        "steps": [{Object}]
      }
    },
    "token": {
      "type": "bearer",
      "token": {String}
    },
    "livenessToken": {String} // available when a liveness provider is configured
  },
  "meta": {
    "message": "Success."
  },
  "status": true
}
```

{% endtab %}

{% tab title="401 " %}

```javascript
// Wrong secret
{
  "data": {},
  "meta": {
    "message": "Password mismatch",
    "code": "BIOHAHA008"
  },
  "status": false
}
```

{% endtab %}

{% tab title="404 " %}

```javascript
// Account not found
{
  "data": {},
  "meta": {
    "message": "Account not found",
    "code": "BIOASGK001"
  },
  "status": false
}

// Flow not found
{
  "data": {},
  "meta": {
    "message": "Flow not found",
    "code": "BIOFSGB001"
  },
  "status": false
}
```

{% endtab %}
{% endtabs %}
