# 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 %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.thx.network/developers/api/api-specification.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
