Skip to main content

KYT State

KYT (Know Your Transaction) is the transaction monitoring our compliance team runs on every deposit and pay-out. When something needs a closer look, your user, or one specific user/counterparty pair, is temporarily held, placed under review or rejected, and transactions are paused or refused while that lasts.

The KYT-STATE webhook tells you when that changes. This endpoint lets you read the current state on demand, for example right before your user starts a transaction. It only reads the state and never changes it.

HTTP Get Request​

https://api.sandbox.avenia.io:10952/v2/account/kyt-state

Query Parameters​

ParameterTypeRequiredDescription
counterpartyKeystringNoThe counterparty's tax id, PIX key or wallet address, exactly as it appears in transactions. Scopes the answer to the pair formed by the account and this counterparty. Up to 256 characters.
subAccountIdstringNoThe ID of the subaccount to read the state of.

Note: Remember that you can pass subAccountId as a parameter for the operation to be for the sub account.

Account-wide or per counterparty​

Without counterpartyKey, the answer is the account-wide state only. Restrictions scoped to specific counterparties are not reflected, so a company account can read ACTIVE here while one of its counterparties is restricted.

With counterpartyKey, the account-wide state wins whenever it restricts: you get that state and the answer omits counterpartyKey, telling you the restriction applies to the account as a whole. Otherwise the answer is about that pair and echoes the key, also when it is ACTIVE.

info

Call this endpoint with the counterparty before a transaction. That is the only answer that reflects every restriction the transaction would run into.

cUrl Example:​

curl -X GET "https://api.sandbox.avenia.io:10952/v2/account/kyt-state?counterpartyKey=45981761000100" \
-H "Authorization: Bearer eyJhdXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"

Sample JSON Response​

A pair held for compliance review:

{
"kytState": {
"userId": "9664631a-cdab-4c0e-84bc-18d173e448e8",
"counterpartyKey": "45981761000100",
"state": "TEMPORARY_HOLD",
"expiresAt": "2026-10-07T15:28:51.330773Z",
"message": "Transactions with this counterparty are temporarily held for compliance review until 2026-10-07T15:28:51Z and will be refused until then. Send an email to compliance@avenia.io and respond to the RFI (request for information).",
"updatedAt": "2026-10-07T14:28:51.331953Z"
}
}

An unrestricted account, asked without counterpartyKey:

{
"kytState": {
"userId": "9664631a-cdab-4c0e-84bc-18d173e448e8",
"state": "ACTIVE",
"message": "User is active. Transactions are allowed."
}
}

Response Fields​

FieldTypeDescription
userIdstringThe account ID, or the subaccount ID when subAccountId was given. It is the same identifier the KYT-STATE webhook carries in userId.
counterpartyKeystringPresent only when the answer is about one counterparty: the counterparty's tax id, PIX key or wallet address, exactly as it appears in transactions. Absent when the answer is about the account as a whole.
statestringThe current state: TEMPORARY_HOLD, UNDER_REVIEW, REJECTED or ACTIVE. See the table below.
expiresAtstringPresent only for TEMPORARY_HOLD: when the hold lifts, in UTC (RFC 3339).
messagestringA sentence you can show to your end user. For restrictions it ends with how to contact our compliance team.
updatedAtstringWhen the state was last written, in UTC. Absent when the account was never restricted.

KYT State values​

StateDescription
TEMPORARY_HOLDTransactions are held until expiresAt. The hold lifts by itself at that time.
UNDER_REVIEWTransactions are held until our compliance team decides.
REJECTEDTransactions are refused permanently.
ACTIVETransactions are allowed. Either there was never a restriction or it was lifted by our compliance team.
info

Unlike the webhook, the answer has no previousState: it is a snapshot of the current state, not a change.

Errors​

StatusMessageWhen
400InvalidFieldError: counterpartyKey is invalidcounterpartyKey is longer than 256 characters.
400InvalidFieldError: subAccountId is invalidsubAccountId is not a UUID.
404NotFoundError: subAccountId not foundsubAccountId does not belong to your account.