Tutorial: Automated Account Setup for Agents & Devs
This tutorial guides you through using the Buttrbase automation API to programmatically set up environments and accounts.
Step 1: Create a Full Account
Instead of navigating the UI registration flow, you can provision a User, an Organization, and a default Application in one request.
Endpoint: POST /api/dev/create-account
Payload: ~~~json { "email": "auto-agent@example.com", "password": "StrongPassword123!", "first_name": "Auto", "last_name": "Bot", "org_name": "Automation Corp" } ~~~
Step 2: Atomic Full Stack Seed
For testing, you can seed a complete isolated environment (User, App, Org, Team) based on a prefix.
Endpoint: POST /api/seed/full
Payload: ~~~json { "prefix": "test-corp" } ~~~
Response: ~~~json { "data": { "user_uuid": "...", "app_uuid": "...", "org_uuid": "...", "team_uuid": "..." } } ~~~
Automation Workflow for Agents
If you are building an AI agent:
1. Provision: Call /api/dev/create-account to get a fresh identity.
2. Execute: Use the returned token to perform tasks on behalf of the new tenant.