For the complete documentation index, see llms.txt. This page is also available as Markdown.

Users

CreateApiKey creates a new API Key

post
/users/v1/api/create

priv_key is returned only once, in this response. It isn't stored and can't be retrieved again, only rotated via RotateApiKey

Required scopes
This endpoint requires the following scopes:
Authorizations
AuthorizationstringRequired

Send 'Authorization: APIKey ' to authenticate with a API key.

Body
allowedIpsstring[]Optional
expiresAtstring · date-timeOptional
namestringRequired
scopesstring[]Required
Responses
200

A successful response.

application/json
apiKeystringRequired
privKeystringRequired
post/users/v1/api/create
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"
}

UpdateApiKey overwrite the Api key information (scopes)

patch
/users/v1/api/{apiKeyId}

Full replace of scopes, expires_at and allowed_ips. The key material itself is unchanged. Use RotateApiKey to replace credentials instead

Required scopes
This endpoint requires the following scopes:
Authorizations
AuthorizationstringRequired

Send 'Authorization: APIKey ' to authenticate with a API key.

Path parameters
apiKeyIdstringRequired

api_key represents the api key returned after successfully creation

Body
allowedIpsstring[]Optional
expiresAtstring · date-timeOptional
scopesstring[]Required
Responses
200

A successful response.

application/json
object · UpdateApiKeyResponse represents the response body from the UpdateApi endpointOptional
patch/users/v1/api/{apiKeyId}
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"
  ]
}
{}

DeleteApiKey deletes the provided api key id

delete
/users/v1/api/{apiKeyId}/delete

Immediate and irreversible. Any client still using this key starts failing authentication right away

Required scopes
This endpoint requires the following scopes:
Authorizations
AuthorizationstringRequired

Send 'Authorization: APIKey ' to authenticate with a API key.

Path parameters
apiKeyIdstringRequired

api_key represents the api key returned after successfully creation

Responses
200

A successful response.

application/json
object · DeleteApiKeyResponse represents the response body from the DeleteApi endpointOptional
delete/users/v1/api/{apiKeyId}/delete
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)

patch
/users/v1/api/{apiKeyId}/rotate

The old api_key stops working immediately. Priv_key is only returned in this response, same as on creation

Required scopes
This endpoint requires the following scopes:
Authorizations
AuthorizationstringRequired

Send 'Authorization: APIKey ' to authenticate with a API key.

Path parameters
apiKeyIdstringRequired

api_key represents the provided api key

Responses
200

A successful response.

application/json
apiKeystringRequired
privKeystringRequired
pubKeystringRequired
patch/users/v1/api/{apiKeyId}/rotate
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

get
/users/v1/api/{apiKeyId}/scopes

Scopes an API key carries directly, distinct from the calling user's own role-based scopes (see GetUserRoles)

Required scopes
This endpoint requires the following scopes:
Authorizations
AuthorizationstringRequired

Send 'Authorization: APIKey ' to authenticate with a API key.

Path parameters
apiKeyIdstringRequired

api_key represents the provided api key

Responses
200

A successful response.

