Available methods

setBusinessAccountName()

Changes the first and last name of a managed business account. Requires the can_change_name business bot right. Returns True on success.

parameters

parametertyperequireddescription
business_connection_idstringrequiredUnique identifier of the business connection
first_namestringrequiredThe new value of the first name for the business account; 1-64 characters
last_namestringoptionalThe new value of the last name for the business account; 0-64 characters

returns

boolean

usage in yaebal

not (yet) hard-typed on Api — call it through the generic .call<T>() escape hatch documented in @yaebal/types.

bot.ts
import type { SetBusinessAccountNameParams } from "@yaebal/types";

await bot.api.call<boolean>("setBusinessAccountName", {
  business_connection_id: "...",
  first_name: "...",
} satisfies SetBusinessAccountNameParams);