Blockstream Enterprise
ReferenceAPI ReferenceRecipient Groups

Add Recipient Groups

Add Recipient Groups.

Request

RecipientGroupsAddRequest
interface RecipientGroupsAddRequest {
  action: 'add'
  resource: '/recipient-groups'
  details: {
    id: string
    name: string
    type: 'whitelist' | 'blacklist'
    description: string | undefined
    recipients: string[] | undefined
  }
}

Prop

Type

Response

RecipientGroupsAddResponse_success
interface RecipientGroupsAddResponse_success {
  status: 'success'
  error_code?: '-1' | '-2' | '-3' | '-4' | '-5' | '-6' | '-7' | '-8' | '-9' | '-10' | '-11' | '-12' | '-13' | undefined
  message?: string | undefined
  details: {
    id: string
    type: 'whitelist' | 'blacklist'
    name: string
    description: string | undefined
    members: string[]
    created_at: string
    created_by: string
    updated_at: string
    updated_by: string
  }
  metadata: unknown
}

Prop

Type

RecipientGroupsAddResponse_failed | pending | unauthorized | rejected
interface RecipientGroupsAddResponse_failed | pending | unauthorized | rejected {
  status: 'failed' | 'pending' | '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.recipient-groups.shape.add
>(
  {
    action: 'add',
    resource: '/recipient-groups',
    details: {
      // TODO: fill in required fields
    },
  },
  blockstream,
)

On this page