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

# timeseal

### Overview

The `/timestamp` endpoint is a part of our blockchain-based timestamping API that allows you to securely timestamp data on the blockchain. Timestamping data on the blockchain ensures the immutability and tamper-proof nature of the data, providing strong evidence of the data's existence and integrity at a specific point in time.

To access the `/timestamp` endpoint, you need a valid API key, the data you want to timestamp, and the type of change you are making to the data. The API will then process your request, generate a cryptographic hash of the data, and record it as a timestamp on the designated blockchain.

### Request Parameters

The `/timestamp` endpoint requires the following parameters in the request body:

#### `data` (string, required)

The data you want to timestamp on the blockchain. It can be any string or JSON data representing the information you want to store.

#### `type` (string, required)

The type of change you are making to the data. This parameter helps in categorizing different types of updates to the data. Examples of type include "create," "update," or "delete". This information is not stored on the blockchain and is only used as metadata.

### Example Request

```javascript
await axios.post(
  "https://api.timeseal.com/v1/timestamp",
  { data: "{inventoryItems: 5}", type: "created" },
  { 
    headers: { 
      apiKey: process.env.TIMESEAL_API_KEY
    }
  },
);

```

### Response

The API will respond with a JSON object containing the timestamping details.

#### Example Response

```json
{
    "status": "success",
    "msg": "operation completed successfully !",
    "txIds": [
        {
            "txId": "cb8f8e8c2116dd7177a63b5726dbaed332c37691bd5045d1855c6d7f9f81d53e",
            "url": "B://cb8f8e8c2116dd7177a63b5726dbaed332c37691bd5045d1855c6d7f9f81d53e"
        }
    ],
    "errors": []
}
```

* `status` (string): Indicates the status of the operation. Possible values are "success", "error" or other relevant status indicators.
* `msg` (string): A human-readable message providing information about the outcome of the operation.
* `txIds` (array): An array containing objects with information about transaction IDs and their corresponding URLs.
  * `txId` (string): The unique identifier for a transaction.
  * `url` (string): The URL associated with the transaction ID, typically in the format "B://txId".
* `errors` (array): An array that may contain error objects if there were issues during the operation. Each error object should provide relevant information about the error.

{% hint style="warning" %}

### Warning

Please be advised that when utilizing our services, all data is stored as-is on the blockchain. It is essential to recognize that information stored on the blockchain is publicly visible and can be accessed by anyone. Therefore, we strongly recommend encrypting any sensitive or private data before storing it on the blockchain. Failing to do so may expose your confidential information to unintended parties. By using our service, you acknowledge the inherent risks associated with the transparency of blockchain technology, and you bear the responsibility to take appropriate measures to protect your privacy.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.timeseal.com/the-api/timeseal.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
