accounts.update
Modify Ryft account details by ID to update business, individual, or hosted entity information, settings, and documents.
Instructions
Update a Ryft account by id.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| entityType | No | ||
| business | No | ||
| individual | No | ||
| metadata | No | ||
| settings | No | ||
| termsOfService | No |
Implementation Reference
- src/tools/accounts.ts:86-95 (handler)Implementation of the accounts.update tool handler, which uses the RyftHttpClient to send a PATCH request to the account endpoint.
registerTool( 'accounts.update', 'Update a Ryft account by id.', updateAccountSchema.shape, async (args) => { const parsed = updateAccountSchema.parse(args); const { id, ...body } = parsed; return client.patch(`/accounts/${id}`, body); }, ); - src/tools/accounts.ts:52-60 (schema)Zod schema definition for input validation of the accounts.update tool.
const updateAccountSchema = z.object({ id: z.string().min(1), entityType: z.enum(['Business', 'Individual', 'Hosted']).optional(), business: updateBusinessSchema.optional(), individual: updateIndividualSchema.optional(), metadata: metadataSchema.optional(), settings: payoutSettingsSchema.optional(), termsOfService: accountTermsOfServiceSchema.optional(), }); - src/tools/accounts.ts:71-95 (registration)Registration of account tools, including accounts.update, within the registerAccountTools function.
export function registerAccountTools(registerTool: ToolRegistrar, client: RyftHttpClient) { registerTool( 'accounts.create', 'Create a Ryft account.', createAccountSchema.shape, async (args) => client.post('/accounts', createAccountSchema.parse(args)), ); registerTool( 'accounts.get', 'Get a Ryft account by id.', { id: z.string().min(1) }, async ({ id }) => client.get(`/accounts/${id}`), ); registerTool( 'accounts.update', 'Update a Ryft account by id.', updateAccountSchema.shape, async (args) => { const parsed = updateAccountSchema.parse(args); const { id, ...body } = parsed; return client.patch(`/accounts/${id}`, body); }, );