curl --request POST \
--url https://api.byzantine.fi/v1/submit/remove-users \
--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 '
{
"signedBody": {
"type": "ACTIVITY_TYPE_DELETE_USERS",
"timestampMs": "<string>",
"organizationId": "d107c1e1-766a-4091-802c-de61a3973e91",
"parameters": {
"userIds": [
"<string>"
]
}
},
"webAuthnStamp": "<string>"
}
'import requests
url = "https://api.byzantine.fi/v1/submit/remove-users"
payload = {
"signedBody": {
"type": "ACTIVITY_TYPE_DELETE_USERS",
"timestampMs": "<string>",
"organizationId": "d107c1e1-766a-4091-802c-de61a3973e91",
"parameters": { "userIds": ["<string>"] }
},
"webAuthnStamp": "<string>"
}
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({
signedBody: {
type: 'ACTIVITY_TYPE_DELETE_USERS',
timestampMs: '<string>',
organizationId: 'd107c1e1-766a-4091-802c-de61a3973e91',
parameters: {userIds: ['<string>']}
},
webAuthnStamp: '<string>'
})
};
fetch('https://api.byzantine.fi/v1/submit/remove-users', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"accountId": "550e8400-e29b-41d4-a716-446655440000",
"removedUsers": [
{
"userId": "550e8400-e29b-41d4-a716-446655440000",
"outcome": "removed"
}
],
"removedAt": "2023-11-07T05:31:56Z",
"removedBy": "550e8400-e29b-41d4-a716-446655440000"
}Step 2 Remove users (passkey or wallet)
Remove users from a Byzantine account, with the authorization issued by get-remove-users-payload.
A Turnkey account sends the stamped bodyToSign (signedBody + webAuthnStamp). The passkey that produced the
stamp must be registered to a root member of the account, who is the remover: the users are deleted from the
Turnkey sub-organization, then from the account. A self-custodial account sends the same user IDs and chain as
the payload request plus the wallet signature of its typedData (accountId, userIds, walletSignature,
issuedAt).
Whatever the account, a root user cannot be removed (demote them first), and the account’s KYC subject or an
entity’s beneficiaries keep their membership with the beneficiary role: only their access is revoked (Turnkey
user, passkeys, OTP sessions). A pending invitation of a removed user is cancelled; an accepted one is history
and stays.
curl --request POST \
--url https://api.byzantine.fi/v1/submit/remove-users \
--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 '
{
"signedBody": {
"type": "ACTIVITY_TYPE_DELETE_USERS",
"timestampMs": "<string>",
"organizationId": "d107c1e1-766a-4091-802c-de61a3973e91",
"parameters": {
"userIds": [
"<string>"
]
}
},
"webAuthnStamp": "<string>"
}
'import requests
url = "https://api.byzantine.fi/v1/submit/remove-users"
payload = {
"signedBody": {
"type": "ACTIVITY_TYPE_DELETE_USERS",
"timestampMs": "<string>",
"organizationId": "d107c1e1-766a-4091-802c-de61a3973e91",
"parameters": { "userIds": ["<string>"] }
},
"webAuthnStamp": "<string>"
}
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({
signedBody: {
type: 'ACTIVITY_TYPE_DELETE_USERS',
timestampMs: '<string>',
organizationId: 'd107c1e1-766a-4091-802c-de61a3973e91',
parameters: {userIds: ['<string>']}
},
webAuthnStamp: '<string>'
})
};
fetch('https://api.byzantine.fi/v1/submit/remove-users', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"accountId": "550e8400-e29b-41d4-a716-446655440000",
"removedUsers": [
{
"userId": "550e8400-e29b-41d4-a716-446655440000",
"outcome": "removed"
}
],
"removedAt": "2023-11-07T05:31:56Z",
"removedBy": "550e8400-e29b-41d4-a716-446655440000"
}Headers
Query Parameters
Body
The authorization to remove users from an existing account
- Option 1
- Option 2
Request body of remove-users: the authorization issued by get-remove-users-payload, matching the account kind.
No removedBy is sent: a Turnkey account's remover is the root user whose passkey produced the stamp, and a
self-custodial account acts through its wallet.
Cryptographically passkey signed (stamped). For more info, see authentication methods.
Response
Users removed
Response body when users are removed from a Byzantine account

