Skip to Content
Identity checks

Create an identity check

POST
/api/v1/identity-checks

Creates an identity check and sends its link to the person over channel: EMAIL needs email and SMS needs phone.

With nationalId, BankID verifies that the person's national identity number matches it. Without it, BankID verifies that their name matches fullName.

The response is the only one that includes verificationUrl and token. Each check counts toward your monthly identity check quota.

Authorization

headerAuthorizationBearer <token>

API key, e.g. Authorization: Bearer sajn_svc_.... Not scope-limited: acts with its owner's workspace role.

Header Parameters

Sajn-Version?string

API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request.

Value in"2026-09""2026-10"
Sajn-Workspace?string

ID of the workspace this request acts in, from GET /api/v1/workspaces. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns 403 WORKSPACE_ACCESS_DENIED.

Idempotency-Key?string

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.

Lengthlength <= 255

Request Body

Body

application/json
  1. body
fullName*string

Full name of the person to verify (required)

Length1 <= length
email?string

Email address to send the link to. Required on the EMAIL channel.

Match^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
Formatemail
phone?string

Phone number to send the link to. Required on the SMS channel.

Length1 <= length
channel*string

How the recipient gets the verification link: EMAIL or SMS.

Value in"EMAIL""SMS"
reference?string

Optional reference/external ID for tracking

contactId?string

Optional contact ID to link this verification to

expiresAt?string

When the identity check and its link expire. Must be in the future. Default: 7 days after creation.

Formatdate-time
language?string

Language of the verification messages. Default: sv.

Value in"sv""en""no""da""fi""de""is""es""fr""it"
nationalId?string

National identity number, such as a Swedish personnummer. When set, BankID verifies that it matches; otherwise BankID verifies the name.

Response Body

200

application/json
  1. response
id*string

The identity check ID.

organizationId*string

The organization ID.

fullName*string

Full name of the person to verify.

email*|

Email address the link goes to on the EMAIL channel.

phone*|

Phone number the link goes to on the SMS channel.

channel*string

How the recipient got the verification link.

Value in"EMAIL""SMS""IN_APP"
status*string

sajn ID Status:

  • CREATED: Verification created but not sent
  • SENT: Verification sent to recipient
  • OPENED: Recipient opened verification link
  • VERIFIED: Identity successfully verified
  • FAILED: Verification failed
  • EXPIRED: Verification link expired
  • CANCELLED: Verification was cancelled
Value in"CREATED""SENT""OPENED""VERIFIED""FAILED""EXPIRED""CANCELLED"
reference*|

Your own reference for the check.

language*|

ISO 639-1 language code, such as sv or en. GET /api/v1/helpers/languages lists them.

Value in"sv""en""no""da""fi""de""is""es""fr""it"null
expiresAt*string

When the identity check and its link expire.

Formatdate-time
verifiedAt*|

When the person was verified. Null until then.

Formatdate-time
createdAt*string

When the identity check was created.

Formatdate-time
updatedAt*string

When the identity check was last updated.

Formatdate-time
verificationUrl*|

The verification link. Set only in the response to the create request; null otherwise.

contact*|

The contact the check is linked to.

createdBy*|

A sajn user

audits*array<>|

What happened to the check, newest first. Null in lists and in the response to the create request.

data*|

Verification data, such as the BankID result. Null in lists and in the response to the create request.

Example Request
curl -X POST 'https://app.sajn.se/api/v1/identity-checks' \  -H 'Content-Type: application/json' \  -d '{  "fullName": "Kai Lindqvist",  "email": "kai@example.com",  "phone": "+46701740605",  "channel": "EMAIL",  "reference": "HR-2026-0142",  "contactId": "cm4k2x9p10006abcd1234efgh",  "expiresAt": "2026-10-28T22:00:00.000Z",  "language": "sv",  "nationalId": "191212121212"}'
Example Response
{  "id": "cm4k2x9p10025abcd1234efgh",  "organizationId": "cm4k2x9p10000abcd1234efgh",  "fullName": "Kai Lindqvist",  "email": "kai@example.com",  "phone": "+46701740605",  "channel": "EMAIL",  "status": "VERIFIED",  "reference": "HR-2026-0142",  "language": "sv",  "expiresAt": "2026-10-28T22:00:00.000Z",  "verifiedAt": "2026-09-29T07:41:00.000Z",  "createdAt": "2026-09-28T09:12:00.000Z",  "updatedAt": "2026-09-28T09:15:00.000Z",  "verificationUrl": "https://app.sajn.se/id/cm4k2x9p10025abcd1234efgh",  "contact": {    "id": "cm4k2x9p10006abcd1234efgh",    "firstName": "Kai",    "lastName": "Lindqvist",    "email": "kai@example.com",    "phone": "+46701740605"  },  "createdBy": {    "id": "cm4k2x9p10002abcd1234efgh",    "email": "alex@example.com",    "name": "Alex Berg"  },  "audits": [    {      "id": "cm4k2x9p10038abcd1234efgh",      "type": "VERIFICATION_COMPLETED",      "createdAt": "2026-09-28T09:12:00.000Z",      "data": {        "partyId": "cm4k2x9p10004abcd1234efgh",        "signatureType": "SE_BANKID"      },      "name": "Kai Lindqvist",      "email": "kai@example.com",      "ipAddress": "192.0.2.10",      "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 14_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.0 Safari/605.1.15"    }  ],  "data": {    "partyId": "cm4k2x9p10004abcd1234efgh",    "signatureType": "SE_BANKID"  }}

Was this page helpful?