curl --request POST \
--url https://api.byzantine.fi/v1/query/get-remove-users-payload \
--header 'Content-Type: application/json' \
--header 'X-Pubkey: <x-pubkey>' \
--header 'X-Pubkey, X-Timestamp, X-Signature: <api-key>' \
--header 'X-Signature: <x-signature>' \
--header 'X-Timestamp: <x-timestamp>' \
--data '
{
"accountId": "550e8400-e29b-41d4-a716-446655440000",
"userIds": [
"550e8400-e29b-41d4-a716-446655440000"
]
}
'import requests
url = "https://api.byzantine.fi/v1/query/get-remove-users-payload"
payload = {
"accountId": "550e8400-e29b-41d4-a716-446655440000",
"userIds": ["550e8400-e29b-41d4-a716-446655440000"]
}
headers = {
"X-Pubkey": "<x-pubkey>",
"X-Timestamp": "<x-timestamp>",
"X-Signature": "<x-signature>",
"X-Pubkey, X-Timestamp, X-Signature": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Pubkey': '<x-pubkey>',
'X-Timestamp': '<x-timestamp>',
'X-Signature': '<x-signature>',
'X-Pubkey, X-Timestamp, X-Signature': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
accountId: '550e8400-e29b-41d4-a716-446655440000',
userIds: ['550e8400-e29b-41d4-a716-446655440000']
})
};
fetch('https://api.byzantine.fi/v1/query/get-remove-users-payload', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"bodyToSign": {
"type": "ACTIVITY_TYPE_DELETE_USERS",
"timestampMs": "<string>",
"organizationId": "d107c1e1-766a-4091-802c-de61a3973e91",
"parameters": {
"userIds": [
"<string>"
]
}
},
"typedData": {},
"issuedAt": 1700000000
}Step 1 Get remove users payload (passkey or wallet)
Get the payload to sign in order to remove users from an account. Nothing is removed yet: the same user IDs
must be sent again to remove-users with the signature.
A root user cannot be removed: demote them with update-users-role first. The account’s KYC subject and the
beneficiaries of an entity account (UBOs, directors) are not removed either: they stay on the account with the
beneficiary role, and only their access is revoked. A self-custodial account must keep at least one member.
A Turnkey account receives bodyToSign, the Turnkey DELETE_USERS request to stamp with a root user’s passkey.
A self-custodial account receives typedData and issuedAt: the EIP-712 typed data to sign with the account
wallet (eth_signTypedData_v4), on the requested chain (Ethereum when chain_id is omitted).
curl --request POST \
--url https://api.byzantine.fi/v1/query/get-remove-users-payload \
--header 'Content-Type: application/json' \
--header 'X-Pubkey: <x-pubkey>' \
--header 'X-Pubkey, X-Timestamp, X-Signature: <api-key>' \
--header 'X-Signature: <x-signature>' \
--header 'X-Timestamp: <x-timestamp>' \
--data '
{
"accountId": "550e8400-e29b-41d4-a716-446655440000",
"userIds": [
"550e8400-e29b-41d4-a716-446655440000"
]
}
'import requests
url = "https://api.byzantine.fi/v1/query/get-remove-users-payload"
payload = {
"accountId": "550e8400-e29b-41d4-a716-446655440000",
"userIds": ["550e8400-e29b-41d4-a716-446655440000"]
}
headers = {
"X-Pubkey": "<x-pubkey>",
"X-Timestamp": "<x-timestamp>",
"X-Signature": "<x-signature>",
"X-Pubkey, X-Timestamp, X-Signature": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Pubkey': '<x-pubkey>',
'X-Timestamp': '<x-timestamp>',
'X-Signature': '<x-signature>',
'X-Pubkey, X-Timestamp, X-Signature': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
accountId: '550e8400-e29b-41d4-a716-446655440000',
userIds: ['550e8400-e29b-41d4-a716-446655440000']
})
};
fetch('https://api.byzantine.fi/v1/query/get-remove-users-payload', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"bodyToSign": {
"type": "ACTIVITY_TYPE_DELETE_USERS",
"timestampMs": "<string>",
"organizationId": "d107c1e1-766a-4091-802c-de61a3973e91",
"parameters": {
"userIds": [
"<string>"
]
}
},
"typedData": {},
"issuedAt": 1700000000
}Headers
Query Parameters
Body
Body to remove users from an existing account
Response
Payload to sign

