accounts.create
Create a Ryft account for businesses, individuals, or hosted entities by providing required details like email, entity type, and verification documents.
Instructions
Create a Ryft account.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| onboardingFlow | No | ||
| No | |||
| entityType | Yes | ||
| business | No | ||
| individual | No | ||
| metadata | No | ||
| settings | No | ||
| termsOfService | No |
Implementation Reference
- src/tools/accounts.ts:72-77 (handler)The handler for accounts.create is registered and defined as a POST request to /accounts using the RyftHttpClient.
registerTool( 'accounts.create', 'Create a Ryft account.', createAccountSchema.shape, async (args) => client.post('/accounts', createAccountSchema.parse(args)), ); - src/tools/accounts.ts:41-50 (schema)Schema definition for accounts.create tool inputs.
const createAccountSchema = z.object({ onboardingFlow: z.string().min(1).optional(), email: z.string().email().optional(), entityType: z.enum(['Business', 'Individual', 'Hosted']), business: businessSchema.optional(), individual: individualSchema.optional(), metadata: metadataSchema.optional(), settings: payoutSettingsSchema.optional(), termsOfService: accountTermsOfServiceSchema.optional(), }); - src/tools/accounts.ts:71-113 (registration)The accounts.create tool is registered 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); }, ); registerTool( 'accounts.verify', 'Request account verification for a Ryft account.', verifyAccountSchema.shape, async (args) => { const { id } = verifyAccountSchema.parse(args); return client.post(`/accounts/${id}/verify`, {}); }, ); registerTool( 'accounts.createAuthorizationLink', 'Create a Ryft account authorization link for a registered account email.', createAccountAuthorizationSchema.shape, async (args) => client.post('/accounts/authorize', createAccountAuthorizationSchema.parse(args)), ); }