Web Submission Integration
- Designed for business users integrating LegitApp authentication services into their platforms.
- All timestamps in this guide use UTC (UTC+0).
- Last updated on: 2026 November 25
- Developer Portal (Production): http://developer.legitapp.com/
- Developer Portal (Sandbox): http://developer-sandbox.legitapp.com/
Flow Diagram

Overview
The LegitApp Developer API enables third-party applications to integrate LegitApp's authentication services into their systems with API and/or Web Submission. Requests and responses use JSON, except image uploads, which use multipart/form-data.
Workflows
Follow the steps below to create and share an authentication request.
Step 1: Create an Authentication IntentUse Create Authentication Intent (POST /authentication_intent) to create a submission link for the recipient. The intent is valid for 30 days from creation. Creating an intent does not submit an authentication or deduct tokens; tokens are charged when the recipient successfully submits the authentication.
You can optionally configure the following settings:
- Configure Authentication Restrictions
- Specify
category_id,brand_id, andmodel_idto require the item being authenticated to match the selected category, brand, and model. - Set
tag_enabledtotrueto require the recipient to use a physical tag during authentication. - Set
user_custom_code_enabledtotrueto require the recipient to enter a custom code during authentication. Alternatively, provideuser_custom_codewhen creating the authentication intent. This pre-fills the code and reduces the risk of recipient input errors.
- Specify
- Set Display Language
- Set
languageto choose the locale used in the returned authentication URL. English is used by default. - This setting is independent of the
Accept-Languagerequest header and the webhook language configured in the Developer Portal.
- Set
Share the returned authentication_url with the recipient. The same link can be used to submit the initial authentication and, when requested, upload additional photos before the intent expires.
⚠️ Anyone with the authentication URL can access the submission flow. Keep the URL private and share it only with the intended recipient.
The authentication_intent_id matches the authentication_id of the authentication created from that intent. Store it as a string to track the request across API responses and webhook events.
Example of an intent object:
{
"authentication_intent_id": "4147106584014339",
"authentication_url": "https://submit.legitapp.com/authentication/ailive32fc0b5ebc14afc40a559990215295ce73ea94ac543b45e395d79ac82c6c8ecbe798dedc67ae8cc4acd8f5333a2f7201673844d9449a448939656250e876b53387741c9620b8755c807c48bf27ca7b10f801e01e1ef0128bc6802f8b6514a0c8f3b3124024e8d985993303ad152fda7aedc76e4336cb5f4e92",
"expired_at": "2026-12-25T10:35:32.447Z"
}
The recipient opens the authentication URL in a browser and follows the on-screen instructions to select the item, take photos and submit the authentication. If a physical tag is required, the recipient scans its QR code as part of the submission flow.
Depending on the authentication status, the same link lets the recipient:
- Submit a new authentication, or
- Upload additional photos when requested by a checker.
The system automatically selects the lowest-token-cost available standard turnaround option. The recipient does not need to select a turnaround time. Tokens are deducted from the account associated with the developer secret key when the authentication is submitted.



Webhook events notify your system when photos are submitted, a checker sends a message, additional photos are requested, or the authentication is completed. Register your webhook endpoint in the Developer Portal and handle the event types documented below.
For details of a completed Authentic or Replica authentication, use GET /authentication/:id. To obtain its PDF URL, use POST /authentication/:id/pdf_certificate; an existing current PDF is reused. Authentication completion does not automatically generate a PDF.
These endpoints, together with cancellation of eligible authentications, are documented in LegitApp Server API (v1). They support Web Submission authentications under the same account.

API
Authorization
All API requests must be authorized with a developer secret key. Set this key in the HTTP Authorization header:
Authorization: Bearer DEVELOPER_SECRET_KEY
Keep your developer secret key on your server. Use the key issued for the target environment; Production and Sandbox credentials are separate.
Developer Secret Key
You can find your developer secret key in the Developer Portal.