application/json
scopesstring[]Required
get/users/v1/api/{apiKeyId}/scopes
GET /users/v1/api/{apiKeyId}/scopes HTTP/1.1
Host: backend.pay.kiichain.io
Authorization: YOUR_API_KEY
Accept: */*
{
  "scopes": [
    "text"
  ]
}

GetUserApiKeys returns all the user api keys

get
/users/v1/api/{userId}/api-keys

Never includes priv_key. That's only ever returned once, at creation/rotation time

Required scopes
This endpoint requires the following scopes:
Authorizations
AuthorizationstringRequired

Send 'Authorization: APIKey ' to authenticate with a API key.

Path parameters
userIdstringRequired

user_id represents the user identifier

Responses
200

A successful response.

application/json
get/users/v1/api/{userId}/api-keys
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"
      ]
    }
  ]
}

Me is the endpoint to get the current authenticated user

get
/users/v1/users/me

Also returns the active account (with KYC and wallets) and the caller's roles, which GetUser doesn't include

Required scopes
This endpoint requires the following scopes:
Authorizations
AuthorizationstringRequired

Send 'Authorization: APIKey ' to authenticate with a API key.

Responses
200

A successful response.

application/json
hasPasswordbooleanRequired
rolesstring[]Required
get/users/v1/users/me
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).

patch
/users/v1/users/me/change_profile

Self-service only. No user_id in the request, it always acts on the caller.

Required scopes
This endpoint requires the following scopes:
Authorizations
AuthorizationstringRequired

Send 'Authorization: APIKey ' to authenticate with a API key.

Body
displayNamestringRequired
languagestringRequired
Responses
200

A successful response.

application/json
object · UpdateMyProfileResponse is the body response for the user self-update profile endpointOptional
patch/users/v1/users/me/change_profile
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

post
/users/v1/users/me/email/change

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

Required scopes
This endpoint requires the following scopes:
Authorizations
AuthorizationstringRequired

Send 'Authorization: APIKey ' to authenticate with a API key.

Body
currentEmailCodestringOptional
newEmailstringRequired
passwordstringOptional
Responses
200

A successful response.

application/json
object · StartEmailChangeResponse is the response for starting an email changeOptional
post/users/v1/users/me/email/change
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

post
/users/v1/users/me/email/current-code

Security step for users without a password and without MFA (OAuth signups) before StartEmailChange. One code per minute

Required scopes
This endpoint requires the following scopes:
Authorizations
AuthorizationstringRequired

Send 'Authorization: APIKey ' to authenticate with a API key.

Body
object · RequestEmailChangeCodeRequest is the body request for sending a code to the current emailOptional
Responses
200

A successful response.

application/json
object · RequestEmailChangeCodeResponse is the response for sending a code to the current emailOptional
post/users/v1/users/me/email/current-code
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

{}
{}

GetUser returns a single user

get
/users/v1/users/{userId}

Lookup by user_id. For the caller's own profile use Me instead

Required scopes
This endpoint requires the following scopes:
Authorizations
AuthorizationstringRequired

Send 'Authorization: APIKey ' to authenticate with a API key.

Path parameters
userIdstringRequired

user_id represents the user identifier

Responses
200

A successful response.

application/json
accountsstring[]Required
get/users/v1/users/{userId}
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"
  }
}

UpdateLanguage is the endpoint to update the user language

patch
/users/v1/users/{userId}/language

Callable on any user. For a user updating their own language use UpdateMyProfile instead

Required scopes
This endpoint requires the following scopes:
Authorizations
AuthorizationstringRequired

Send 'Authorization: APIKey ' to authenticate with a API key.

Path parameters
userIdstringRequired

user_id represents the user identifier

Body
languagestringRequired
Responses
200

A successful response.

application/json
object · UpdateLanguageResponse is the body response for the update language endpointOptional
patch/users/v1/users/{userId}/language
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"
}
{}

GetUserRoles is the endpoint to get the user roles and scopes

get
/users/v1/users/{userId}/roles

scopes is the flattened, deduplicated union of every role's scopes This is what actually determines the user's permissions

Required scopes
This endpoint requires the following scopes:
Authorizations
AuthorizationstringRequired

Send 'Authorization: APIKey ' to authenticate with a API key.

Path parameters
userIdstringRequired

user_id represents the user identifier

Responses
200

A successful response.

application/json
scopesstring[]Required
get/users/v1/users/{userId}/roles
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"
  ]
}

GetUserSettings returns the settings for a user

get
/users/v1/users/{userId}/settings

Currently just max_allowance. Update via PatchUserSettings

Required scopes
This endpoint requires the following scopes:
Authorizations
AuthorizationstringRequired

Send 'Authorization: APIKey ' to authenticate with a API key.

Path parameters
userIdstringRequired

user_id is the user identifier

Responses
200

A successful response.

application/json
get/users/v1/users/{userId}/settings
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.

patch
/users/v1/users/{userId}/settings

max_allowance is optional in the request specifically so it can be omitted to leave the current value untouched

Required scopes
This endpoint requires the following scopes:
Authorizations
AuthorizationstringRequired

Send 'Authorization: APIKey ' to authenticate with a API key.

Path parameters
userIdstringRequired

user_id is the user identifier

Body
maxAllowancebooleanOptional
Responses
200

A successful response.

application/json
object · PatchUserSettingsResponse is the response for the patch user settings endpointOptional
patch/users/v1/users/{userId}/settings
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)

get
/users/v1/{userId}/mfa/methods

Only non-sensitive info per method (type, label, verified/primary flags). Never secrets like the TOTP seed

Required scopes
This endpoint requires the following scopes:
Authorizations
AuthorizationstringRequired

Send 'Authorization: APIKey ' to authenticate with a API key.

Path parameters
userIdstringRequired

user_id represents the user identifier

Responses
200

A successful response.

application/json
get/users/v1/{userId}/mfa/methods
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