POST /v1/admin/accounts creates a new organization, provisions a subdomain, and returns a tenant key.
The tenantKey in the response is your only chance to save it. It is hashed before storage and cannot be retrieved later. If you lose it, use the key rotation endpoint to generate a new one (which requires the current key).
No authentication required.
| Field | Type | Required | Constraints | Description |
|---|---|---|---|---|
organizationName |
string |
Yes | 2 - 120 chars | Display name for the organization |
ownerEmail |
string |
Yes | Valid email | Contact email for the account owner |
slug |
string |
Yes | 2 - 40 chars, ^[a-z0-9-]+$ |
URL-safe identifier; becomes <slug>.formdata.dev |
200)| Field | Description |
|---|---|
account.organizationId |
UUID of the new organization |
account.subdomain |
Custom hostname provisioned on Cloudflare |
tenantKey |
Secret key (sk_ prefix) for all admin API calls |
| Status | Error | Cause |
|---|---|---|
400 |
Validation error | Missing or invalid fields |
409 |
Slug is already taken |
Another organization has this slug |
On account creation, formdata.dev automatically provisions a custom hostname via Cloudflare for SaaS:
POST is made to the Cloudflare Custom Hostnames API for <slug>.formdata.devcf_custom_hostname_id is stored for the organizationSubdomain provisioning runs best-effort. If the Cloudflare API call fails, the account is still created successfully. The api.formdata.dev base URL always works regardless of subdomain status.