curl --request POST \
--url 'https://api.sandbox.stateset.app/api/v1/register' \
--header "Authorization: Bearer $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 --request POST \
--url 'https://api.sandbox.stateset.app/api/v1/register' \
--header "Authorization: Bearer $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"
}
Request body
RegisterOrganizationRequest
string
required
string (email)
required
string
required
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 |
curl --request POST \
--url 'https://api.sandbox.stateset.app/api/v1/register' \
--header "Authorization: Bearer $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 August 31, 2026