> For the complete documentation index, see [llms.txt](https://docs.thx.network/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.thx.network/developers/api/api-specification.md).

# API Specification

### Identity

## Derive an identity

<mark style="color:blue;">`GET`</mark> `https://api.thx.network/v1/identity/:salt`

Obtain a deterministic Identity for a given salt. (e.g. a wallet address)

#### Headers

| Name                                        | Type   | Description                                  |
| ------------------------------------------- | ------ | -------------------------------------------- |
| X-API-KEY<mark style="color:red;">\*</mark> | String | TrybId1+W0hNPyHX563wMmM3TIy5isVkIYXaI8ogwps= |

{% tabs %}
{% tab title="200: OK Returns a deterministic Identity for your salt" %}

```json
"36d33a59-5398-463a-ac98-0f7d9b201648"
```

{% endtab %}
{% endtabs %}

## Creates an identity

<mark style="color:green;">`POST`</mark> `https://api.thx.network/v1/identity`

#### Headers

| Name                                        | Type   | Description                                  |
| ------------------------------------------- | ------ | -------------------------------------------- |
| X-API-KEY<mark style="color:red;">\*</mark> | String | TrybId1+W0hNPyHX563wMmM3TIy5isVkIYXaI8ogwps= |

{% tabs %}
{% tab title="201: Created Returns a new Identity" %}

```json
"36d33a59-5398-463a-ac98-0f7d9b201648"
```

{% endtab %}
{% endtabs %}

### Events

## Creates an event for an identity

<mark style="color:green;">`POST`</mark> `https://api.thx.network/v1/events`

#### Headers

| Name                                        | Type   | Description                                  |
| ------------------------------------------- | ------ | -------------------------------------------- |
| X-API-KEY<mark style="color:red;">\*</mark> | String | TrybId1+W0hNPyHX563wMmM3TIy5isVkIYXaI8ogwps= |

#### Request Body

| Name                                           | Type   | Description                          |
| ---------------------------------------------- | ------ | ------------------------------------ |
| identityUuid<mark style="color:red;">\*</mark> | String | 36d33a59-5398-463a-ac98-0f7d9b201648 |
| event<mark style="color:red;">\*</mark>        | String | level\_up                            |

{% tabs %}
{% tab title="201: Created " %}

{% endtab %}
{% endtabs %}
