---
title: "Requesting timestamps from Rest PKI"
description: "Using Rest PKI as an ICP-Brasil timestamp provider over the TSP protocol (RFC 3161) or the REST API, with an access token from the Rest PKI site."
canonical: "https://docs.lacunasoftware.com/en-us/articles/rest-pki/requesting-timestamps"
locale: "en"
product: "Rest PKI (legacy)"
last_updated: "2026-10-12"
---

# Requesting timestamps from Rest PKI

You can use [Rest PKI](https://docs.lacunasoftware.com/en-us/articles/rest-pki) as an ICP-Brasil timestamp provider through the TSP protocol (*Timestamp Protocol*, RFC 3161) or the REST API.

To do this, follow the steps below to get an access token:

1. Sign in to the Rest PKI website (https://pki.rest/)
1. On the **Control Panel**, click the **Generate new access token** button
1. Copy the generated value

Then use one of the ways below to communicate with Rest PKI.

## Communication through the *Timestamp Protocol*

Use these settings to communicate with Rest PKI over TSP:

* Protocol: HTTPS
* Method: POST
* URL: `https://pki.rest/tsp/a402df41-8559-47b2-a05c-be555bf66310`
* Authentication: by HTTP header as below:
    * `Authorization` : `Bearer <Rest PKI access token>`

## Communication through the REST API

Use these settings to call the Rest PKI REST API:

* URL: `https://pki.rest/Api/TimestampPlans/a402df41-8559-47b2-a05c-be555bf66310/Issue`
* Method: POST
* Request headers
  * `Authorization` : `Bearer <Rest PKI access token>`
  * `Content-Type` : `application/json`
* Request
  * `algorithm` : algorithm name (see the supported algorithms below)
  * `value` : hash value to be stamped, Base64 encoded **or**
  * `hexValue` : hash value to be stamped, encoded in hexadecimal (*case insensitive*)
* Response
  * `encodedValue` : timestamp, Base64 encoded
  * `info` : information about the timestamp

Example request with SHA-256 algorithm and Base64 hash:

```json
{
	"algorithm": "SHA256",
	"value": "L80RIvFw2jwpiObzFQN+tuEQQ4E9qnGeYYYd+4DrM8M="
}
```

Example request with SHA-1 algorithm and hash in hex:

```json
{
	"algorithm": "SHA1",
	"hexValue": "3ade2832feafe081f246aa2fb89cb9c7929ac911"
}
```

## Supported algorithms

Currently, the following algorithms are supported:

* SHA-1
  * TSP: 1.3.14.3.2.26
  * API: "SHA1"
* SHA-256
  * TSP: 2.16.840.1.101.3.4.2.1
  * API: "SHA256"
