Skip to main content
When an embedded ceremony reaches a terminal state, such as when the recipient signs the documents, it triggers an event. Your application should listen for these events and respond accordingly. For instance, you can close the iframe in a web app once the ceremony is complete. We offer two event delivery methods: Standard JavaScript messages, ideal for web apps, and redirects, commonly used in mobile and native apps.

Event types

There are 3 types of ceremony events: For ceremony.failed events, the event includes an error_type and an error_message that explains the error:

Event delivery

We offer two ways to deliver the event from inside the ceremony to your application:

Javascript messages

The events are delivered to the parent application as a MessageEvent with a payload. For example the payload for a ceremony.completed event is:
An example for a ceremony.failed event:

Redirects

The events are emitted as 301 redirects to URLs with a special scheme signatureapi-message://. Your app should detect and intercept the visits to URLs with this structure. The event type is included as the host part of the URL, and any other data is included as query parameters, URL-encoded. For example the URL for a ceremony.completed event is:
signatureapi-message://ceremony.completed
The URL for a ceremony.failed event:
signatureapi-message://ceremony.failed/?error_type=not_available&error_message=The+ceremony+is+no+longer+available