# Stamp API

## Stamp

<mark style="color:green;">`POST`</mark> `https://api.token-project.eu/notarization/stamp`

Creates a timestamp for a given SHA-256 hash hexadecimal digest.

#### Headers

| Name                                            | Type   | Description                       |
| ----------------------------------------------- | ------ | --------------------------------- |
| Content-Type                                    | string | application/x-www-form-urlencoded |
| Authorization<mark style="color:red;">\*</mark> | string | Bearer: $TOKEN                    |

#### Request Body

| Name                                   | Type   | Description  |
| -------------------------------------- | ------ | ------------ |
| hash<mark style="color:red;">\*</mark> | string | SHA-256 hash |

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

```
{
    "transactionId": "1b9e6cb48098bc1fd8d8bd44c53e92c394c06a41ed50ab5845ed3e8b36e9f012"
}
```

{% endtab %}
{% endtabs %}

```
curl -L -X POST 'https://api.token-project.eu:443/notarization/stamp' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Authorization: Bearer $TOKEN' \
--data-urlencode 'hash=$HASH'
```

## Get a receipt from a HASH

<mark style="color:blue;">`GET`</mark> `https://api.token-project.eu/notarization/stamp/$STAMP`

Retrieves all receipts (also known as proofs) for a certain HASH

#### Headers

| Name                                            | Type   | Description                       |
| ----------------------------------------------- | ------ | --------------------------------- |
| Content-Type                                    | string | application/x-www-form-urlencoded |
| Authorization<mark style="color:red;">\*</mark> | string | Bearer: $TOKEN                    |

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

```
[
    {
        "docType": "stamp",
        "hash": "2f3f3a85340bde09b505b0d37235d1d32a674e43a66229f9a205e7d8d5328ed1"
    }
]
```

{% endtab %}
{% endtabs %}

```
curl -L -X GET 'https://api.token-project.eu:443/notarization/stamp/$STAMP' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Authorization: Bearer $TOKEN'
```

## Get a receipt from a Hash \[DEPRECATED]

<mark style="color:blue;">`GET`</mark> `https://api.token-project.eu/notarization/blockinfos/stamp/keys/$HASH`

Retrieves all receipts (also known as proofs) for a certain hash.\
\[DEPRECATED] Use get /stamp instead

#### Headers

| Name                                            | Type   | Description                       |
| ----------------------------------------------- | ------ | --------------------------------- |
| Content-Type                                    | string | application/x-www-form-urlencoded |
| Authorization<mark style="color:red;">\*</mark> | string | Bearer: $TOKEN                    |

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

```
[
    {
        "docType": "stamp",
        "hash": "2f3f3a85340bde09b505b0d37235d1d32a674e43a66229f9a205e7d8d5328ed1"
    }
]
```

{% endtab %}
{% endtabs %}

## All stamps

<mark style="color:blue;">`GET`</mark> `https://api.token-project.eu/notarization/stamps`

Retrieves all stamps made by the requesting client, ordered by date, from newest to oldest.

#### Headers

| Name                                            | Type   | Description                       |
| ----------------------------------------------- | ------ | --------------------------------- |
| Content-Type                                    | string | application/x-www-form-urlencoded |
| Authorization<mark style="color:red;">\*</mark> | string | Bearer: $TOKEN                    |

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

```
[
    {
        "docType": "stamp",
        "hash": "2f3f3a85340bde09b505b0d37235d1d32a674e43a66229f9a205e7d8d5328ed1"
    },
    {
        "docType": "stamp",
        "hash": "2f3f3a85340bde09b505b0d37235d1d32a674e43a66229f9a205e7d8d5328ed16"
    },
    {
        "docType": "stamp",
        "hash": "oiam9yZ2U3NzMiLCJvcmdOYW1lIjoiT3JnMSIsImlhdCI6MTU0OTk5NzU3OX0"
    }
    ...
]
```

{% 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.token-project.eu/notarization/stamp-api.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.
