Skip to main content
POST
/
customers
/
{customerId}
/
kyc-link
cURL
curl --request POST \
  --url https://api.lightspark.com/grid/2025-10-13/customers/{customerId}/kyc-link \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "redirectUri": "https://app.example.com/onboarding/completed"
}
'
import LightsparkGrid from '@lightsparkdev/grid';

const client = new LightsparkGrid({
  username: process.env['GRID_CLIENT_ID'], // This is the default and can be omitted
  password: process.env['GRID_CLIENT_SECRET'], // This is the default and can be omitted
});

const kycLinkResponse = await client.customers.createKYCLink('customerId');

console.log(kycLinkResponse.provider);
package com.lightspark.grid.example

import com.lightspark.grid.client.LightsparkGridClient
import com.lightspark.grid.client.okhttp.LightsparkGridOkHttpClient
import com.lightspark.grid.models.customers.CustomerCreateKycLinkParams
import com.lightspark.grid.models.customers.KycLinkResponse

fun main() {
    val client: LightsparkGridClient = LightsparkGridOkHttpClient.fromEnv()

    val kycLinkResponse: KycLinkResponse = client.customers().createKycLink("customerId")
}
{
  "kycUrl": "https://kyc.lightspark.com/onboard/abc123def456",
  "expiresAt": "2027-01-15T14:32:00Z",
  "provider": "SUMSUB",
  "token": "_act-sbx-jwt-eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}
{
  "status": 400,
  "message": "<string>",
  "details": {}
}
{
  "status": 401,
  "message": "<string>",
  "details": {}
}
{
  "status": 404,
  "message": "<string>",
  "details": {}
}
{
  "status": 409,
  "message": "<string>",
  "details": {}
}
{
  "status": 500,
  "message": "<string>",
  "details": {}
}

Authorizations

Authorization
string
header
required

API token authentication using format <api token id>:<api client secret>

Headers

Idempotency-Key
string

A unique identifier for the request. If the same key is sent multiple times, the server will return the same response as the first request.

Example:

"<uuid>"

Path Parameters

customerId
string
required

The Grid customer ID to generate a KYC link for.

Body

application/json

Request body for generating a hosted KYC link for an existing customer.

redirectUri
string<uri>

URI the customer is redirected to after completing the hosted KYC flow. Must start with https:// (or http:// for local development). Embedded in the returned kycUrl.

Example:

"https://app.example.com/onboarding/completed"

Response

KYC link generated

A hosted KYC link that the customer can complete to verify their identity.

kycUrl
string
required

Hosted URL the customer should be sent to in order to complete verification. The URL is single-use and expires at expiresAt. To generate a new link (for example, after the previous one expires or is abandoned), call this endpoint again.

Example:

"https://kyc.lightspark.com/onboard/abc123def456"

expiresAt
string<date-time>
required

Time at which the hosted link expires and can no longer be used.

Example:

"2027-01-15T14:32:00Z"

provider
enum<string>
required

The KYC provider that will perform identity verification for the customer. Grid selects the provider based on the customer's region and platform configuration; the value is informational for platforms that want to integrate directly with the provider's SDK.

Available options:
SUMSUB
Example:

"SUMSUB"

token
string

Provider-specific token that can be used in place of the hosted URL — for example, to embed the provider's SDK directly in your application. Only returned for providers that support direct SDK integration. Whether to use the hosted URL or the embedded SDK is up to you; both flows result in the same kycStatus update on the customer.

Example:

"_act-sbx-jwt-eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."