Appearance
Account Registration API
API endpoints for self-service registration and account management.
Overview
VeriPrompt supports two account types:
| Type | CompanyType | Package Types | Use Case |
|---|---|---|---|
| Personal | PERSONAL | INDIVIDUAL | Individual developers |
| Team | ONLINE | TEAM, ENTERPRISE | Teams and companies |
Endpoints
Register Account
Create a new account (self-service registration).
http
POST /api/auth/registerRequest Body
| Field | Type | Required | Description |
|---|---|---|---|
accountType | string | Yes | PERSONAL or TEAM |
firstName | string | Yes | User's first name |
lastName | string | Yes | User's last name |
email | string | Yes | User's email address |
password | string | Yes | Password (min 8 characters) |
companyName | string | Yes* | Company/workspace name (*auto-generated for PERSONAL) |
companyEmail | string | No | Company email (defaults to user email) |
Example: Personal Account
bash
curl -X POST https://app.veriprompt.tech/api/auth/register \
-H "Content-Type: application/json" \
-d '{
"accountType": "PERSONAL",
"firstName": "John",
"lastName": "Doe",
"email": "john@example.com",
"password": "securepassword123",
"companyName": "John'\''s Workspace"
}'Example: Team Account
bash
curl -X POST https://app.veriprompt.tech/api/auth/register \
-H "Content-Type: application/json" \
-d '{
"accountType": "TEAM",
"firstName": "Jane",
"lastName": "Smith",
"email": "jane@acme.com",
"password": "securepassword123",
"companyName": "Acme Inc",
"companyEmail": "billing@acme.com"
}'Response
json
{
"success": true,
"company": {
"id": "clx123abc...",
"name": "Acme Inc",
"type": "ONLINE"
},
"user": {
"id": "usr123abc...",
"email": "jane@acme.com",
"firstName": "Jane",
"lastName": "Smith"
}
}Error Responses
| Code | Error | Description |
|---|---|---|
| 400 | Missing required fields | One or more required fields not provided |
| 400 | Invalid account type | accountType must be PERSONAL or TEAM |
| 400 | Email already exists | User with this email is already registered |
| 400 | Company already exists | Company with this email already exists |
| 500 | Registration failed | Server error during registration |
Account Upgrade API
Upgrade a Personal account to Team account.
Check Upgrade Eligibility
http
GET /api/account/upgrade
Authorization: Bearer YOUR_API_KEYResponse
json
{
"canUpgrade": true,
"currentAccountType": "PERSONAL",
"currentPackage": {
"id": "pkg_starter",
"name": "Starter",
"accountType": "INDIVIDUAL"
},
"availableTeamPackages": [
{
"id": "pkg_basic",
"name": "Team Basic",
"description": "Perfect for small teams",
"pricePerMonth": 29.99,
"maxUsers": 3,
"features": ["Up to 1K API requests/month", "3 team members", "..."]
},
{
"id": "pkg_professional",
"name": "Team Professional",
"description": "For growing companies",
"pricePerMonth": 99.99,
"maxUsers": 10,
"features": ["Up to 10K API requests/month", "10 team members", "..."]
}
],
"reason": null
}When Cannot Upgrade
json
{
"canUpgrade": false,
"currentAccountType": "ONLINE",
"reason": "Account is already a team/company account"
}Perform Upgrade
http
POST /api/account/upgrade
Authorization: Bearer YOUR_API_KEY
Content-Type: application/jsonRequest Body
| Field | Type | Required | Description |
|---|---|---|---|
companyName | string | Yes | New company/team name |
companyEmail | string | No | Company email for billing |
Example
bash
curl -X POST https://app.veriprompt.tech/api/account/upgrade \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"companyName": "My Startup",
"companyEmail": "billing@mystartup.com"
}'Response
json
{
"success": true,
"message": "Account upgraded successfully",
"company": {
"id": "clx123abc...",
"name": "My Startup",
"type": "ONLINE",
"packageId": "pkg_basic"
}
}Error Responses
| Code | Error | Description |
|---|---|---|
| 401 | Unauthorized | Invalid or missing API key |
| 403 | Only account owners can upgrade | User is not the account owner |
| 400 | Account is already a team account | Cannot upgrade non-personal accounts |
| 400 | Company name is required | Missing companyName in request |
| 400 | Company email already exists | Another company uses this email |
| 500 | Failed to upgrade account | Server error during upgrade |
Data Preservation During Upgrade
When upgrading from Personal to Team, the following data is preserved:
| Data Type | Preserved | Notes |
|---|---|---|
| Prompts | ✅ Yes | All versions maintained |
| API Keys | ✅ Yes | Continue working immediately |
| Response Storage | ✅ Yes | All stored responses kept |
| Usage History | ✅ Yes | Analytics data preserved |
| Settings | ✅ Yes | All preferences maintained |
| Audit Logs | ✅ Yes | History preserved |
Changes after upgrade:
- Account type:
PERSONAL→ONLINE - Package: Switched to appropriate Team package
- Can now invite team members
- Access to team collaboration features
Package Types
Individual Packages
For PERSONAL (CompanyType) accounts:
| Package | ID | Price | API Requests | Features |
|---|---|---|---|---|
| Starter | pkg_starter | Free | 100/month | Basic access, 10MB storage |
| Developer | pkg_developer | $19.99/mo | 5,000/month | Advanced features, 500MB storage |
Team Packages
For ONLINE (CompanyType) accounts:
| Package | ID | Price | API Requests | Max Users |
|---|---|---|---|---|
| Team Basic | pkg_basic | $29.99/mo | 1,000/month | 3 |
| Team Professional | pkg_professional | $99.99/mo | 10,000/month | 10 |
| Team Growth | pkg_growth | $249.99/mo | 50,000/month | 25 |
Enterprise Package
| Package | ID | Price | API Requests | Max Users |
|---|---|---|---|---|
| Enterprise | pkg_enterprise | Custom | Unlimited | Unlimited |
Code Examples
JavaScript/TypeScript
typescript
// Register a personal account
async function registerPersonal(userData: {
firstName: string;
lastName: string;
email: string;
password: string;
}) {
const response = await fetch('/api/auth/register', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
accountType: 'PERSONAL',
...userData,
companyName: `${userData.firstName}'s Workspace`
})
});
return response.json();
}
// Check upgrade eligibility
async function checkUpgrade(apiKey: string) {
const response = await fetch('/api/account/upgrade', {
headers: { 'Authorization': `Bearer ${apiKey}` }
});
return response.json();
}
// Upgrade to team
async function upgradeToTeam(apiKey: string, companyName: string) {
const response = await fetch('/api/account/upgrade', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${apiKey}`
},
body: JSON.stringify({ companyName })
});
return response.json();
}Python
python
import requests
# Register a personal account
def register_personal(first_name, last_name, email, password):
response = requests.post(
'https://app.veriprompt.tech/api/auth/register',
json={
'accountType': 'PERSONAL',
'firstName': first_name,
'lastName': last_name,
'email': email,
'password': password,
'companyName': f"{first_name}'s Workspace"
}
)
return response.json()
# Check upgrade eligibility
def check_upgrade(api_key):
response = requests.get(
'https://app.veriprompt.tech/api/account/upgrade',
headers={'Authorization': f'Bearer {api_key}'}
)
return response.json()
# Upgrade to team
def upgrade_to_team(api_key, company_name):
response = requests.post(
'https://app.veriprompt.tech/api/account/upgrade',
headers={
'Content-Type': 'application/json',
'Authorization': f'Bearer {api_key}'
},
json={'companyName': company_name}
)
return response.json()