Example Code
This example demonstrates how to use TypeScript with Express to make LegitApp API calls and handle webhook events from the LegitApp server
https://github.com/legitappcom/legitapp-developer-api-example
Postman collection for testing this sample code
Base URL
Production: https://developer-api.legitapp.com/v1
Localization
Set the optional Accept-Language header to a single supported language code. It controls localized catalog fields and error messages where translations are available. English is used when the header is omitted or unsupported; localized catalog fields also fall back to English when a translation is unavailable. Brand and model titles are not localized by this header.
| Language | Code |
|---|---|
| English | en |
| Chinese (Simplified) | zh-Hans |
| Chinese (Traditional) | zh-Hant |
| Japanese | ja |
| Korean | ko |
| Polish | pl |
| Spanish | es |
| Vietnamese | vi |
| Thai | th |
| Arabic | ar |
| German | de |
| French | fr |
| Italian | it |
| Dutch | nl |
| Russian | ru |
Webhook content uses the language configured in the Developer Portal, independently of the language used for API requests.
The language body parameter in Create Authentication Intent selects the locale in the returned submission URL. English is the default, and unsupported codes fall back to English. It does not change the language of API error messages or webhook content.
Endpoints
Each endpoint's Response Fields table describes its successful response body. [] denotes an array element. Fields marked optional may be omitted; fields marked or null may contain an explicit null value. Error responses follow the shared Error Object Structure below.
-
Get Category List
GET/product_categoryReturn a list of supported categories. The id of the selected category is required for other endpoints.
Headers
Name Type Description Authorization* String Bearer {{DEVELOPER_SECRET_KEY}} Accept-Language String Language of category titles. English by default. See Localization for supported language codes and fallback behavior. Response Fields
Field Type Description dataArray of objects Supported categories. An empty array means no categories match the request. data[].idNumber Category ID. Use this value as category_idin subsequent requests.data[].titleString Category title in the requested language, with English fallback. data[].icon_image_urlString or null Category icon URL, when available. -
cURL Example:
GEThttps://developer-api.legitapp.com/v1/product_categorycurl --location 'https://developer-api.legitapp.com/v1/product_category' \--header 'Content-Type: application/json' \--header 'Authorization: Bearer DEVELOPER_SECRET_KEY' \--header 'Accept-Language: en' -
200: OK
{"data": [{"id": 1,"title": "Sneakers","icon_image_url": "https://legitapp-prod.oss-accelerate.aliyuncs.com/2022121855af36a336d46fa9.png"},{"id": 2,"title": "Streetwear","icon_image_url": "https://legitapp-prod.oss-accelerate.aliyuncs.com/2020080594643c63fba91706.png"}]} -
200: OK (No matching records)
{"data": []}
-
-
Get Brand List
GET/product_brandReturn a list of supported brands based on the selected category. The id of the selected brand is required for other endpoints.
Headers
Name Type Description Authorization* String Bearer {{DEVELOPER_SECRET_KEY}} Query Parameters
Name Type Description category_id* Number id in category object Response Fields
Field Type Description dataArray of objects Supported brands for the selected category. An empty array means no brands match the request. data[].idNumber Brand ID. Use this value as brand_idin subsequent requests.data[].titleString or null Brand title. This field is not localized by Accept-Language.data[].slugString or null URL-friendly brand identifier, when available. data[].icon_image_urlString or null Brand icon URL, when available. -
cURL Example:
GEThttps://developer-api.legitapp.com/v1/product_brand?category_id=1curl --location 'https://developer-api.legitapp.com/v1/product_brand?category_id=1' \--header 'Content-Type: application/json' \--header 'Authorization: Bearer DEVELOPER_SECRET_KEY' -
200: OK
{"data": [{"id": 1,"title": "Air Jordan","slug": "air-jordan","icon_image_url": "https://legitapp-prod.oss-accelerate.aliyuncs.com/20200805a364b32e39ccf854.png"},{"id": 2,"title": "Nike","slug": "nike","icon_image_url": "https://legitapp-prod.oss-accelerate.aliyuncs.com/202008057146e477927daff3.png"}]} -
200: OK (No matching records)
{"data": []}
-
-
Get Model List
GET/product_modelReturn a list of supported models based on the selected category and brand. The id of the selected model is required for other endpoints.
Headers
Name Type Description Authorization* String Bearer {{DEVELOPER_SECRET_KEY}} Query Parameters
Name Type Description category_id* Number id in category object brand_id* Number id in brand object Response Fields
Field Type Description dataArray of objects Supported models for the selected category and brand. An empty array means no models match the request. data[].idNumber Model ID. Use this value as model_idin subsequent requests.data[].titleString or null Model title. This field is not localized by Accept-Language.data[].icon_image_urlString or null Model icon URL, when available. -
cURL Example:
GEThttps://developer-api.legitapp.com/v1/product_model?category_id=1&brand_id=1curl --location 'https://developer-api.legitapp.com/v1/product_model?category_id=1&brand_id=1' \--header 'Content-Type: application/json' \--header 'Authorization: Bearer DEVELOPER_SECRET_KEY' -
200: OK
{"data": [{"id": 1,"title": "Jordan 1","icon_image_url": "https://legitapp-prod.oss-accelerate.aliyuncs.com/20200805ad9a76acf6fb75f1.png"},{"id": 2,"title": "Jordan 2","icon_image_url": "https://legitapp-prod.oss-accelerate.aliyuncs.com/202008057200b9222fb14047.png"}]} -
200: OK (No matching records)
{"data": []}
-
-
Create Authentication Intent
POST/authentication_intentCreate an authentication intent and return a submission URL for the recipient. The intent is valid for 30 days. Creating an intent does not submit an authentication or deduct tokens.
Headers
Name Type Description Authorization* String Bearer {{DEVELOPER_SECRET_KEY}} Accept-Language String Language of error messages. English by default. See Localization for supported language codes and fallback behavior. Body Parameters
Name Type Description category_idNumber or null Optional category ID from Get Category List. When specified, the recipient's item must use this category. Required when tag_enabledistrue.brand_idNumber or null Optional brand ID from Get Brand List. When specified, the recipient's item must use this brand. model_idNumber or null Optional model ID from Get Model List. When specified, the recipient's item must use this model. It must belong to the selected category and brand when those IDs are provided. tag_enabledBoolean Optional. Defaults to false. Set totrueto require a physical tag in the submission flow. Specify a supportedcategory_id: Sneakers, Luxury Handbags, Luxury Clothing, Luxury Shoes, Luxury Jewelry / Accessories, or Luxury Watches.user_custom_code_enabledBoolean Optional. Defaults to false. Set totrueto require the recipient to provide a custom code.user_custom_codeString or null Optional custom code to pre-fill in the submission page. This field is not an idempotency key and is not guaranteed to be unique. languageString or null Optional language code for the locale in the returned submission URL. English ( en) by default. See Localization for supported codes and fallback behavior. Independent ofAccept-Languageand the webhook language.Notes
- All body parameters are optional. Omit the body or send
{}to create an intent without item restrictions, with English as the default submission language. - An intent can create one authentication. Creating the intent does not charge tokens; tokens are deducted when the recipient successfully submits the authentication.
- Share
authentication_urlonly with the intended recipient. Anyone with the link can access the submission flow.
Response Fields
Field Type Description authentication_intent_idString Intent identifier. It matches the authentication_idof the authentication created from this intent. Store this value as a string.authentication_urlString Private submission URL for the recipient. Use the exact URL returned for the target environment. The same link supports initial submission and requested additional photos before expiry. expired_atString UTC expiry timestamp in ISO 8601 format, 30 days after intent creation. The submission link cannot be used after this time. -
cURL Example:
POSThttps://developer-api.legitapp.com/v1/authentication_intentcurl --location 'https://developer-api.legitapp.com/v1/authentication_intent' \--header 'Content-Type: application/json' \--header 'Authorization: Bearer DEVELOPER_SECRET_KEY' \--data '{"category_id": 1,"brand_id": 1,"model_id": 1,"tag_enabled": true,"user_custom_code_enabled": true,"user_custom_code": "item-custom-code","language": "en"}' -
201: Created
{"authentication_intent_id": "4147106584014339","authentication_url": "https://submit.legitapp.com/authentication/ailive32fc0b5ebc14afc40a559990215295ce73ea94ac543b45e395d79ac82c6c8ecbe798dedc67ae8cc4acd8f5333a2f7201673844d9449a448939656250e876b53387741c9620b8755c807c48bf27ca7b10f801e01e1ef0128bc6802f8b6514a0c8f3b3124024e8d985993303ad152fda7aedc76e4336cb5f4e92","expired_at": "2026-12-25T10:35:32.447Z"} -
400: Bad Request
{"errors": [{"id": "INVALID_REQUEST","message": "This tag cannot be used for the selected category. Please select again.","code": 400}]} -
404: Not Found
{"errors": [{"id": "NOT_FOUND","message": "The selected product category is not available. Please select again.","code": 404}]}
- All body parameters are optional. Omit the body or send
Webhook
Receive LegitApp events in your webhook endpoint
Listen to events in your LegitApp Developer account on your webhook endpoint so your backend systems can automatically execute actions accordingly.
Register a webhook endpoint in the Developer Portal to receive events for your account. LegitApp sends each event as a JSON object in an HTTP POST request. Production endpoints must use HTTPS; Sandbox endpoints may use HTTP or HTTPS.
Get Started
To start receiving webhook events in your server:
- Create a webhook endpoint handler to receive event data POST requests.
- Register your endpoint in the LegitApp Developer Portal.
- Test your webhook endpoint handler.
Set up a publicly reachable endpoint that accepts POST requests with a JSON body. Use HTTPS in Production. HTTP is also supported in Sandbox, provided the endpoint can be reached by LegitApp's servers.
Set up your endpoint function so that it:
- Handles POST requests with a JSON payload consisting of an Event object
- Returns exactly HTTP
200within 30 seconds after successfully accepting the event. Keep each event handler brief. For lengthy tasks, save the event first, return200, and process it separately.
Use event.type in a switch statement to handle each event differently. Replace the handleAuthentication... functions below with your application's logic, and use event.id to prevent duplicate processing.
// This example uses Express to receive webhooks.
const express = require('express');
const app = express();
app.post('/webhook', express.json(), async (request, response, next) => {
const event = request.body;
try {
switch (event.type) {
case 'authentication.cancelled':
await handleAuthenticationCancelled(event);
break;
case 'authentication.initial_photo_submission':
await handleAuthenticationInitialPhotoSubmission(event);
break;
case 'authentication.new_message':
await handleAuthenticationNewMessage(event);
break;
case 'authentication.extra_photo':
await handleAuthenticationExtraPhoto(event);
break;
case 'authentication.extra_photo_submission':
await handleAuthenticationExtraPhotoSubmission(event);
break;
case 'authentication.completed':
await handleAuthenticationCompleted(event);
break;
default:
console.log(`Unhandled event type ${event.type}`);
}
// Acknowledge receipt after the handler succeeds.
return response.sendStatus(200);
} catch (error) {
// Return an error so LegitApp can retry delivery.
return next(error);
}
});
app.listen(4242, () => console.log('Running on port 4242'));
Webhook Security
LegitApp currently does not sign webhook requests or include a dedicated verification header. For additional protection, allowlist LegitApp's fixed outbound webhook IP addresses and use a private webhook URL containing a long, randomly generated token. Contact our support team for the outbound IP addresses for your environment. Configure Production endpoints to accept HTTPS only.
2. Register and Configure Your Webhook EndpointVisit https://developer.legitapp.com and go to the Web Hook section. Input your server’s destination endpoint URL into the Webhook Endpoint URL field.
Each environment has one configured webhook destination. Events from services using the same developer key are delivered to that destination. Route them within your system using fields such as authentication_id or user_custom_code; multiple destinations and custom-code prefix filters are not currently supported.
You may also choose which order origins should trigger a webhook notification. You can filter events based on your integration needs:
- Order created via API (Default): Only receive events for orders submitted via API
- Order created via App: Only receive events for orders submitted via our App.
- All new orders: Receive events for all orders associated with your business account, regardless of the submission source.
Authentications created through Web Submission are classified as API-created orders for this filter.

