Users
priv_key is returned only once, in this response. It isn't stored and can't be retrieved again, only rotated via RotateApiKey
Send 'Authorization: APIKey ' to authenticate with a API key.
A successful response.
An unexpected error response. details[0] is always an AppError, see #/components/schemas/AppError
POST /users/v1/api/create HTTP/1.1
Host: backend.pay.kiichain.io
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 94
{
"allowedIps": [
"text"
],
"expiresAt": "2026-01-01T00:00:00.000Z",
"name": "text",
"scopes": [
"text"
]
}{
"apiKey": "text",
"privKey": "text"
}Full replace of scopes, expires_at and allowed_ips. The key material itself is unchanged. Use RotateApiKey to replace credentials instead
Send 'Authorization: APIKey ' to authenticate with a API key.
api_key represents the api key returned after successfully creation
A successful response.
An unexpected error response. details[0] is always an AppError, see #/components/schemas/AppError
PATCH /users/v1/api/{apiKeyId} HTTP/1.1
Host: backend.pay.kiichain.io
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 80
{
"allowedIps": [
"text"
],
"expiresAt": "2026-01-01T00:00:00.000Z",
"scopes": [
"text"
]
}{}Immediate and irreversible. Any client still using this key starts failing authentication right away
Send 'Authorization: APIKey ' to authenticate with a API key.
api_key represents the api key returned after successfully creation
A successful response.
An unexpected error response. details[0] is always an AppError, see #/components/schemas/AppError
DELETE /users/v1/api/{apiKeyId}/delete HTTP/1.1
Host: backend.pay.kiichain.io
Authorization: YOUR_API_KEY
Accept: */*
{}RotateApiKey takes the provided Api Key and rotates credentials (changes Api Key, Pub Key and Priv Key)
The old api_key stops working immediately. Priv_key is only returned in this response, same as on creation
Send 'Authorization: APIKey ' to authenticate with a API key.
api_key represents the provided api key
A successful response.
An unexpected error response. details[0] is always an AppError, see #/components/schemas/AppError
PATCH /users/v1/api/{apiKeyId}/rotate HTTP/1.1
Host: backend.pay.kiichain.io
Authorization: YOUR_API_KEY
Accept: */*
{
"apiKey": "text",
"privKey": "text",
"pubKey": "text"
}GetApiKeyScopes returns the scopes associated to the provided api key id
Scopes an API key carries directly, distinct from the calling user's own role-based scopes (see GetUserRoles)
Send 'Authorization: APIKey ' to authenticate with a API key.
api_key represents the provided api key
A successful response.
An unexpected error response. details[0] is always an AppError, see #/components/schemas/AppError
GET /users/v1/api/{apiKeyId}/scopes HTTP/1.1
Host: backend.pay.kiichain.io
Authorization: YOUR_API_KEY
Accept: */*
{
"scopes": [
"text"
]
}Never includes priv_key. That's only ever returned once, at creation/rotation time
Send 'Authorization: APIKey ' to authenticate with a API key.
user_id represents the user identifier
A successful response.
An unexpected error response. details[0] is always an AppError, see #/components/schemas/AppError
GET /users/v1/api/{userId}/api-keys HTTP/1.1
Host: backend.pay.kiichain.io
Authorization: YOUR_API_KEY
Accept: */*
{
"apiKey": [
{
"allowedIps": [
"text"
],
"apiKey": "text",
"createdAt": "2026-01-01T00:00:00.000Z",
"expiresAt": "2026-01-01T00:00:00.000Z",
"id": "text",
"lastUsedAt": "2026-01-01T00:00:00.000Z",
"name": "text",
"privKey": "text",
"pubKey": "text",
"revokedAt": "2026-01-01T00:00:00.000Z",
"scopes": [
"text"
]
}
]
}Also returns the active account (with KYC and wallets) and the caller's roles, which GetUser doesn't include
Send 'Authorization: APIKey ' to authenticate with a API key.
A successful response.
An unexpected error response. details[0] is always an AppError, see #/components/schemas/AppError
GET /users/v1/users/me HTTP/1.1
Host: backend.pay.kiichain.io
Authorization: YOUR_API_KEY
Accept: */*
{
"account": {
"accountName": "text",
"accountType": "text",
"countries": [
"text"
],
"createdAt": "2026-01-01T00:00:00.000Z",
"deletedAt": "2026-01-01T00:00:00.000Z",
"id": "text",
"kycInfo": {
"level": 1,
"provider": "text",
"requestedAt": "2026-01-01T00:00:00.000Z",
"status": "text",
"verifiedAt": "2026-01-01T00:00:00.000Z"
},
"privyId": "text",
"subscription": {
"code": "text",
"status": "text",
"tier": 1
},
"updatedAt": "2026-01-01T00:00:00.000Z",
"userId": "text",
"wallets": [
{
"address": "text",
"chainType": "text",
"id": "text"
}
]
},
"hasPassword": true,
"roles": [
"text"
],
"user": {
"admin": true,
"createdAt": "2026-01-01T00:00:00.000Z",
"deletedAt": "2026-01-01T00:00:00.000Z",
"displayName": "text",
"email": "text",
"emailVerified": true,
"id": "text",
"isMfaEnabled": true,
"language": "text",
"lockReason": "text",
"locked": true,
"passwordChangedAt": "2026-01-01T00:00:00.000Z",
"superAdmin": true,
"updatedAt": "2026-01-01T00:00:00.000Z"
}
}UpdateMyProfile is the endpoint for a user to update their own profile (display_name, language).
Self-service only. No user_id in the request, it always acts on the caller.
Send 'Authorization: APIKey ' to authenticate with a API key.
A successful response.
An unexpected error response. details[0] is always an AppError, see #/components/schemas/AppError
PATCH /users/v1/users/me/change_profile HTTP/1.1
Host: backend.pay.kiichain.io
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 40
{
"displayName": "text",
"language": "text"
}{}StartEmailChange starts changing the caller's email and sends a code to the new address
MFA users send the X-Mfa-Code header. Otherwise users with a password send password, and users without one send current_email_code from RequestEmailChangeCode. A new request replaces any pending change
Send 'Authorization: APIKey ' to authenticate with a API key.
A successful response.
An unexpected error response. details[0] is always an AppError, see #/components/schemas/AppError
POST /users/v1/users/me/email/change HTTP/1.1
Host: backend.pay.kiichain.io
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 63
{
"currentEmailCode": "text",
"newEmail": "text",
"password": "text"
}{}RequestEmailChangeCode sends a one-time code to the caller's current email
Security step for users without a password and without MFA (OAuth signups) before StartEmailChange. One code per minute
Send 'Authorization: APIKey ' to authenticate with a API key.
A successful response.
An unexpected error response. details[0] is always an AppError, see #/components/schemas/AppError
POST /users/v1/users/me/email/current-code HTTP/1.1
Host: backend.pay.kiichain.io
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 2
{}{}Lookup by user_id. For the caller's own profile use Me instead
Send 'Authorization: APIKey ' to authenticate with a API key.
user_id represents the user identifier
A successful response.
An unexpected error response. details[0] is always an AppError, see #/components/schemas/AppError
GET /users/v1/users/{userId} HTTP/1.1
Host: backend.pay.kiichain.io
Authorization: YOUR_API_KEY
Accept: */*
{
"accounts": [
"text"
],
"user": {
"admin": true,
"createdAt": "2026-01-01T00:00:00.000Z",
"deletedAt": "2026-01-01T00:00:00.000Z",
"displayName": "text",
"email": "text",
"emailVerified": true,
"id": "text",
"isMfaEnabled": true,
"language": "text",
"lockReason": "text",
"locked": true,
"passwordChangedAt": "2026-01-01T00:00:00.000Z",
"superAdmin": true,
"updatedAt": "2026-01-01T00:00:00.000Z"
}
}Callable on any user. For a user updating their own language use UpdateMyProfile instead
Send 'Authorization: APIKey ' to authenticate with a API key.
user_id represents the user identifier
A successful response.
An unexpected error response. details[0] is always an AppError, see #/components/schemas/AppError
PATCH /users/v1/users/{userId}/language HTTP/1.1
Host: backend.pay.kiichain.io
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 19
{
"language": "text"
}{}scopes is the flattened, deduplicated union of every role's scopes This is what actually determines the user's permissions
Send 'Authorization: APIKey ' to authenticate with a API key.
user_id represents the user identifier
A successful response.
An unexpected error response. details[0] is always an AppError, see #/components/schemas/AppError
GET /users/v1/users/{userId}/roles HTTP/1.1
Host: backend.pay.kiichain.io
Authorization: YOUR_API_KEY
Accept: */*
{
"roles": [
{
"id": "text",
"name": "text"
}
],
"scopes": [
"text"
]
}Currently just max_allowance. Update via PatchUserSettings
Send 'Authorization: APIKey ' to authenticate with a API key.
user_id is the user identifier
A successful response.
An unexpected error response. details[0] is always an AppError, see #/components/schemas/AppError
GET /users/v1/users/{userId}/settings HTTP/1.1
Host: backend.pay.kiichain.io
Authorization: YOUR_API_KEY
Accept: */*
{
"settings": {
"id": "text",
"maxAllowance": true,
"userId": "text"
}
}PatchUserSettings partially updates the settings for a user. Any setting not set in the body will be left unchanged.
max_allowance is optional in the request specifically so it can be omitted to leave the current value untouched
Send 'Authorization: APIKey ' to authenticate with a API key.
user_id is the user identifier
A successful response.
An unexpected error response. details[0] is always an AppError, see #/components/schemas/AppError
PATCH /users/v1/users/{userId}/settings HTTP/1.1
Host: backend.pay.kiichain.io
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 21
{
"maxAllowance": true
}{}GetMfaMethods returns the Mfa method registered for the user (if any)
Only non-sensitive info per method (type, label, verified/primary flags). Never secrets like the TOTP seed
Send 'Authorization: APIKey ' to authenticate with a API key.
user_id represents the user identifier
A successful response.
An unexpected error response. details[0] is always an AppError, see #/components/schemas/AppError
GET /users/v1/{userId}/mfa/methods HTTP/1.1
Host: backend.pay.kiichain.io
Authorization: YOUR_API_KEY
Accept: */*
{
"methods": [
{
"isPrimary": true,
"isVerified": true,
"label": "text",
"lastUsedAt": "2026-01-01T00:00:00.000Z",
"mfaId": "text",
"mfaType": "text"
}
]
}Last updated