curl --request POST \
--url https://api.byzantine.fi/v1/submit/invite-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_CREATE_USERS_V3",
"timestampMs": "<string>",
"organizationId": "d107c1e1-766a-4091-802c-de61a3973e91",
"parameters": {
"users": [
{
"userName": "John Doe",
"userEmail": "john.doe@example.com",
"apiKeys": [
{
"apiKeyName": "Byzantine API Key",
"publicKey": "c51b102585622c59715784828c579278d5360159cd214fc976f5ce537c41872231",
"curveType": "API_KEY_CURVE_P256",
"expirationSeconds": "3600"
}
],
"authenticators": [
{
"authenticatorName": "<string>",
"challenge": "<string>",
"attestation": {
"credentialId": "<string>",
"clientDataJson": "<string>",
"attestationObject": "<string>",
"transports": []
}
}
],
"oauthProviders": [
{
"providerName": "<string>",
"oidcToken": "<string>"
}
],
"userTags": [
"<string>"
]
}
]
}
},
"webAuthnStamp": "<string>",
"invitedBy": "550e8400-e29b-41d4-a716-446655440000"
}
'import requests
url = "https://api.byzantine.fi/v1/submit/invite-users"
payload = {
"signedBody": {
"type": "ACTIVITY_TYPE_CREATE_USERS_V3",
"timestampMs": "<string>",
"organizationId": "d107c1e1-766a-4091-802c-de61a3973e91",
"parameters": { "users": [
{
"userName": "John Doe",
"userEmail": "john.doe@example.com",
"apiKeys": [
{
"apiKeyName": "Byzantine API Key",
"publicKey": "c51b102585622c59715784828c579278d5360159cd214fc976f5ce537c41872231",
"curveType": "API_KEY_CURVE_P256",
"expirationSeconds": "3600"
}
],
"authenticators": [
{
"authenticatorName": "<string>",
"challenge": "<string>",
"attestation": {
"credentialId": "<string>",
"clientDataJson": "<string>",
"attestationObject": "<string>",
"transports": []
}
}
],
"oauthProviders": [
{
"providerName": "<string>",
"oidcToken": "<string>"
}
],
"userTags": ["<string>"]
}
] }
},
"webAuthnStamp": "<string>",
"invitedBy": "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({
signedBody: {
type: 'ACTIVITY_TYPE_CREATE_USERS_V3',
timestampMs: '<string>',
organizationId: 'd107c1e1-766a-4091-802c-de61a3973e91',
parameters: {
users: [
{
userName: 'John Doe',
userEmail: 'john.doe@example.com',
apiKeys: [
{
apiKeyName: 'Byzantine API Key',
publicKey: 'c51b102585622c59715784828c579278d5360159cd214fc976f5ce537c41872231',
curveType: 'API_KEY_CURVE_P256',
expirationSeconds: '3600'
}
],
authenticators: [
{
authenticatorName: '<string>',
challenge: '<string>',
attestation: {
credentialId: '<string>',
clientDataJson: '<string>',
attestationObject: '<string>',
transports: []
}
}
],
oauthProviders: [{providerName: '<string>', oidcToken: '<string>'}],
userTags: ['<string>']
}
]
}
},
webAuthnStamp: '<string>',
invitedBy: '550e8400-e29b-41d4-a716-446655440000'
})
};
fetch('https://api.byzantine.fi/v1/submit/invite-users', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"accountId": "550e8400-e29b-41d4-a716-446655440000",
"newUsers": [
{
"userId": "550e8400-e29b-41d4-a716-446655440000",
"firstName": "John",
"lastName": "Doe",
"userEmail": "john.doe@example.com"
}
],
"invitedBy": "550e8400-e29b-41d4-a716-446655440000",
"invitedAt": "2023-11-07T05:31:56Z"
}Step 2 Send invitations (passkey or wallet)
Invite users to a Byzantine account, with the authorization issued by get-invite-users-payload.
A Turnkey account sends the stamped bodyToSign (signedBody + webAuthnStamp), from a root user: the users
are created in the Turnkey sub-organization with the view role, with a pending invitation to sign up (and to do
a KYC on Byzantine if they did not yet). A self-custodial account sends the same users and chain as the payload
request plus the wallet signature of its typedData (accountId, newUsers, walletSignature, issuedAt):
the users join the account right away with the self_custodial role, without Turnkey user.
No email is sent: each invitation emits the account.member_invited webhook event, on which the integrator
notifies the invitee.
curl --request POST \
--url https://api.byzantine.fi/v1/submit/invite-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_CREATE_USERS_V3",
"timestampMs": "<string>",
"organizationId": "d107c1e1-766a-4091-802c-de61a3973e91",
"parameters": {
"users": [
{
"userName": "John Doe",
"userEmail": "john.doe@example.com",
"apiKeys": [
{
"apiKeyName": "Byzantine API Key",
"publicKey": "c51b102585622c59715784828c579278d5360159cd214fc976f5ce537c41872231",
"curveType": "API_KEY_CURVE_P256",
"expirationSeconds": "3600"
}
],
"authenticators": [
{
"authenticatorName": "<string>",
"challenge": "<string>",
"attestation": {
"credentialId": "<string>",
"clientDataJson": "<string>",
"attestationObject": "<string>",
"transports": []
}
}
],
"oauthProviders": [
{
"providerName": "<string>",
"oidcToken": "<string>"
}
],
"userTags": [
"<string>"
]
}
]
}
},
"webAuthnStamp": "<string>",
"invitedBy": "550e8400-e29b-41d4-a716-446655440000"
}
'import requests
url = "https://api.byzantine.fi/v1/submit/invite-users"
payload = {
"signedBody": {
"type": "ACTIVITY_TYPE_CREATE_USERS_V3",
"timestampMs": "<string>",
"organizationId": "d107c1e1-766a-4091-802c-de61a3973e91",
"parameters": { "users": [
{
"userName": "John Doe",
"userEmail": "john.doe@example.com",
"apiKeys": [
{
"apiKeyName": "Byzantine API Key",
"publicKey": "c51b102585622c59715784828c579278d5360159cd214fc976f5ce537c41872231",
"curveType": "API_KEY_CURVE_P256",
"expirationSeconds": "3600"
}
],
"authenticators": [
{
"authenticatorName": "<string>",
"challenge": "<string>",
"attestation": {
"credentialId": "<string>",
"clientDataJson": "<string>",
"attestationObject": "<string>",
"transports": []
}
}
],
"oauthProviders": [
{
"providerName": "<string>",
"oidcToken": "<string>"
}
],
"userTags": ["<string>"]
}
] }
},
"webAuthnStamp": "<string>",
"invitedBy": "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({
signedBody: {
type: 'ACTIVITY_TYPE_CREATE_USERS_V3',
timestampMs: '<string>',
organizationId: 'd107c1e1-766a-4091-802c-de61a3973e91',
parameters: {
users: [
{
userName: 'John Doe',
userEmail: 'john.doe@example.com',
apiKeys: [
{
apiKeyName: 'Byzantine API Key',
publicKey: 'c51b102585622c59715784828c579278d5360159cd214fc976f5ce537c41872231',
curveType: 'API_KEY_CURVE_P256',
expirationSeconds: '3600'
}
],
authenticators: [
{
authenticatorName: '<string>',
challenge: '<string>',
attestation: {
credentialId: '<string>',
clientDataJson: '<string>',
attestationObject: '<string>',
transports: []
}
}
],
oauthProviders: [{providerName: '<string>', oidcToken: '<string>'}],
userTags: ['<string>']
}
]
}
},
webAuthnStamp: '<string>',
invitedBy: '550e8400-e29b-41d4-a716-446655440000'
})
};
fetch('https://api.byzantine.fi/v1/submit/invite-users', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"accountId": "550e8400-e29b-41d4-a716-446655440000",
"newUsers": [
{
"userId": "550e8400-e29b-41d4-a716-446655440000",
"firstName": "John",
"lastName": "Doe",
"userEmail": "john.doe@example.com"
}
],
"invitedBy": "550e8400-e29b-41d4-a716-446655440000",
"invitedAt": "2023-11-07T05:31:56Z"
}Headers
Query Parameters
Body
The inviter, and the authorization to invite new users to an existing account
- Option 1
- Option 2
Request body of invite-users: the inviter, and the authorization issued by get-invite-users-payload
Cryptographically passkey signed (stamped). For more info, see authentication methods.
Response
Users invited successfully
Response body when new users are successfully invited to a Byzantine account

