# TSA Methods

### Qualified Electronic Time stamping of document hashes according to RFC3161

Access to the service can be secured in two ways. either using API-KEY or using HTTP Basic Authentication

{% openapi src="<https://3506709286-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLcKVZXOrBb4jDUyxEWMc%2Fuploads%2Fhjpyez99IbtowAQFhxrR%2Fswagger.json?alt=media&token=a12a6e62-f9fe-4329-b2ef-f659f7de3c93>" path="/tsa/stamp/rfc3161/{processId}" method="post" %}
[swagger.json](https://3506709286-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLcKVZXOrBb4jDUyxEWMc%2Fuploads%2Fhjpyez99IbtowAQFhxrR%2Fswagger.json?alt=media\&token=a12a6e62-f9fe-4329-b2ef-f659f7de3c93)
{% endopenapi %}

The hash to sign needs to be send in the request body as `application/octet-stream`

### Stamp the document hash

{% openapi src="<https://3506709286-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLcKVZXOrBb4jDUyxEWMc%2Fuploads%2Fhjpyez99IbtowAQFhxrR%2Fswagger.json?alt=media&token=a12a6e62-f9fe-4329-b2ef-f659f7de3c93>" path="/tsa/stamp/{processId}" method="post" %}
[swagger.json](https://3506709286-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLcKVZXOrBb4jDUyxEWMc%2Fuploads%2Fhjpyez99IbtowAQFhxrR%2Fswagger.json?alt=media\&token=a12a6e62-f9fe-4329-b2ef-f659f7de3c93)
{% endopenapi %}

The document hash to be processed needs to be send in the request as JSON. The value of the `hash` field must be encoded according to `BASE64.`

For this method, access is secured only using API-KEY