Testing your webhook logic is the most critical step before moving to production. Before deploying your integration to production, we highly recommend verifying your logic using our Sandbox Testing Environment.
- Navigate to Orders: Go to the Authentication Orders section to view a list of orders created via the API in your Sandbox environment.
- Filter by Status: Select the IN PROGRESS tab. Since webhook events are only triggered by active cases, this view allows you to focus on orders ready for testing.
- Simulate Events: Within the Sandbox, you can manually trigger 3 ****specific event types to ensure your system processes different event type correctly.

To test the Web Submission flow, create an intent in Sandbox and use its returned authentication URL to submit the initial photos and any requested additional photos. This also verifies the submission events listed below.
Types of Event
-
authentication.cancelled
-
Triggered when an administrator cancels the authentication at your request. Cancellations through the Cancel Authentication API do not emit this event.
-
Example:
{"id": "event_34jefj424cd84kr46a67f7fd95jv6a","object": "event","api-version": "v1","created_at": "2025-01-01 00:00:00","livemode": true,"type": "authentication.cancelled","data": {"event_type": "authentication.cancelled","authentication_id": "1234567890123456","authentication_token": 10,"user_custom_code": "ABC 1-2 Hermes","status": "cancelled","cancelled_by": "administrator","cancelled_at": "2025-01-01 00:00:00"}}
-
-
authentication.initial_photo_submission
-
Triggered when the recipient successfully submits the initial photos and the authentication is created. Creating an intent alone does not trigger this event.
-
Example:
{"id": "event_4203sj112c5edd324a62f7fd9ad8e0","object": "event","api-version": "v1","created_at": "2025-01-01 00:00:00","livemode": true,"type": "authentication.initial_photo_submission","data": {"event_type": "authentication.initial_photo_submission","authentication_id": "1234567890123456","authentication_token": 10,"user_custom_code": "ABC 1-2 Hermes"}}
-
-
authentication.new_message
-
Triggered when our checkers send you a new message. Messages are read-only in the API; when photos are requested, respond using Submit Extra Photos for Authentication.
-
Example:
{"id": "event_5201ah754c5ebc762a66f7fd9ad7d9","object": "event","api-version": "v1","created_at": "2025-01-01 00:00:00","livemode": true,"type": "authentication.new_message","data": {"event_type": "authentication.new_message","authentication_id": "1234567890123456","authentication_token": 10,"user_custom_code": "ABC 1-2 Hermes","content": "Please take another photo with flashlight ON"}}
-
-
authentication.extra_photo
-
Triggered when our checkers request for extra photo(s)
-
Placeholder titles and descriptions use the language configured in the Developer Portal.
checker_extra_example_image_urlsis a comma-separated string of image URLs;checker_extra_part_image_requiredis a comma-separated string of requested views. These fields andchecker_extra_remarkorplaceholdermay be null when not supplied. -
Example:
{"id": "event_a8fm30ff8s5eb87gn3kd7gbd9accna","object": "event","api-version": "v1","created_at": "2025-01-01 00:00:00","livemode": true,"type": "authentication.extra_photo","data": {"event_type": "authentication.extra_photo","authentication_id": "1234567890123456","authentication_token": 10,"user_custom_code": "ABC 1-2 Hermes","checker_extra_example_image_urls": "https://legitapp-prod.oss-cn-hongkong.aliyuncs.com/20250102dn3n4aa40613551a.jpg,https://legitapp-prod.oss-cn-hongkong.aliyuncs.com/20250102dn3n4aa7fj4l33nf.jpg","checker_extra_part_image_required": "Exterior Outer (Left), Box Label","checker_extra_remark": "Please use camera flash.","placeholder": [{"title": "Exterior Outer (Left)","image_url": "https://legitapp-prod.oss-cn-hongkong.aliyuncs.com/20210126b831199eb4dd177d.png","example_image_url": "https://legitapp-prod.oss-cn-hongkong.aliyuncs.com/202009093d63c684a9ef68e5.png","description": "Pinch to zoom and tap to focus.\nPhotograph your product in full."},{"title": "Box Label","image_url": "https://legitapp-prod.oss-cn-hongkong.aliyuncs.com/2020080512f59cb060ef1976.png","example_image_url": "https://legitapp-prod.oss-cn-hongkong.aliyuncs.com/202010191ba8a6f7a28699a6.png","description": "Pinch to zoom and tap to focus.\nPhotograph your product in full."}]}}
-
-
authentication.extra_photo_submission
-
Triggered when the recipient successfully submits requested additional photos.
-
Example:
{"id": "event_6944df724c5ebb766a66f7fd9a5a5d","object": "event","api-version": "v1","created_at": "2025-01-01 00:00:00","livemode": true,"type": "authentication.extra_photo_submission","data": {"event_type": "authentication.extra_photo_submission","authentication_id": "1234567890123456","authentication_token": 10,"user_custom_code": "ABC 1-2 Hermes"}}
-
-
authentication.completed
-
Triggered when our checkers complete your authentication
-
Example:
{"id": "event_7423fj424c5ebb746a67f7fd9a2j33","object": "event","api-version": "v1","created_at": "2025-01-01 00:00:00","livemode": true,"type": "authentication.completed","data": {"event_type": "authentication.completed","authentication_id": "1234567890123456","authentication_token": 10,"user_custom_code": "ABC 1-2 Hermes","result": "authentic","certificate_url": "https://legitapp.com/en/cert/1234567890123456"}}resultisauthentic,replicaorinconclusive.certificate_urlis the public certificate page URL, available only in Production for Authentic or Replica results. It may be absent in Sandbox test events. This event does not generate a PDF; use Generate PDF Certificate for the PDF URL.
-
Event Delivery & Retry Logic
A delivery succeeds only when your endpoint returns exactly HTTP 200. Other status codes, including other 2xx responses and redirects, are treated as failures. Each request has a 30-second timeout, and redirects are not followed. These rules apply to initial delivery, automatic retries and manual retries.
Retries reuse the same event id and payload. Handle duplicate deliveries using the event ID. Delivery order is not guaranteed: a retried event can arrive after a newer event. Use event timestamps and your stored state to avoid overwriting newer information.
-
Automated Retry Schedule
LegitApp makes up to three automatic delivery attempts, including the initial attempt. If an attempt fails, the retry schedule is as follows:
- Initial Attempt: Triggered immediately upon the event occurrence.
- Second Attempt: Scheduled approximately 30 minutes after the first failure.
- Third (Final) Attempt: Scheduled approximately 1 hour after the second failure.
You can monitor the status of these attempts and see exactly when the next retry is scheduled by visiting the Events page in the Developer Portal.
-
Manual Retries
You can manually retry a failed event from the Developer Portal, including after automatic retries are exhausted. Successfully delivered events cannot be manually retried. Manual retries do not count toward the three automatic attempts.
To manually retry an event, go to the Events list in your Developer Portal and click the "Retry Event" button next to the desired log entry.

