Skip to content
Constaia

Website integration

Add document upload to your website in an afternoon.

Place the widget on your page and let your users upload their documents. Your secret key never leaves your server.

A ready-to-use widget

Camera, drag and drop, quality warnings and text in several languages. It works with React, Vue or plain HTML.

Secure by design

Publishable keys only work on the domains you authorise and never give access to your data.

Single-use sessions

Your server creates a session that expires after 15 minutes and is valid for a single document.

How it works

  1. You create a publishable key

    From the dashboard, with the list of domains where it can be used.

  2. Your server opens a session

    With the template and your reference. It receives a temporary code.

  3. The widget uploads the document

    Straight from the user's browser to Constaia.

  4. You get the result

    On your server, with your reference, ready to store.

What never happens

  • Your secret key never reaches the browserIf someone tries to use it on a website, we reject it.
  • Nobody reuses a sessionEach one is valid for one document and expires on its own.
  • Nobody uses it on another websiteWe only accept requests from your domains.

A few lines of HTML

The widget is a standard web component. There are also versions for React and Vue.

index.html
<!-- 1. Tu servidor crea una sesión de un solo uso (POST /v1/sessions)
     y entrega al navegador solo el client_secret, válido 15 minutos. -->

<!-- 2. El widget sube el documento; tu clave secreta nunca llega al navegador -->
<script type="module" src="https://cdn.jsdelivr.net/npm/@constaia/widget"></script>

<constaia-upload
  session-token="{{ client_secret }}"
  expect="es_dni"
  lang="es">
</constaia-upload>

Frequently asked questions

Do I need a server?

Only to open the session, which is a very short call. The file goes straight from the browser to Constaia.

Can I change how the widget looks?

Yes: the text, colours and fonts adapt to your website.

And for the record…

Create your free account and validate your first document in five minutes. No card required.