curl --silent --show-error --fail-with-body --request POST \
--url 'https://api.sandbox.stateset.app/api/v1/register' \
--header "Authorization: ApiKey $STATESET_SANDBOX_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"name": "Two-Person Tent",
"email": "ada.lovelace@example.com",
"plan": "hobby"
}'
{
"organization": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "Two-Person Tent",
"slug": "acme-outdoors",
"plan": "string",
"trial_credits_remaining": 1
},
"user": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"email": "ada.lovelace@example.com",
"role": "string"
},
"api_key": {
"key": "string",
"key_prefix": "string",
"name": "Two-Person Tent"
},
"token": "YOUR_API_KEY"
}
Register a new organization
Organization registered. A session cookie is also set; api_key.key is the full plaintext key, returned only once.
POST
/
api
/
v1
/
register
curl --silent --show-error --fail-with-body --request POST \
--url 'https://api.sandbox.stateset.app/api/v1/register' \
--header "Authorization: ApiKey $STATESET_SANDBOX_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"name": "Two-Person Tent",
"email": "ada.lovelace@example.com",
"plan": "hobby"
}'
{
"organization": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "Two-Person Tent",
"slug": "acme-outdoors",
"plan": "string",
"trial_credits_remaining": 1
},
"user": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"email": "ada.lovelace@example.com",
"role": "string"
},
"api_key": {
"key": "string",
"key_prefix": "string",
"name": "Two-Person Tent"
},
"token": "YOUR_API_KEY"
}
Confirm your deployment before running this request. This page describes an API contract;
a published reference does not establish hosted availability. Check the dated
host report and obtain your deployment URL and credentials.
Replace the example host if your provisioned service uses a different URL.
Request body
RegisterOrganizationRequest
string
required
Minimum length:
1. Maximum length: 100.string (email)
required
string
required
Allowed values:
'hobby', 'pro', 'team', 'enterprise'. Default: 'hobby'.Response
object
object
required
object
required
string
required
Session token (also set as a cookie).
Status codes
| Code | Meaning |
|---|---|
201 | Organization registered. A session cookie is also set; api_key.key is the full plaintext key, returned only once. |
400 | Invalid request |
409 | Organization already exists |
Using this contract
Read the source OpenAPI document for declared schemas and alternatives. This page also includes documented corrections from the spec overlays. Example IDs and values are illustrative; replace them with records from your workspace.curl --silent --show-error --fail-with-body --request POST \
--url 'https://api.sandbox.stateset.app/api/v1/register' \
--header "Authorization: ApiKey $STATESET_SANDBOX_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"name": "Two-Person Tent",
"email": "ada.lovelace@example.com",
"plan": "hobby"
}'
{
"organization": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "Two-Person Tent",
"slug": "acme-outdoors",
"plan": "string",
"trial_credits_remaining": 1
},
"user": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"email": "ada.lovelace@example.com",
"role": "string"
},
"api_key": {
"key": "string",
"key_prefix": "string",
"name": "Two-Person Tent"
},
"token": "YOUR_API_KEY"
}
Last modified on September 21, 2026