Blockstream Enterprise
ReferenceAPI ReferenceUsers

Edit Users

Edit Users.

Request

UsersEditRequest
interface UsersEditRequest {
  action: 'edit'
  resource: string
  details: {
    email: string | undefined
    first_name: string | undefined
    last_name: string | undefined
    mobile: string | undefined
    pubkey: string | undefined
  }
}

Prop

Type

Response

UsersEditResponse_success
interface UsersEditResponse_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

UsersEditResponse_pending
interface UsersEditResponse_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

UsersEditResponse_failed | unauthorized | rejected
interface UsersEditResponse_failed | unauthorized | rejected {
  status: 'failed' | 'unauthorized' | 'rejected'
  error_code?: '-1' | '-2' | '-3' | '-4' | '-5' | '-6' | '-7' | '-8' | '-9' | '-10' | '-11' | '-12' | '-13' | undefined
  message?: string | undefined
}

Prop

Type

Example

Example
import { resourceSchema } from '@blockstream/ecs-js-sdk'
import { broadcastRequest } from './broadcaster'

const response = await broadcastRequest<
  typeof resourceSchema.shape.users.shape.edit
>(
  {
    action: 'edit',
    resource: '/users/{id}',
    details: {
      // TODO: fill in required fields
    },
  },
  blockstream,
)

On this page