Skip to content
TrueSealed
Guide menu · Quickstart

API guide

Quickstart

Issue your first document in a few minutes.

1. Create a key

#
  1. Sign in as an organization admin.
  2. Open API and webhooks in the menu and choose Create key.
  3. Give it a name you will recognise, such as Student records, and copy the key. It is shown only once.

Keep the key out of your code: put it in an environment variable, as every example in this guide does.

Open API and webhooks

Store the key for this terminal session
export SEALCHECK_API_KEY=sc_your_key_here

2. Find your template

#

A template decides how the PDF looks. Your organization made at least one when it signed up. List them and note the id of the one you want.

You can skip this: without a template_id, your oldest template is used.

Request

curl 'https://truesealed.com/api/v1/templates' \
  -H "Authorization: Bearer $SEALCHECK_API_KEY" \
  -H 'Accept: application/json'
Response
{
    "data": [
        {
            "id": "01m7p0nr39388waqvbw0radjxa",
            "object": "template",
            "name": "Certificate",
            "orientation": "landscape"
        }
    ]
}

3. Issue a document

#

Send who it is for and what it is. The answer is the new document, with its own id and verification_url.

Because the example gives an email address, the holder is emailed their PDF straight away.

The Idempotency-Key header makes the request safe to retry: if your connection drops and you send it again, you get the same document back instead of a second one. Use something unique to this document in your own system, such as an enrolment number.

Every field you can send

Request

curl -X POST 'https://truesealed.com/api/v1/documents' \
  -H "Authorization: Bearer $SEALCHECK_API_KEY" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: enrolment-48213' \
  -d '{
      "recipient_name": "Ada Lovelace",
      "recipient_email": "[email protected]",
      "title": "Certificate in First Aid",
      "template_id": "01m7p0nr39388waqvbw0radjxa",
      "expires_at": "2028-03-01",
      "fields": {
          "grade": "Distinction"
      }
  }'
Response · 201
{
    "data": {
        "id": "rut4qvhw55lxp5zjzeduxv3qhkqkdqi2",
        "object": "document",
        "type": "generated",
        "status": "valid",
        "title": "Certificate in First Aid",
        "recipient_name": "Ada Lovelace",
        "recipient_email": "[email protected]",
        "fields": {
            "grade": "Distinction"
        },
        "issued_at": "2026-03-01",
        "expires_at": "2028-03-01",
        "revoked_at": null,
        "revoked_reason": null,
        "template_id": "01m7p0nr39388waqvbw0radjxa",
        "replaces": null,
        "verification_url": "https://truesealed.com/v/rut4qvhw55lxp5zjzeduxv3qhkqkdqi2",
        "file_sha256": "3a7bd3e2360a3d29eea436fcfb7e44c735d117c42d1c1835420b6b9942dd4f1b",
        "created_at": "2026-03-01T09:30:00+00:00"
    }
}

4. Check it like anyone would

#

Open the verification_url from the answer, or scan the QR code on the PDF. That is the page anyone sees: your organization's name, who the document is for, and whether it is valid, expired or revoked.

Anyone holding the PDF can also upload it on that page. It is compared with the fingerprint you got as file_sha256, so a changed copy shows as not matching.

Your document also appears under Documents in your organization's area, and the audit log shows the key's owner issued it.

Next steps

#