Skip to main content
Legitmark sends three event types. Every webhook destination receives all events automatically.

state_change

Sent when a service request transitions to a new state. This is the primary event for tracking authentication progress and results.

Payload

Fields

string
required
Always "state_change".
string
required
Service request UUID.
string | null
Your internal item ID — the external_id you set when creating the service request.
object
required
string
required
ISO 8601 timestamp of when the state change occurred.

State Transitions

The table below shows the state transitions you may receive:
The most important transition is COMPLETE + APPROVED or COMPLETE + REJECTED — this is the final authentication result. See Service Request States for the full state machine.Using the TypeScript SDK (v0.2.0+), you can check these with isAuthentic(event) and isCounterfeit(event) instead of comparing strings manually. See Handling Webhooks.

media_rejected

Sent when uploaded images fail quality control. Each rejected image includes the side name and rejection reason so you can prompt the user to re-upload specific photos.

Payload

Fields

string
required
Always "media_rejected".
string
required
Service request UUID.
string | null
Your internal item ID.
array
required
Array of rejected images with reasons.
string
required
ISO 8601 timestamp.
When you receive a media_rejected event, the user needs to re-upload the specific rejected sides before the service request can proceed. Prompt them with the side name and message for the best experience.
Using the TypeScript SDK, needsResubmission(event) returns true for this event type. See Handling Webhooks.

invalidate_sr

Sent when a service request is cancelled.

Payload

Fields

string
required
Always "invalidate_sr".
string
required
Service request UUID.
string | null
Your internal item ID.
object
required
string
required
ISO 8601 timestamp.