ReferenceAPI ReferenceUsers
Invite Users
Invite Users.
Request
interface UsersInviteRequest {
action: 'add'
resource: '/users/invite'
details: {
uid: string
email: string
first_name: string
last_name: string
mobile: string | undefined
user_category: 'api' | 'regular'
customer_id: string | undefined
}
}Prop
Type
Response
interface UsersInviteResponse_success {
status: 'success'
error_code?: '-1' | '-2' | '-3' | '-4' | '-5' | '-6' | '-7' | '-8' | '-9' | '-10' | '-11' | '-12' | '-13' | undefined
message?: string | undefined
details: {
uid: string
device_uuid: string | undefined
server_ecdsa_pubkey: string | undefined
server_rsa_pubkey: string | undefined
email: string
first_name: string | undefined
last_name: string | undefined
mobile: string | undefined
roles: string[] | undefined
ecdsa_pubkey: string
rsa_pubkey: string
created_at: string
created_by: string
updated_at: string
updated_by: string
groups: string[] | undefined
wallets: string[] | undefined
signers: string[] | undefined
type: 'api' | 'regular'
}
metadata: unknown
}Prop
Type
interface UsersInviteResponse_pending {
status: 'pending'
error_code?: '-1' | '-2' | '-3' | '-4' | '-5' | '-6' | '-7' | '-8' | '-9' | '-10' | '-11' | '-12' | '-13' | undefined
message?: string | undefined
details: {
proposal_id: string
}
}Prop
Type
Example
import { resourceSchema } from '@blockstream/ecs-js-sdk'
import { broadcastRequest } from './broadcaster'
const response = await broadcastRequest<
typeof resourceSchema.shape.users.shape.invite
>(
{
action: 'add',
resource: '/users/invite',
details: {
// TODO: fill in required fields
},
},
blockstream,
)