Errors
Error Object Structure
{
"errors": [
{
"id": "INVALID_REQUEST",
"message": "The request is invalid. Please check and try again.",
"code": 400
}
]
}
| Field | Description |
|---|---|
| id | A short, machine-readable identifier representing the specific error type. |
| message | A human-readable explanation of the error, often including hints to resolve the issue. |
| code | HTTP status code associated with the error. |
Use the HTTP status code and errors[].id for programmatic error handling. Error messages are intended for people and may vary with localization; do not match their wording in application logic. The examples below use English.
HTTP Status Code Summary
| Code | Title | Description |
|---|---|---|
| 200 | OK | Everything worked as expected. |
| 201 | Created | The server has successfully created a new resource |
| 400 | Bad Request | The request was unacceptable—usually due to missing or invalid parameters. |
| 401 | Unauthorized | The provided developer secret key is invalid or expired, or the developer/account access is disabled. |
| 403 | Forbidden | The required developer credentials are missing, or the caller does not have permission to perform this action. |
| 404 | Not Found | The requested resource does not exist. |
| 500 | Internal Server Errors | A server-side failure occurred. Please report to LegitApp team if this happens. |
| 503 | Service Unavailable | The API service is temporarily unable to handle the request. |
Error ID Reference Table
| Error ID | Description |
|---|---|
| PARAM_REQUIRED | One or more required parameters are missing. Include all required fields and try again. |
| EXCEED_UPLOAD_LIMIT | The uploaded file exceeds the maximum allowed size. Reduce the file size and retry. |
| VALIDATION_ERROR | One or more parameters failed validation. Verify all input fields and try again. |
| INVALID_REQUEST | The request is malformed or contains invalid data. |
| DUPLICATED_RECORD | A record with the same data already exists and cannot be created again. |
| INVALID_LOGIN_USER | The user account is disabled and cannot be used to log in. |
| INVALID_TOKEN | The provided authentication token is invalid. |
| EXPIRED_TOKEN | The login session has expired. Please sign in again. |
| INVALID_PERMISSION | The user does not have permission to access this resource. |
| NOT_FOUND | The requested resource could not be found. |
| INTERNAL_SERVER_ERROR | An unexpected server error occurred. Please try again later. |