---
title: "Raise the signed output to a long-term level"
method: POST
path: "/v1/signings/{signingId}/archive"
tags: ["Signings"]
---

# Raise the signed output to a long-term level

`POST /v1/signings/{signingId}/archive`

## Request

- Base URL: `https://sign-api.tvarka.pro`
- URL: `https://sign-api.tvarka.pro/v1/signings/{signingId}/archive`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-Api-Key`
  - OAuth 2 (authorization code, authorization URL `https://sign-api.tvarka.pro/oauth/authorize`, token URL `https://sign-api.tvarka.pro/oauth/token`, scopes: `sign.read`, `sign.signings`)

PDF goes PAdES-B-T to B-LT, ASiC-E goes XAdES-T to XAdES-LT: the
certificate chain and fresh revocation evidence are embedded so the
signature can still be validated once the signing certificate has
expired.

ADOC is refused by name. ADOC-V1.0 specifies XAdES-T and its
validators expect that level, so "upgrading" one would be a
conformance risk dressed as a favour.

Already-archived output comes back unchanged with `upgraded: false`,
so calling this twice costs a parse and not a second signature. The
pre-archive version is kept - an upgrade adds a version, never
replaces one.

## Path parameters

- `signingId` string, uuid, required

## Response `200`

The level now held, and whether this call raised it.

- object
  - `signingId` string, uuid
  - `level` string
  - `upgraded` boolean
  - `document` SignedDocument: The newest signed output. Absent until somebody signs, except on a sandbox simulation, where it describes the unsigned artifact.
    - `sha256` string
    - `bytes` integer
    - `mimeType` string
    - `sandbox` boolean: Present and true only on a sandbox simulation. The bytes are a real file to which no signature was added.
    - `signed` boolean: Present and false only on a sandbox simulation. Absent on a real signing, where the output is signed by definition.

## Other responses

- `400`: An RFC 9457 problem document.
- `401`: An RFC 9457 problem document.
- `402`: An RFC 9457 problem document.
- `403`: An RFC 9457 problem document.
- `404`: An RFC 9457 problem document.
- `409`: An RFC 9457 problem document.
- `413`: An RFC 9457 problem document.
- `422`: An RFC 9457 problem document.
- `429`: An RFC 9457 problem document.
- `503`: An RFC 9457 problem document.

---

[API](https://skmtc.dev/tvarka/apis/tvarka-sign-api.md) · [All operations](https://skmtc.dev/tvarka/apis/tvarka-sign-api/llms.txt) · [OpenAPI document](https://skmtc.dev/tvarka/apis/tvarka-sign-api/revisions/e3fdd995c013?raw)
