> For the complete documentation index, see [llms.txt](https://esignature.govstack.global/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://esignature.govstack.global/8-service-apis.md).

# 8 Service APIs

A Set of microservices is defined to receive requests from other GovStack-compatible Building Blocks and third-party Services with relevant inputs and return processed results from key digital functionalities of this Building Block. This section provides a reference for APIs that should be implemented by this Building Block. The APIs defined here establish a blueprint for how the Building Block will interact with other Building Blocks or third-party services. Additional APIs may be implemented by the Building Block, but the listed APIs define a minimal set of functionality that should be provided by any implementation of this Building Block.

eSignature Building Block must expose its microservices through RESTful API interfaces as defined by [OpenAPI v3+ standards](https://swagger.io/specification/).  A summary of the APIS exposed by this Building Block is summarized in the table below.&#x20;

### 8.1 eSignature with one-time certificate

{% openapi src="<https://raw.githubusercontent.com/GovStackWorkingGroup/bb-esignature/main/api/swagger.yaml>" path="/{version}/sign/onetime" method="post" %}
<https://raw.githubusercontent.com/GovStackWorkingGroup/bb-esignature/main/api/swagger.yaml>
{% endopenapi %}

### 8.2 eSignature with user's eSignature creation device (SCD)

#### 8.2.1 Certificate creation

{% openapi src="<https://raw.githubusercontent.com/GovStackWorkingGroup/bb-esignature/main/api/swagger.yaml>" path="/{version}/cert/create" method="post" %}
<https://raw.githubusercontent.com/GovStackWorkingGroup/bb-esignature/main/api/swagger.yaml>
{% endopenapi %}

#### 8.2.2 List certificates

{% openapi src="<https://raw.githubusercontent.com/GovStackWorkingGroup/bb-esignature/main/api/swagger.yaml>" path="/{version}/cert/list" method="get" %}
<https://raw.githubusercontent.com/GovStackWorkingGroup/bb-esignature/main/api/swagger.yaml>
{% endopenapi %}

#### 8.2.3 Update certificate

{% openapi src="<https://raw.githubusercontent.com/GovStackWorkingGroup/bb-esignature/main/api/swagger.yaml>" path="/{version}/cert/{certificateId}" method="patch" %}
<https://raw.githubusercontent.com/GovStackWorkingGroup/bb-esignature/main/api/swagger.yaml>
{% endopenapi %}

The update API can be used to revoke the certificate. All revoked certificates will be available over [OCSP](https://www.rfc-editor.org/rfc/rfc8954.html).&#x20;

#### 8.2.4 eSignature with user's device

{% openapi src="<https://raw.githubusercontent.com/GovStackWorkingGroup/bb-esignature/main/api/swagger.yaml>" path="/{version}/sign/pseudonym" method="post" %}
<https://raw.githubusercontent.com/GovStackWorkingGroup/bb-esignature/main/api/swagger.yaml>
{% endopenapi %}

#### 8.2.5 Webservice to enter user pseudonym

{% openapi src="<https://raw.githubusercontent.com/GovStackWorkingGroup/bb-esignature/main/api/swagger.yaml>" path="/{version}/sign/interactivePseudonym" method="get" %}
<https://raw.githubusercontent.com/GovStackWorkingGroup/bb-esignature/main/api/swagger.yaml>
{% endopenapi %}

#### 8.2.6 User pseudonym API

{% openapi src="<https://raw.githubusercontent.com/GovStackWorkingGroup/bb-esignature/main/api/swagger.yaml>" path="/{version}/token/pseodonym/{pseudonym}" method="get" %}
<https://raw.githubusercontent.com/GovStackWorkingGroup/bb-esignature/main/api/swagger.yaml>
{% endopenapi %}

#### 8.2.7 Get signature response

{% openapi src="<https://raw.githubusercontent.com/GovStackWorkingGroup/bb-esignature/main/api/swagger.yaml>" path="/{version}/sign/response/{signatureId}" method="get" %}
<https://raw.githubusercontent.com/GovStackWorkingGroup/bb-esignature/main/api/swagger.yaml>
{% endopenapi %}

#### 8.2.8 Callback service API

{% openapi src="<https://raw.githubusercontent.com/GovStackWorkingGroup/bb-esignature/main/api/swagger.yaml>" path="/{version}/esignature/callback" method="get" %}
<https://raw.githubusercontent.com/GovStackWorkingGroup/bb-esignature/main/api/swagger.yaml>
{% endopenapi %}

### 8.3 Audit log

{% openapi src="<https://raw.githubusercontent.com/GovStackWorkingGroup/bb-esignature/main/api/swagger.yaml>" path="/{version}/audit/log" method="get" %}
<https://raw.githubusercontent.com/GovStackWorkingGroup/bb-esignature/main/api/swagger.yaml>
{% endopenapi %}


---

# 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://esignature.govstack.global/8-service-apis.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.
