Skip to main content

Overview

Legitmark provides authentication APIs for partners who intend to use Legitmark programmatically in their workflows. The integration enables access to Legitmark’s highly capable workflows, processes and authentication through a structured workflow that captures requirements upfront and provides real-time results.

Setup

1

Get set up as an organization

If you have a Legitmark account but need to be set up as an organization, contact accounts@legitmark.com to discuss more. If you don’t have an account yet, they can get you started.
2

Create an API key

Go to Developer Settings and create a new API key. Keys use the format leo_xxx and are used to authenticate all API requests.
3

Add a webhook destination (optional)

In Developer Settings, add a webhook destination with your HTTPS endpoint URL to receive real-time notifications when authentication completes, images are rejected, or requests are cancelled.Don’t have an endpoint ready? Use Svix Play to generate a temporary URL for testing.
4

Install the SDK

npm install legitmark

TypeScript SDK

The fastest way to integrate is with the official TypeScript SDK:
import { Legitmark } from 'legitmark';

const legitmark = new Legitmark('leo_your_api_key');

const { sr } = await legitmark.sr.create({
  service: 'service-uuid',
  item: { category: 'category-uuid', type: 'type-uuid', brand: 'brand-uuid' },
});

await legitmark.images.uploadForSide(sr.uuid, sideUuid, './photo.jpg');
await legitmark.sr.submit(sr.uuid);
The SDK includes full TypeScript types, automatic retries, and handles the complete authentication workflow — including typed webhook event handling for processing results. See the SDK documentation for detailed usage.

Integration Guide

Quick Reference