> For the complete documentation index, see [llms.txt](https://specs.govstack.global/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://specs.govstack.global/esignature/8-service-apis.md). Agents can also search and read this documentation through its [MCP server](https://specs.govstack.global/~gitbook/mcp).

# 8 Service APIs

This section provides a reference for APIs that should be implemented by this Building Block.

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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://specs.govstack.global/esignature/8-service-apis.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
