curl --request POST \
--url https://app.sajn.se/api/v1/sajn-id \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'authorization: <authorization>' \
--data '
{
"fullName": "<string>",
"locale": "sv-SE",
"ssn": "<string>",
"email": "[email protected]",
"phone": "<string>",
"reference": "<string>",
"contactId": "<string>",
"expiresAt": "<unknown>"
}
'import requests
url = "https://app.sajn.se/api/v1/sajn-id"
payload = {
"fullName": "<string>",
"locale": "sv-SE",
"ssn": "<string>",
"email": "[email protected]",
"phone": "<string>",
"reference": "<string>",
"contactId": "<string>",
"expiresAt": "<unknown>"
}
headers = {
"authorization": "<authorization>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
authorization: '<authorization>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
fullName: '<string>',
locale: 'sv-SE',
ssn: '<string>',
email: '[email protected]',
phone: '<string>',
reference: '<string>',
contactId: '<string>',
expiresAt: '<unknown>'
})
};
fetch('https://app.sajn.se/api/v1/sajn-id', 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://app.sajn.se/api/v1/sajn-id",
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([
'fullName' => '<string>',
'locale' => 'sv-SE',
'ssn' => '<string>',
'email' => '[email protected]',
'phone' => '<string>',
'reference' => '<string>',
'contactId' => '<string>',
'expiresAt' => '<unknown>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"authorization: <authorization>"
],
]);
$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://app.sajn.se/api/v1/sajn-id"
payload := strings.NewReader("{\n \"fullName\": \"<string>\",\n \"locale\": \"sv-SE\",\n \"ssn\": \"<string>\",\n \"email\": \"[email protected]\",\n \"phone\": \"<string>\",\n \"reference\": \"<string>\",\n \"contactId\": \"<string>\",\n \"expiresAt\": \"<unknown>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "<authorization>")
req.Header.Add("Authorization", "Bearer <token>")
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://app.sajn.se/api/v1/sajn-id")
.header("authorization", "<authorization>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"fullName\": \"<string>\",\n \"locale\": \"sv-SE\",\n \"ssn\": \"<string>\",\n \"email\": \"[email protected]\",\n \"phone\": \"<string>\",\n \"reference\": \"<string>\",\n \"contactId\": \"<string>\",\n \"expiresAt\": \"<unknown>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.sajn.se/api/v1/sajn-id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '<authorization>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"fullName\": \"<string>\",\n \"locale\": \"sv-SE\",\n \"ssn\": \"<string>\",\n \"email\": \"[email protected]\",\n \"phone\": \"<string>\",\n \"reference\": \"<string>\",\n \"contactId\": \"<string>\",\n \"expiresAt\": \"<unknown>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"organizationId": "<string>",
"fullName": "<string>",
"channel": "EMAIL",
"status": "CREATED",
"locale": "<string>",
"expiresAt": "<unknown>",
"createdAt": "<unknown>",
"updatedAt": "<unknown>",
"email": "<string>",
"phone": "<string>",
"reference": "<string>",
"verifiedAt": "<unknown>",
"verificationUrl": "<string>",
"token": "<string>",
"contact": {
"id": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"email": "<string>",
"phone": "<string>"
},
"createdBy": {
"id": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"email": "<string>"
},
"audits": [
{
"id": "<string>",
"type": "<string>",
"createdAt": "<unknown>",
"data": {},
"name": "<string>",
"email": "<string>",
"ipAddress": "<string>",
"userAgent": "<string>"
}
],
"data": {}
}{
"message": "<string>",
"code": "<string>",
"errorId": "<string>"
}{
"message": "<string>",
"code": "<string>",
"errorId": "<string>"
}{
"message": "<string>",
"code": "<string>",
"errorId": "<string>"
}Create a new sajn ID verification
Create a new identity verification request and immediately send it to the recipient over the chosen channel.
Required Fields:
fullName- Full name of person to verify (required)channel- Delivery channel: EMAIL or SMS (required)- Channel-specific:
email(for EMAIL) orphone(for SMS)
Optional Fields:
ssn- Swedish personal number for SSN-based verification (without SSN, name-based verification is used)reference- External reference ID for trackingnote- Internal note about this verificationcontactId- Link to existing contactlocale- Message locale (default: sv-SE)
Verification Methods:
- SSN-based: When
ssnis provided, BankID verification validates both identity and SSN match - Name-based: Without
ssn, BankID verifies identity and name match
Response: Returns verification details including token and verification URL (only on creation, never exposed later).
Billing: Creating a sajn ID verification counts toward your monthly sajn ID quota and is billed accordingly.
curl --request POST \
--url https://app.sajn.se/api/v1/sajn-id \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'authorization: <authorization>' \
--data '
{
"fullName": "<string>",
"locale": "sv-SE",
"ssn": "<string>",
"email": "[email protected]",
"phone": "<string>",
"reference": "<string>",
"contactId": "<string>",
"expiresAt": "<unknown>"
}
'import requests
url = "https://app.sajn.se/api/v1/sajn-id"
payload = {
"fullName": "<string>",
"locale": "sv-SE",
"ssn": "<string>",
"email": "[email protected]",
"phone": "<string>",
"reference": "<string>",
"contactId": "<string>",
"expiresAt": "<unknown>"
}
headers = {
"authorization": "<authorization>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
authorization: '<authorization>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
fullName: '<string>',
locale: 'sv-SE',
ssn: '<string>',
email: '[email protected]',
phone: '<string>',
reference: '<string>',
contactId: '<string>',
expiresAt: '<unknown>'
})
};
fetch('https://app.sajn.se/api/v1/sajn-id', 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://app.sajn.se/api/v1/sajn-id",
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([
'fullName' => '<string>',
'locale' => 'sv-SE',
'ssn' => '<string>',
'email' => '[email protected]',
'phone' => '<string>',
'reference' => '<string>',
'contactId' => '<string>',
'expiresAt' => '<unknown>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"authorization: <authorization>"
],
]);
$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://app.sajn.se/api/v1/sajn-id"
payload := strings.NewReader("{\n \"fullName\": \"<string>\",\n \"locale\": \"sv-SE\",\n \"ssn\": \"<string>\",\n \"email\": \"[email protected]\",\n \"phone\": \"<string>\",\n \"reference\": \"<string>\",\n \"contactId\": \"<string>\",\n \"expiresAt\": \"<unknown>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "<authorization>")
req.Header.Add("Authorization", "Bearer <token>")
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://app.sajn.se/api/v1/sajn-id")
.header("authorization", "<authorization>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"fullName\": \"<string>\",\n \"locale\": \"sv-SE\",\n \"ssn\": \"<string>\",\n \"email\": \"[email protected]\",\n \"phone\": \"<string>\",\n \"reference\": \"<string>\",\n \"contactId\": \"<string>\",\n \"expiresAt\": \"<unknown>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.sajn.se/api/v1/sajn-id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '<authorization>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"fullName\": \"<string>\",\n \"locale\": \"sv-SE\",\n \"ssn\": \"<string>\",\n \"email\": \"[email protected]\",\n \"phone\": \"<string>\",\n \"reference\": \"<string>\",\n \"contactId\": \"<string>\",\n \"expiresAt\": \"<unknown>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"organizationId": "<string>",
"fullName": "<string>",
"channel": "EMAIL",
"status": "CREATED",
"locale": "<string>",
"expiresAt": "<unknown>",
"createdAt": "<unknown>",
"updatedAt": "<unknown>",
"email": "<string>",
"phone": "<string>",
"reference": "<string>",
"verifiedAt": "<unknown>",
"verificationUrl": "<string>",
"token": "<string>",
"contact": {
"id": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"email": "<string>",
"phone": "<string>"
},
"createdBy": {
"id": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"email": "<string>"
},
"audits": [
{
"id": "<string>",
"type": "<string>",
"createdAt": "<unknown>",
"data": {},
"name": "<string>",
"email": "<string>",
"ipAddress": "<string>",
"userAgent": "<string>"
}
],
"data": {}
}{
"message": "<string>",
"code": "<string>",
"errorId": "<string>"
}{
"message": "<string>",
"code": "<string>",
"errorId": "<string>"
}{
"message": "<string>",
"code": "<string>",
"errorId": "<string>"
}Authorizations
OAuth 2.0 access token for a connected application. Limited to the scopes granted at consent.
Headers
Bearer token for API authentication
Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header Idempotent-Replayed: true); the same key with a different request returns 400.
255Body
Body
Create sajn ID verification request
Full name of the person to verify (required)
1Delivery channel: EMAIL or SMS (required)
EMAIL, SMS Locale for verification messages (default: sv-SE)
Swedish personal number (personnummer) for SSN-based verification
Email address (required for EMAIL channel)
^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$Phone number (required for SMS channel)
Optional reference/external ID for tracking
Optional contact ID to link this verification to
When the identity check (and its link) expires. Must be in the future. Defaults to 7 days from creation if omitted.
Response
200
Unique sajn ID verification identifier
Organization ID
Full name of person being verified
Delivery channel used
EMAIL, SMS, IN_APP Current verification status
CREATED, SENT, OPENED, VERIFIED, FAILED, EXPIRED, CANCELED Locale for messages
When the identity check (and its link) expires
When the verification was created
When the verification was last updated
Email address (if using EMAIL channel)
Phone number (if using SMS channel)
Reference/external ID
When the verification was completed
Verification URL (only included when creating)
Verification token (only included when creating, for sending)
Linked contact information
Show child attributes
Show child attributes
User who created this verification
Show child attributes
Show child attributes
Audit log entries for this verification
Show child attributes
Show child attributes
Verification data (e.g., BankID response)
Show child attributes
Show child attributes
Was this page helpful?

