cURL
curl --request POST \
--url https://api.sandbox.capa.fi/api/partner/v2/users/{userId}/kyc/verification-link \
--header 'Content-Type: application/json' \
--header 'partner-api-key: <api-key>' \
--data '
{
"country": "MX",
"partnerRedirectUri": "<string>",
"termsAccepted": true
}
'import requests
url = "https://api.sandbox.capa.fi/api/partner/v2/users/{userId}/kyc/verification-link"
payload = {
"country": "MX",
"partnerRedirectUri": "<string>",
"termsAccepted": True
}
headers = {
"partner-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'partner-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({country: 'MX', partnerRedirectUri: '<string>', termsAccepted: true})
};
fetch('https://api.sandbox.capa.fi/api/partner/v2/users/{userId}/kyc/verification-link', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.capa.fi/api/partner/v2/users/{userId}/kyc/verification-link",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'country' => 'MX',
'partnerRedirectUri' => '<string>',
'termsAccepted' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"partner-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.capa.fi/api/partner/v2/users/{userId}/kyc/verification-link"
payload := strings.NewReader("{\n \"country\": \"MX\",\n \"partnerRedirectUri\": \"<string>\",\n \"termsAccepted\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("partner-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.sandbox.capa.fi/api/partner/v2/users/{userId}/kyc/verification-link")
.header("partner-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"country\": \"MX\",\n \"partnerRedirectUri\": \"<string>\",\n \"termsAccepted\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.capa.fi/api/partner/v2/users/{userId}/kyc/verification-link")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["partner-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"country\": \"MX\",\n \"partnerRedirectUri\": \"<string>\",\n \"termsAccepted\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"kycLink": "string"
}
}Users
Create KYC Link
POST
/
api
/
partner
/
v2
/
users
/
{userId}
/
kyc
/
verification-link
cURL
curl --request POST \
--url https://api.sandbox.capa.fi/api/partner/v2/users/{userId}/kyc/verification-link \
--header 'Content-Type: application/json' \
--header 'partner-api-key: <api-key>' \
--data '
{
"country": "MX",
"partnerRedirectUri": "<string>",
"termsAccepted": true
}
'import requests
url = "https://api.sandbox.capa.fi/api/partner/v2/users/{userId}/kyc/verification-link"
payload = {
"country": "MX",
"partnerRedirectUri": "<string>",
"termsAccepted": True
}
headers = {
"partner-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'partner-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({country: 'MX', partnerRedirectUri: '<string>', termsAccepted: true})
};
fetch('https://api.sandbox.capa.fi/api/partner/v2/users/{userId}/kyc/verification-link', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.capa.fi/api/partner/v2/users/{userId}/kyc/verification-link",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'country' => 'MX',
'partnerRedirectUri' => '<string>',
'termsAccepted' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"partner-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.capa.fi/api/partner/v2/users/{userId}/kyc/verification-link"
payload := strings.NewReader("{\n \"country\": \"MX\",\n \"partnerRedirectUri\": \"<string>\",\n \"termsAccepted\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("partner-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.sandbox.capa.fi/api/partner/v2/users/{userId}/kyc/verification-link")
.header("partner-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"country\": \"MX\",\n \"partnerRedirectUri\": \"<string>\",\n \"termsAccepted\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.capa.fi/api/partner/v2/users/{userId}/kyc/verification-link")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["partner-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"country\": \"MX\",\n \"partnerRedirectUri\": \"<string>\",\n \"termsAccepted\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"kycLink": "string"
}
}Generates a direct KYC verification link for an existing user. Redirect the user to this link to complete identity verification with the KYC provider.
Important Notes
- The user must be created first via Create User.
- Each
kycLinkis tied to a unique session. If expired, generate a new link. - If
partnerRedirectUriis not provided, the user may not be redirected after completing KYC. - Supports both HTTPS and custom mobile URI schemes (e.g.,
myapp://). termsAccepted: truerecords the user’s acceptance of the Terms and Conditions and Privacy Notice, exactly as Accept Terms does. Use one or the other, not both. Omitting it, or sendingfalse, does not block link creation and records no new acceptance — it never clears an acceptance already on record.
Use Cases
- Initiate KYC: Redirect the user to complete identity verification after account creation.
- Email or app link: Embed the
kycLinkin an onboarding email or app screen. - Custom redirect: Use
partnerRedirectUrito bring the user back to your app after verification.
Error Codes
These are the errors this endpoint returns most often. Branch oncode, not message, and handle codes you don’t recognize by their HTTP status. See Error Codes for the complete list.
Common Errors
| HTTP Status | Code | Message |
|---|---|---|
| 401 | UNAUTHORIZED | ”API Key is missing” |
| 401 | UNAUTHORIZED | ”Invalid API Key format” |
| 401 | UNAUTHORIZED | ”Invalid API Key” |
| 403 | PERMISSION_DENIED | ”Your role does not allow this action.” (the API key doesn’t have the permission this endpoint requires) |
| 429 | TOO_MANY_REQUESTS | ”ThrottlerException: Too Many Requests” (wait the number of seconds in the Retry-After header) |
User Ownership Errors
| HTTP Status | Code | Message |
|---|---|---|
| 401 | UNAUTHORIZED | ”User is not associated with the partner” |
Endpoint-Specific Errors
| HTTP Status | Code | Message |
|---|---|---|
| 400 | INVALID_USER_INPUT_ERROR | ”Invalid User Input” |
| 400 | INVALID_VERIFICATION_TYPE_FOR_USER | ” users can only request verification” |
| 400 | PARTNER_SELF_USER_VERIFICATION_NOT_ALLOWED | The user is your own partner account’s user |
| 404 | NOT_FOUND_ERROR | ”Requested User was not found” |
| 403 | RESTRICTED_COUNTRY | ”Operations for country are not supported” |
| 502 | EXTERNAL_PROVIDER_ERROR | The identity verification provider failed. Retry later |
| 500 | INTERNAL_SERVER_ERROR | ”Failed to create verification link” |
| 503 | INTERNAL_SERVER_ERROR | ”Country restrictions could not be verified” (temporary; retry) |
Authorizations
Body
application/json
The country code for the partner
@description The country must be a valid ISO 3166-1 alpha-2 country code, see: @link https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
Available options:
MX, DO, US, AT, BE, BG, HR, CY, CZ, DK, EE, FI, FR, DE, GR, HU, IE, IT, LV, LT, LU, MT, NL, PL, PT, RO, SK, SI, ES, SE, IS, LI, NO, CH, GB, MC, SM, AD, VA Example:
"MX"