---
title: "Sign a GOBL document"
method: POST
path: "/sign"
tags: ["Signing"]
---

# Sign a GOBL document

`POST /sign`

Builds the document, wraps it in an envelope, and signs it with the provided private key.

## Request body

- SignRequest
  - `data` unknown, required
  - `template` unknown
  - `privatekey` JWK — JSON Web Key (RFC 7517) — ES256 / P-256.
    - `kty` string
    - `crv` string
    - `alg` string
    - `use` string
    - `kid` string, uuid
    - `x` string — Base64url-encoded X coordinate.
    - `y` string — Base64url-encoded Y coordinate.
    - `d` string — Base64url-encoded private exponent (private keys only).
  - `type` string — Document type hint.
  - `envelop` boolean — Wrap in envelope (always true for signing).

## Response `200`

Signed envelope

- unknown

## Other responses

- `400` — Error response
- `422` — Error response

---

[API](https://skmtc.dev/gobl/apis/gobl-api.md) · [All operations](https://skmtc.dev/gobl/apis/gobl-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/gobl/gobl-api/revisions/66ef451fe34b/schema)
