LegitApp Server API (v1)
- 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.
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.
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": []}
-
-
Get Authentication Set
GET/authentication_setReturn an authentication set which decides the supported turnaround times and the required photos for authentication. The set assigned is based on the selected category, brand and model. The authentication_set_id and the turnaround_time_id are required for the submit authentication endpoint.
Headers
Name Type Description Authorization* String Bearer {{DEVELOPER_SECRET_KEY}} Accept-Language String Language of titles, subtitles and descriptions. English by default. See Localization for supported language codes and fallback behavior. Query Parameters
Name Type Description category_id* Number service sets under this category brand_id* Number service sets under this brand model_id* Number service sets under this model tag_id String identifier of the kicks tag OR luxe tag Response Fields
Field Type Description idNumber Authentication set ID. Use this value as authentication_set_idwhen submitting an authentication.turn_around_time_listArray of objects Supported turnaround options for the selected category, brand and model. turn_around_time_list[].idNumber Turnaround option ID. Use this value as turnaround_time_idwhen submitting an authentication.turn_around_time_list[].titleString Localized turnaround title, such as < 30 Minutes.turn_around_time_list[].subtitleString Localized token-cost description, such as 3 Tokens.turn_around_time_list[].minuteNumber Turnaround time in minutes. turn_around_time_list[].creditString Token cost as a decimal string, such as 3.0000.guidelineArray of objects Photo-taking instructions for the selected authentication set. guideline[].titleString Localized guideline title. guideline[].subtitleString Localized photo-taking instructions. guideline[].image_urlsString Guideline image URL(s). Multiple URLs are comma-separated. placeholderArray of objects Photo requirements for the selected authentication set. placeholder[].titleString Localized name of the requested view. placeholder[].image_urlString Reference image URL for the requested view. placeholder[].example_image_urlString or null Example photo URL, when available. placeholder[].descriptionString Localized instructions for taking the photo. placeholder[].requiredBoolean or Number Whether this photo is required: trueor1means required;falseor0means optional.placeholder[].idNumber Photo placeholder ID. Where photo-to-placeholder binding is enabled, pass it as images[].service_placeholder_idwhen submitting photos. Omit that optional request field otherwise.placeholder[].typeString or null Placeholder classification, when available. placeholder[].indexNumber Display order of the placeholder within the set. -
cURL Example:
GEThttps://developer-api.legitapp.com/v1/authentication_set?category_id=1&brand_id=1&model_id=1curl --location 'https://developer-api.legitapp.com/v1/authentication_set?category_id=1&brand_id=1&model_id=1' \--header 'Content-Type: application/json' \--header 'Authorization: Bearer DEVELOPER_SECRET_KEY' \--header 'Accept-Language: en' -
200: OK
{"id": 1,"turn_around_time_list": [{"id": 1,"title": "< 30 Minutes","subtitle": "3 Tokens","minute": 30,"credit": "3.0000"},{"id": 2,"title": "< 15 Minutes","subtitle": "4 Tokens","minute": 15,"credit": "4.0000"}],"guideline": [{"title": "Exterior Outer","subtitle": "Photograph your product in full (nothing is cropped out).","image_urls": "https://legitapp-prod.oss-cn-hongkong.aliyuncs.com/202009093d63c684a9ef68e5.png"}],"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.","required": true}]} -
404: Not Found
{"errors": [{"id": "NOT_FOUND","message": "We couldn't find the resources. Please check and try again.","code": 404}]}
-
-
Upload Image V1
POST/asset_imageUpload an image and return its URL for use when submitting an authentication or additional photos.
- Maximum file size: 10 MiB (10,485,760 bytes). Use multipart/form-data with the
filefield. Let your HTTP client set the multipart boundary.
Headers
Name Type Description Authorization* String Bearer {{DEVELOPER_SECRET_KEY}} Body Parameters (form-data)
Name Type Description file* File JPG, JPEG or PNG image Response Fields
Field Type Description urlString URL of the uploaded image. Use this value as images[].image_urlwhen submitting an authentication or additional photos under the same account.-
cURL Example:
POSThttps://developer-api.legitapp.com/v1/asset_imagecurl --location 'https://developer-api.legitapp.com/v1/asset_image' \--header 'Authorization: Bearer DEVELOPER_SECRET_KEY' \--form 'file=@"/path/to/file"' -
201: Created
{"url": "https://legitapp-prod.oss-cn-hongkong.aliyuncs.com/20250101ac1e3aa40613446f.JPG"} -
404: Not Found
{"errors": [{"id": "NOT_FOUND","message": "We couldn't find the resources. Please check and try again.","code": 404}]}
- Maximum file size: 10 MiB (10,485,760 bytes). Use multipart/form-data with the
-
Submit Authentication
POST/authenticationAfter submitting an authentication, $LEGIT Tokens will be deducted according to the selected turnaround time, and an authentication ID will be provided.
Headers
Name Type Description Authorization* String Bearer {{DEVELOPER_SECRET_KEY}} Body Parameters
Name Type Description authentication_set_id* Number id in endpoint 4 category_id* Number id in endpoint 1 brand_id* Number id in endpoint 2 model_id* Number id in endpoint 3 turnaround_time_id* Number id in turn_around_time_list object in endpoint 4 images* Array Array of image objects. Submit at least six photos and include all required views from the selected authentication set. images[’image_url’]* String The URL returned by Upload Image V1, uploaded under the same account. user_custom_code String Optional reference from your system. This field is not an idempotency key and is not guaranteed to be unique. user_remark String optional tag_id String optional; identifier of the kicks tag OR luxe tag Photo Requirements
Upload each photo first using the same account's developer key, then pass the returned URL unchanged. URLs already used by an authentication can be rejected as duplicates. Example URLs below are illustrative; replace them with your uploaded URLs. Do not assume a timed-out submission failed or retry it blindly: check your records and webhook events before creating another authentication.
Optional image field Type Description images[].sourceString or null Photo source: albumorcamera.images[].user_image_remarkString or null User-provided remark for the image. images[].service_placeholder_idNumber or null Photo placeholder ID from Get Authentication Set. Use only where photo-to-placeholder binding is enabled for your environment; otherwise omit this field. The placeholder must belong to the selected authentication set. Response Fields
Field Type Description authentication_idString ID of the newly created authentication. Store this value as a string and use it to identify the authentication in subsequent requests and webhook events. -
cURL Example:
POSThttps://developer-api.legitapp.com/v1/authenticationcurl --location 'https://developer-api.legitapp.com/v1/authentication' \--header 'Content-Type: application/json' \--header 'Authorization: Bearer DEVELOPER_SECRET_KEY' \--data '{"authentication_set_id": 1,"category_id": 1,"brand_id": 1,"model_id": 1,"turnaround_time_id": 1,"images": [{"image_url": "https://legitapp-prod.oss-cn-hongkong.aliyuncs.com/20260101photo1.JPG"},{"image_url": "https://legitapp-prod.oss-cn-hongkong.aliyuncs.com/20260101photo2.JPG"},{"image_url": "https://legitapp-prod.oss-cn-hongkong.aliyuncs.com/20260101photo3.JPG"},{"image_url": "https://legitapp-prod.oss-cn-hongkong.aliyuncs.com/20260101photo4.JPG"},{"image_url": "https://legitapp-prod.oss-cn-hongkong.aliyuncs.com/20260101photo5.JPG"},{"image_url": "https://legitapp-prod.oss-cn-hongkong.aliyuncs.com/20260101photo6.JPG"}],"user_custom_code": "ABC123","user_remark": "I bought this from ABC online shop."}' -
201: Created
{"authentication_id": "1234567890123456"} -
400: Bad Request
{"errors": [{"id": "INVALID_REQUEST","message": "Please provide the category, brand, and model IDs.","code": 400}]} -
400: Bad Request
{"errors": [{"id": "INVALID_REQUEST","message": "Please upload all the required photos for authentication.","code": 400}]}
-
-
Submit Extra Photos for Authentication
POST/authentication/:id/photoSubmit photos for an outstanding extra-photo request. Upload each photo first using Upload Image V1 under the same account, then submit the returned URLs.
Notes
- Replace
:idwith the authentication ID belonging to your account. - Use the latest
authentication.extra_photoevent to identify the requested views. This endpoint cannot accept photos after that request has been cancelled. - Image objects also accept the optional metadata fields documented under Submit Authentication, including
source,user_image_remark, and, where enabled,service_placeholder_id. Placeholder IDs must belong to the existing authentication's set. - An optional top-level
user_remarkstring can accompany the photos.
Headers
Name Type Description Authorization* String Bearer {{DEVELOPER_SECRET_KEY}} Body Parameters
Name Type Description images* Array Array of Objects images[’image_url’]* String The URL returned by Upload Image V1, uploaded under the same account. Response Fields
Field Type Description successBoolean truewhen the additional photos have been accepted. This confirms photo submission; it does not indicate that authentication is complete.-
cURL Example:
POSThttps://developer-api.legitapp.com/v1/authentication/1234567890123456/photocurl --location 'https://developer-api.legitapp.com/v1/authentication/1234567890123456/photo' \--header 'Content-Type: application/json' \--header 'Authorization: Bearer DEVELOPER_SECRET_KEY' \--data '{"images": [{"image_url": "https://legitapp-prod.oss-cn-hongkong.aliyuncs.com/20250101ac1e3aa40613446f.JPG"},{"image_url": "https://legitapp-prod.oss-cn-hongkong.aliyuncs.com/20250101qw8ebc79qcqecqb7.JPG"}]}' -
200: OK
{"success": true} -
404: Not Found
{"errors": [{"id": "NOT_FOUND","message": "The selected authentication is not available. Please select again.","code": 404}]} -
400: Bad Request
{"errors": [{"id": "INVALID_REQUEST","message": "The request for additional photos has been cancelled.","code": 400}]}
- Replace
-
Cancel Authentication
PATCH/authentication/:id/cancelCancel an authentication that is waiting for extra photos and refund the applicable service-level and extra-service tokens to your account. Authentications submitted through the LegitApp App, API or Web Submission Integration under the same account are supported.
Notes
- The authentication must have a status of
user_pending(waiting for extra photos). - A pending extra-photo request must exist, and cancellation must be requested within 30 days of that request.
- On success, the authentication status changes to
cancelled, and the applicable tokens are refunded to the same account. - Repeated cancellation attempts return a
400error. A successful cancellation is refunded only once. - This endpoint does not emit an
authentication.cancelledwebhook. That event is sent when an administrator cancels an authentication.
Headers
Name Type Description Authorization* String Bearer {{DEVELOPER_SECRET_KEY}} Accept-Language String Language of error messages. English by default. Path Parameters
Name Type Description id* String The authentication ID, for example 1234567890123456. The authentication must belong to the account associated with your developer secret key.Body Parameters
No request body is required.
Response Fields
Field Type Description successBoolean truewhen cancellation succeeds. The authentication is cancelled and the applicable tokens are refunded to the account.-
cURL Example:
PATCHhttps://developer-api.legitapp.com/v1/authentication/1234567890123456/cancelcurl --location --request PATCH 'https://developer-api.legitapp.com/v1/authentication/1234567890123456/cancel' \--header 'Content-Type: application/json' \--header 'Authorization: Bearer DEVELOPER_SECRET_KEY' -
200: OK
{"success": true} -
400: Bad Request
{"errors": [{"id": "INVALID_REQUEST","message": "This action is not allowed at the moment. Please try again later.","code": 400}]} -
400: Bad Request
{"errors": [{"id": "INVALID_REQUEST","message": "The request for additional photos has been cancelled.","code": 400}]} -
400: Bad Request
{"errors": [{"id": "INVALID_REQUEST","message": "This action can only be performed within 30 days of the request for additional photos.","code": 400}]} -
404: Not Found
{"errors": [{"id": "NOT_FOUND","message": "We couldn't find the resources. Please check and try again.","code": 404}]} -
500: Internal Server Error
{"errors": [{"id": "INTERNAL_SERVER_ERROR","message": "A system error occurred. Please try again later.","code": 500}]}
- The authentication must have a status of
-
Get Authentication Detail
GET/authentication/:idGET/authentication/tag/:tagIdGET/authentication/user_custom_code/:codeReturn the details of an authentication with an authentic or replica result, identified by its authentication ID, tag ID or user custom code. Authentications submitted through the LegitApp App, API or Web Submission Integration under the same account are supported.
Headers
Name Type Description Authorization* String Bearer {{DEVELOPER_SECRET_KEY}} Notes
- All three lookups are limited to authentications owned by the account associated with your developer secret key and with an
authenticorreplicaresult. Pending, cancelled and inconclusive cases are not available through these detail endpoints. - The custom-code lookup performs a partial match and returns one matching authentication. Custom codes are not guaranteed to be unique. Use the authentication ID for an unambiguous lookup.
- URL-encode path values, for example
ABC%201-2%20HermesforABC 1-2 Hermes.
Response Fields
Field Type Description authentication_idString Authentication identifier. Keep it as a string. authentication_tokenNumber Tokens charged for the authentication. item,item_full,cover_imageString or null Item labels and cover image URL, when available. turnaround_timeNumber Selected turnaround time in minutes. status,resultString Authentication state and outcome. A typical completed response has status: completedandresult: authenticorreplica.fake_ratingNumber or null Applicable to Replica results; otherwise null. A higher value indicates closer resemblance to an authentic item and greater difficulty identifying the replica. It is not a probability of the item being fake. category_id,brand_id,model_idNumber Selected catalog identifiers. tag_id,user_custom_code,user_remarkString or null Linked tag identifier and optional user-provided references or remarks. created_at,updated_atString UTC timestamps. imagesArray Image objects containing image_url.logsArray Public timeline entries with action_title,action_subtitleandcreated_at.extra_photo_requestsArray Additional-photo request history. Request details, placeholders and completion timestamps can be null. certificate_pdf_urlString or null URL of the PDF already generated for this authentication. It can remain null after completion until a PDF is generated; this GET request does not generate one. Use Generate PDF Certificate to obtain the current PDF URL. certificate_urlString (optional) Public certificate page URL. Included in Production for Authentic or Replica results; omitted in Sandbox. This is a webpage URL, separate from certificate_pdf_url.For Authentic and Replica results in Production,
certificate_urllinks to the public certificate page. The same page URL is included in eligible completion webhooks. Anyone with the link can view that page, so share it only with the intended recipients.-
cURL Example:
GEThttps://developer-api.legitapp.com/v1/authentication/1234567890123456curl --location 'https://developer-api.legitapp.com/v1/authentication/1234567890123456' \--header 'Content-Type: application/json' \--header 'Authorization: Bearer DEVELOPER_SECRET_KEY'GEThttps://developer-api.legitapp.com/v1/authentication/tag/S15TQ3RTX5PPcurl --location 'https://developer-api.legitapp.com/v1/authentication/tag/S15TQ3RTX5PP' \--header 'Content-Type: application/json' \--header 'Authorization: Bearer DEVELOPER_SECRET_KEY'GEThttps://developer-api.legitapp.com/v1/authentication/user_custom_code/ABC%201-2%20Hermescurl --location 'https://developer-api.legitapp.com/v1/authentication/user_custom_code/ABC%201-2%20Hermes' \--header 'Content-Type: application/json' \--header 'Authorization: Bearer DEVELOPER_SECRET_KEY' -
200: OK
{"authentication_id": "1234567890123456","authentication_token": 20,"item": "Luxury Handbags - Hermes","item_full": "Luxury Handbags, Hermes, Double Sens Tote","cover_image": "https://legitapp-prod.oss-cn-hongkong.aliyuncs.com/20250101mz238n238ncn2377.JPG","turnaround_time": 180,"status": "completed","result": "authentic","fake_rating": null,"category_id": 4,"brand_id": 141,"model_id": 457,"tag_id": "S15TQ3RTX5PP","user_custom_code": "ABC 1-2 Hermes","user_remark": "I bought this from ABC online shop.","created_at": "2026-01-01T09:00:00.000Z","updated_at": "2026-01-30T04:21:13.000Z","images": [{"image_url": "https://legitapp-prod.oss-cn-hongkong.aliyuncs.com/20250101mz238n238ncn2377.JPG"},{"image_url": "https://legitapp-prod.oss-cn-hongkong.aliyuncs.com/20250101bv3q2n8324bzm8c2.JPG"},{"image_url": "https://legitapp-prod.oss-cn-hongkong.aliyuncs.com/20250101hf32zm3289x3fz83.JPG"}],"logs": [{"action_title": "Service Request Submitted","action_subtitle": "Authentication Service - 180 Minutes","created_at": "2026-01-01T09:00:00.000Z"},{"action_title": "Authenticator Reviewed:","action_subtitle": "LegitApp AI Model V1 provided a result. Please wait for our next authenticator.","created_at": "2026-01-01T09:00:10.000Z"},{"action_title": "Authenticator Reviewed:","action_subtitle": "Additional photos required","created_at": "2026-01-01T09:01:00.000Z"},{"action_title": "User:","action_subtitle": "Additional photos uploaded","created_at": "2026-01-01T09:02:00.000Z"},{"action_title": "Authenticator Reviewed:","action_subtitle": "Authenticator - OX1 provided a result. Please wait for our next authenticator.","created_at": "2026-01-01T09:03:00.000Z"},{"action_title": "Authenticator Reviewed:","action_subtitle": "Authenticator - OX2 provided a result.","created_at": "2026-01-01T09:04:00.000Z"},{"action_title": "Final Result:","action_subtitle": "The result is AUTHENTIC.","created_at": "2026-01-01T09:05:00.000Z"}],"extra_photo_requests": [{"checker_extra_example_image_urls": null,"checker_extra_part_image_required": null,"checker_extra_remark": null,"placeholder": null,"status": "completed","created_at": "2026-01-01T09:01:00.000Z","completed_at": "2026-01-01T09:02:00.000Z"}],"certificate_pdf_url": "https://legitapp-prod.oss-accelerate.aliyuncs.com/certificates/1234567890123456/v1_20260101_123a1b45.pdf","certificate_url": "https://legitapp.com/en/cert/1234567890123456"} -
404: Not Found
{"errors": [{"id": "NOT_FOUND","message": "The selected authentication is not available. Please select again.","code": 404}]}
- All three lookups are limited to authentications owned by the account associated with your developer secret key and with an
-
Generate PDF Certificate
POST/authentication/:id/pdf_certificateGenerate and return the PDF certificate URL for a completed authentication with an authentic or replica result. Authentications submitted through the LegitApp App, API or Web Submission Integration under the same account are supported.
Notes
- If a current PDF already exists for the authentication result, its URL is returned without generating a new PDF. Repeated requests reuse the current PDF. This endpoint does not force regeneration.
- Only completed authentications with an
authenticorreplicaresult are eligible. Inconclusive, pending and cancelled authentications are not eligible. - For replica results, the PDF is an Authentication Report.
- Generated PDF URLs have no scheduled expiry. If the PDF is regenerated through another workflow, the URL may change and the previous PDF may no longer be accessible. Use the latest URL returned by this endpoint.
Headers
Name Type Description Authorization* String Bearer {{DEVELOPER_SECRET_KEY}} Accept-Language String Language of error messages. English by default. Path Parameters
Name Type Description id* String The authentication ID, for example 1234567890123456. The authentication must belong to the account associated with your developer secret key.Body Parameters
No request body is required.
Response Fields
Field Type Description authentication_idString ID of the authentication associated with the PDF. certificate_pdf_urlString URL of the current PDF certificate or Authentication Report. An existing current PDF is reused; otherwise a PDF is generated. Use the latest URL returned by this endpoint. -
cURL Example:
POSThttps://developer-api.legitapp.com/v1/authentication/1234567890123456/pdf_certificatecurl --location --request POST 'https://developer-api.legitapp.com/v1/authentication/1234567890123456/pdf_certificate' \--header 'Content-Type: application/json' \--header 'Authorization: Bearer DEVELOPER_SECRET_KEY' -
200: OK
{"authentication_id": "1234567890123456","certificate_pdf_url": "https://legitapp-prod.oss-accelerate.aliyuncs.com/certificates/1234567890123456/v1_20260101_123a1b45.pdf"} -
400: Bad Request
{"errors": [{"id": "INVALID_REQUEST","message": "PDF certificates are only available for completed Authentic or Replica authentications.","code": 400}]} -
404: Not Found
{"errors": [{"id": "NOT_FOUND","message": "We couldn't find the resources. Please check and try again.","code": 404}]} -
500: Internal Server Error
{"errors": [{"id": "INTERNAL_SERVER_ERROR","message": "A system error occurred. Please try again later.","code": 500}]}
-
Get Token Balance
GET/token_balanceReturn account’s token balance
Headers
Name Type Description Authorization* String Bearer {{DEVELOPER_SECRET_KEY}} Response Fields
Field Type Description token_balanceNumber Current token balance of the account associated with your developer secret key. The value may include a fractional amount. -
cURL Example:
GEThttps://developer-api.legitapp.com/v1/token_balancecurl --location 'https://developer-api.legitapp.com/v1/token_balance' \--header 'Content-Type: application/json' \--header 'Authorization: Bearer DEVELOPER_SECRET_KEY' -
200: OK
{"token_balance": 67} -
401: Unauthorized
{"errors": [{"id": "INVALID_LOGIN_USER","message": "Your account has been disabled. For more details, please contact us.","code": 401}]}
-
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.new_message':
await handleAuthenticationNewMessage(event);
break;
case 'authentication.extra_photo':
await handleAuthenticationExtraPhoto(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.

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.

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.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.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. |