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

# Signing

## Sign a holder payload (Service Provider)

> Service Provider endpoint. Signs an arbitrary payload with the signing key of the holder named by userId and returns a JWS compact serialization.

```json
{"openapi":"3.0.0","info":{"title":"EqusDTK Web Custodial Wallet Documentation","version":"0.1.2"},"tags":[{"name":"Signing","description":""}],"security":[{"sp":[]},{"tenant":[]},{"sp":[]}],"components":{"securitySchemes":{"sp":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Service Provider. Token of the Service Provider client in the `agents` realm, with no `tenantId` claim. Authorize one bearer scheme at a time."},"tenant":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Tenant. Token of a Tenant machine client or of a Tenant portal user, carrying the `tenantId` claim. Authorize one bearer scheme at a time."}},"schemas":{"CreateSigningRequestRequest":{"type":"object","properties":{"payload":{"type":"string","description":"Base64-encoded payload to sign"},"userId":{"type":"string","description":"Holder user id to sign for"}},"required":["payload","userId"]}}},"paths":{"/api/v1/signing/requests":{"post":{"description":"Service Provider endpoint. Signs an arbitrary payload with the signing key of the holder named by userId and returns a JWS compact serialization.","operationId":"SigningController_sign_api/v1","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSigningRequestRequest"}}}},"responses":{"200":{"description":"Payload signed; returns the JWS compact serialization"},"400":{"description":"Invalid request body, or the holder key algorithm is unsupported for JWS"},"404":{"description":"Holder DID not found, or the holder signing key could not be resolved"}},"summary":"Sign a holder payload (Service Provider)","tags":["Signing"]}}}}
```

## Sign own payload (Holder)

> Holder endpoint. Signs an arbitrary payload with the caller signing key and returns a JWS compact serialization. The holder is derived from the token. Agents use the Service Provider endpoint.

```json
{"openapi":"3.0.0","info":{"title":"EqusDTK Web Custodial Wallet Documentation","version":"0.1.2"},"tags":[{"name":"Signing","description":""}],"security":[{"user":[]}],"components":{"securitySchemes":{"user":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Holder user. `users` realm token with `principal_type=user`. Authorize one bearer scheme at a time."}},"schemas":{"CreateUserSigningRequestRequest":{"type":"object","properties":{"payload":{"type":"string","description":"Base64-encoded payload to sign"}},"required":["payload"]}}},"paths":{"/api/v1/signing/requests/user":{"post":{"description":"Holder endpoint. Signs an arbitrary payload with the caller signing key and returns a JWS compact serialization. The holder is derived from the token. Agents use the Service Provider endpoint.","operationId":"SigningController_signForHolder_api/v1","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserSigningRequestRequest"}}}},"responses":{"200":{"description":"Payload signed; returns the JWS compact serialization"},"400":{"description":"Invalid request body, or the holder key algorithm is unsupported for JWS"},"404":{"description":"Holder DID not found, or the holder signing key could not be resolved"}},"summary":"Sign own payload (Holder)","tags":["Signing"]}}}}
```

## Sign multiple holder payloads (Service Provider / Tenant)

> Endpoint for Service Provider or Tenant. Signs a batch of payloads, each with the signing key of the holder named by its userId. Items are processed independently; a failing item does not abort the batch.

```json
{"openapi":"3.0.0","info":{"title":"EqusDTK Web Custodial Wallet Documentation","version":"0.1.2"},"tags":[{"name":"Signing","description":""}],"security":[{"sp":[]},{"tenant":[]},{"sp":[]}],"components":{"securitySchemes":{"sp":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Service Provider. Token of the Service Provider client in the `agents` realm, with no `tenantId` claim. Authorize one bearer scheme at a time."},"tenant":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Tenant. Token of a Tenant machine client or of a Tenant portal user, carrying the `tenantId` claim. Authorize one bearer scheme at a time."}},"schemas":{"CreateSigningRequestsRequest":{"type":"object","properties":{"requests":{"description":"Signing requests to process","type":"array","items":{"$ref":"#/components/schemas/CreateSigningRequestRequest"}}},"required":["requests"]},"CreateSigningRequestRequest":{"type":"object","properties":{"payload":{"type":"string","description":"Base64-encoded payload to sign"},"userId":{"type":"string","description":"Holder user id to sign for"}},"required":["payload","userId"]}}},"paths":{"/api/v1/signing/requests/batch":{"post":{"description":"Endpoint for Service Provider or Tenant. Signs a batch of payloads, each with the signing key of the holder named by its userId. Items are processed independently; a failing item does not abort the batch.","operationId":"SigningController_signMany_api/v1","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSigningRequestsRequest"}}}},"responses":{"200":{"description":"Per-item signing results, index-aligned with the submitted requests; each entry reports success or an error code"},"400":{"description":"Malformed batch request body (e.g. empty list or invalid item)"}},"summary":"Sign multiple holder payloads (Service Provider / Tenant)","tags":["Signing"]}}}}
```


---

# 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://docs.toolkit.equs.ai/api/web-wallet-api/signing.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.
